Commit 46be7cc8 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Updated the launch files.

Integrated the description launch into the spawn_sign launch.
Added a test launch.
parent 0cb6ff8b
<!-- -->
<launch>
<arg name="name" default="stop"/>
<arg name="tag" default="alvar0"/>
<arg name="type" default="stop"/>
<arg name="model" default="sign"/>
<arg name="model_path" default="$(find sign_description)/urdf/$(arg model).xacro"/>
<arg name="state_publisher" default="true"/>
<arg name="rviz" default="false"/>
<param name="$(arg name)_description"
command="$(find xacro)/xacro --inorder '$(arg model_path)'
name:=$(arg name)
tag:=$(arg tag)
type:=$(arg type)">
</param>
<node name="$(arg name)_state_publisher"
pkg ="robot_state_publisher"
type="robot_state_publisher"
if="$(arg state_publisher)">
<!--<param name="tf_prefix" value="/$(arg name)" type="str" />-->
<remap from="robot_description" to="$(arg name)_description" />
<remap from="/joint_states" to="/$(arg name)/joint_states" />
</node>
<node name="$(arg name)_rviz" pkg="rviz" type="rviz"
if="$(arg rviz)"
args="-d $(find sign_description)/rviz/$(arg name).rviz"/>
</launch>
\ No newline at end of file
<!-- -->
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<arg name="name" default="stop"/>
<arg name="model" default="sign"/>
......@@ -8,16 +8,22 @@
<arg name="y" default="-0.5"/>
<arg name="yaw" default="3.14159"/>
<arg name="parent" default="map"/>
<arg name="rviz" default="false"/>
<include file="$(find sign_description)/launch/description.launch">
<arg name="name" value="$(arg name)"/>
<arg name="tag" value="$(arg tag)"/>
<arg name="type" value="$(arg type)"/>
<arg name="model" value="$(arg model)"/>
<arg name="rviz" value="$(arg rviz)"/>
</include>
<param name="$(arg name)_description"
command="$(find xacro)/xacro --inorder '$(find sign_description)/urdf/$(arg model).xacro'
name:=$(arg name)
tag:=$(arg tag)
type:=$(arg type)">
</param>
<node name="$(arg name)_state_publisher"
pkg ="robot_state_publisher"
type="robot_state_publisher">
<!--<param name="tf_prefix" value="/$(arg name)" type="str" />-->
<remap from="robot_description" to="$(arg name)_description" />
<remap from="/joint_states" to="/$(arg name)/joint_states" />
</node>
<node name="spawn_urdf_$(arg name)"
pkg ="gazebo_ros"
type="spawn_model"
......@@ -28,4 +34,4 @@
args="$(arg x) $(arg y) 0 $(arg yaw) 0 0 $(arg parent) $(arg name)_base_link 100">
</node>
</launch>
\ No newline at end of file
</launch>
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<arg name="name" default="stop1"/>
<arg name="model" default="sign"/>
<arg name="tag" default="alvar0"/>
<arg name="type" default="stop"/>
<arg name="x" default="0.5"/>
<arg name="y" default="-0.5"/>
<arg name="yaw" default="3.14159"/>
<arg name="parent" default="map"/>
<include file="$(find sign_description)/launch/spawn_sign.launch">
<arg name="name" value="$(arg name)"/>
<arg name="model" value="$(arg model)"/>
<arg name="tag" value="$(arg tag)"/>
<arg name="type" value="$(arg type)"/>
<arg name="x" value="$(arg x)"/>
<arg name="y" value="$(arg y)"/>
<arg name="yaw" value="$(arg yaw)"/>
<arg name="parent" value="$(arg parent)"/>
</include>
<node name="$(arg name)_rviz" pkg="rviz" type="rviz"
args="-d $(find sign_description)/rviz/$(arg name).rviz"/>
</launch>
......@@ -13,4 +13,4 @@
<origin xyz="$(arg x) $(arg y) 0" rpy="0 0 $(arg yaw)"/>
</xacro:sign>
</robot>
\ No newline at end of file
</robot>
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