
You can do this now in ROS Kinetic using eval
:
<arg name="arg_name" default="desired_value"/>
<node pkg="node_pkg" type="node_type" name="node_name"
if="$(eval arg('arg_name') == 'desired_value')"/>
The documentation has been updated: http://wiki.ros.org/roslaunch/XML
Originally posted by adamconkey with karma: 642 on 2017-10-09
This answer was ACCEPTED on the original site
Post score: 34
Original comments
Comment by limitless on 2017-12-02:
<group if="$(eval arg('debug') ==0)">
<node pkg="xxx" type="yyy" name="yyy">
</group>
Comment by Markus on 2019-03-15:
worked for me. The above did not work for me.
Comment by 130s on 2021-05-25:
Updated the answer's description based on @limitless and @Markus' comments.