ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It cannot work as is because parsing is not yet done when the description is generated.

You can split your talker_node in 2 nodes:

  • 1 with condition=launch.conditions.IfCondition(launch.LaunchConfiguration("debug")) having the additional debug_prefix
  • 1 with condition=launch.conditions.UnlessCondition(launch.LaunchConfiguration("debug")) having no additional prefix

This is equivalent to the <node if="$(arg debug) .../>" and <node unless="$(arg debug) .../>" existing with the XML syntax of launch files.