grouping launch file
Hi everyone, I need to start different nodes in the launch file.
At the moment I do it by defining 2 arguments (var1
and var2
) and then by grouping the launch files. Something like:
<group if="$(arg var1)">
start some nodes
</group>
<group if="$(arg var2)">
start other nodes
</group>
and launching from terminal the following:
roslaunch my_package my_launch_file var1:=true var2:=false
This works, but my question is: is there a way I could launch by defining only one arg? For example what I want to achieve is:
<arg name="variable"/>
<group if=**(variable=1)**> --> How can I implement this?
start some nodes
</group>
<group if=(variable=2)>
start other nodes
</group>
and therefore using from terminal only:
roslaunch my_package launch_file variable:=1
or
roslaunch my_package launch_file variable:=2