using-conditionals-in-roslaunch.md
Author: Lisandro Mayancela

Examples
Last updated
Was this helpful?

Last updated
Was this helpful?
Was this helpful?
<group if="condition goes here">
If statement body
</group><launch>
<arg name="robot_name"/>
<arg name="init_pose"/>
<arg name="team"/>
<arg name="type"/>
<group if="$(eval team == 'Red')">
<group if="$(eval type == 'painter')">
<param name="robot_description"
command="$(find xacro)/xacro.py $(find robopaint)/urdf/red/painterbot_red_burger.urdf.xacro" />
</group>
<group if="$(eval type == 'attacker')">
<param name="robot_description"
command="$(find xacro)/xacro.py $(find robopaint)/urdf/red/attackerbot_red_burger.urdf.xacro" />
</group>
</group>
<group if="$(eval team == 'Blue')">
<group if="$(eval type == 'painter')">
<param name="robot_description"
command="$(find xacro)/xacro.py $(find robopaint)/urdf/blue/painterbot_blue_burger.urdf.xacro" />
</group>
<group if="$(eval type == 'attacker')">
<param name="robot_description"
command="$(find xacro)/xacro.py $(find robopaint)/urdf/blue/attackerbot_blue_burger.urdf.xacro" />
</group>
</group>
node name="spawn_minibot_model" pkg="gazebo_ros" type="spawn_model"
args="$(arg init_pose) -urdf -param robot_description -model $(arg robot_name)"
respawn="false" output="screen" />
<node pkg="robot_state_publisher" type="robot_state_publisher"
name="robot_state_publisher" output="screen"/>
</launch>