Commit 47767cd0 authored by Fernando Herrero's avatar Fernando Herrero
Browse files

Fix launch

parent e7d398ba
<!-- -->
<launch>
<!--<arg name="circuit" default="test2020"/>-->
<arg name="name" default="sign"/>
<arg name="name" default="stop1"/>
<arg name="tag" default="alvar0"/>
<arg name="type" default="stop"/>
<arg name="x" default="0.0"/>
<arg name="y" default="0.0"/>
<arg name="yaw" default="0.0"/>
<arg name="model" default="$(arg name)"/>
<arg name="model_path" default="$(find sign_description)/urdf/sign.xacro"/>
<arg name="model" default="sign"/>
<arg name="model_path" default="$(find sign_description)/urdf/$(arg model).xacro"/>
<arg name="parent" default="map"/>
<!--<arg name="world_frame" default="world"/>-->
<arg name="rviz" default="false"/>
<param name="$(arg name)_description"
......@@ -18,7 +16,10 @@
name:=$(arg name)
tag:=$(arg tag)
type:=$(arg type)
parent:=$(arg parent)">
parent:=$(arg parent)
x:=$(arg x)
y:=$(arg y)
yaw:=$(arg yaw)">
</param>
<node name="$(arg name)_state_publisher"
......@@ -32,11 +33,8 @@
<node name="spawn_urdf_$(arg name)"
pkg ="gazebo_ros"
type="spawn_model"
args="-param /$(arg name)_description -urdf -model $(arg name) -x $(arg x) -y $(arg y) -z 0 -Y $(arg yaw)">
args="-param /$(arg name)_description -urdf -model $(arg name) -x 0 -y 0 -z 0 -Y 0">
</node>
<!-- <node name="$(arg name)_static_tf" pkg="tf" type="static_transform_publisher"
args="$(arg x) $(arg y) 0 $(arg yaw) 0 0 $(arg world_frame) $(arg parent) 100"/>-->
<node name="$(arg name)_rviz" pkg="rviz" type="rviz"
if="$(arg rviz)"
......
......@@ -57,17 +57,15 @@ Visualization Manager:
All Enabled: true
map:
Value: true
sign1_box_link:
stop1_base_link:
Value: true
sign1_tag_image:
stop1_tag_image:
Value: true
sign1_tag_link:
stop1_tag_link:
Value: true
sign1_top_panel_image:
stop1_top_panel_image:
Value: true
sign1_top_panel_link:
Value: true
world:
stop1_top_panel_link:
Value: true
Marker Scale: 0.25
Name: TF
......@@ -75,15 +73,14 @@ Visualization Manager:
Show Axes: true
Show Names: true
Tree:
world:
map:
sign1_box_link:
sign1_tag_link:
sign1_tag_image:
{}
sign1_top_panel_link:
sign1_top_panel_image:
{}
map:
stop1_base_link:
stop1_tag_link:
stop1_tag_image:
{}
stop1_top_panel_link:
stop1_top_panel_image:
{}
Update Interval: 0
Value: true
- Alpha: 1
......@@ -100,31 +97,31 @@ Visualization Manager:
Alpha: 1
Show Axes: false
Show Trail: false
sign1_box_link:
stop1_base_link:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
sign1_tag_image:
stop1_tag_image:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
sign1_tag_link:
stop1_tag_link:
Alpha: 1
Show Axes: false
Show Trail: false
sign1_top_panel_image:
stop1_top_panel_image:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
sign1_top_panel_link:
stop1_top_panel_link:
Alpha: 1
Show Axes: false
Show Trail: false
Name: RobotModel
Robot Description: sign_description
Name: stop1_RobotModel
Robot Description: stop1_description
TF Prefix: ""
Update Interval: 0
Value: true
......@@ -154,7 +151,7 @@ Visualization Manager:
Views:
Current:
Class: rviz/Orbit
Distance: 1.46973848
Distance: 0.88139534
Enable Stereo Rendering:
Stereo Eye Separation: 0.0599999987
Stereo Focal Distance: 1
......
......@@ -6,11 +6,11 @@
<link name="$(arg parent)">
</link>
<xacro:sign name="sign_$(arg name)"
<xacro:sign name="$(arg name)"
parent="$(arg parent)"
tag_dae="$(arg tag)"
top_panel_dae="$(arg type)">
<origin xyz="0 0 0" rpy="0 0 0"/>
<origin xyz="$(arg x) $(arg y) 0" rpy="0 0 $(arg yaw)"/>
</xacro:sign>
</robot>
\ No newline at end of file
......@@ -19,13 +19,13 @@
<xacro:macro name="sign"
params="name:=sign
parent:=${name}_base_link
parent:=map
*origin
tag_dae:=alvar0
top_panel_dae:=stop
box_gazebo_material:=Gazebo/White">
<link name="${name}_box_link">
<link name="${name}_base_link">
<inertial>
<mass value="0.001"/>
<origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
......@@ -46,17 +46,26 @@
</collision>
</link>
<joint name="joint_${parent}_to_${name}" type="fixed">
<joint name="joint_${parent}_to_${name}_base_link" type="fixed">
<xacro:insert_block name="origin" />
<parent link="${parent}"/>
<child link="${name}_box_link"/>
<child link="${name}_base_link"/>
</joint>
<gazebo>
<static>1</static>
</gazebo>
<gazebo reference="${name}_box_link">
<gazebo reference="${name}_base_link">
<material>${box_gazebo_material}</material>
</gazebo>
<link name="${name}_tag_link">
</link>
<joint name="joint_${name}_base_link_to_${name}_tag_link" type="fixed">
<origin xyz="${delta} 0 ${tag_size/2.0+tag_z_offset}" rpy="0 0 0" />
<parent link="${name}_base_link"/>
<child link="${name}_tag_link" />
</joint>
<gazebo reference="${name}_tag_link">
<material>${box_gazebo_material}</material>
</gazebo>
......@@ -69,32 +78,27 @@
</visual>
</link>
<joint name="joint_${name}_box_link_to_${name}_tag_image" type="fixed">
<origin xyz="${delta} 0 ${tag_size/2.0+tag_z_offset}" rpy="0 ${PI} -${PI/2}" />
<parent link="${name}_box_link"/>
<joint name="joint_${name}_tag_link_to_${name}_tag_image" type="fixed">
<origin xyz="0 0 0" rpy="0 ${PI} -${PI/2}" />
<parent link="${name}_tag_link"/>
<child link="${name}_tag_image" />
</joint>
<gazebo>
<static>1</static>
</gazebo>
<gazebo reference="${name}_tag_link">
<material>${box_gazebo_material}</material>
</gazebo>
<gazebo reference="${name}_tag_image">
</gazebo>
<link name="${name}_top_panel_link">
</link>
<joint name="joint_${name}_box_link_to_${name}_top_panel_link" type="fixed">
<origin xyz="0 0 0" rpy="0 0 0"/>
<parent link="${name}_box_link"/>
<joint name="joint_${name}_base_link_to_${name}_top_panel_link" type="fixed">
<origin xyz="${delta} 0 ${top_panel_height/2.0+top_panel_z_offset}" rpy="0 0 0"/>
<parent link="${name}_base_link"/>
<child link="${name}_top_panel_link"/>
</joint>
<gazebo reference="${name}_top_panel_link">
</gazebo>
<link name="${name}_top_panel_image">
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
......@@ -106,8 +110,11 @@
</visual>
</link>
<gazebo reference="${name}_top_panel_image">
</gazebo>
<joint name="joint_${name}_top_panel_link_to_${name}_top_panel_image" type="fixed">
<origin xyz="${delta} 0 ${top_panel_height/2.0+top_panel_z_offset}" rpy="0 ${PI} -${PI/2}" />
<origin xyz="0 0 0" rpy="0 ${PI} -${PI/2}" />
<parent link="${name}_top_panel_link"/>
<child link="${name}_top_panel_image" />
</joint>
......@@ -116,12 +123,6 @@
<static>1</static>
</gazebo>
<gazebo reference="${name}_top_panel_link">
</gazebo>
<gazebo reference="${name}_top_panel_image">
</gazebo>
</xacro:macro>
</root>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment