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

Turns out, there are things like OrSubstitution and NotSubtitution for this, so we can add conditions like:

    rviz_node = Node(
      condition=IfCondition(AndSubstitution(NotSubstitution(run_headless), use_rviz)),
      ...

I didn't find any documentation about this, but here is the issue where it was mentioned: https://github.com/ros2/launch/pull/678, and here are some tests which are mostly explaining the usage: https://github.com/ros2/launch/blob/rolling/launch/test/launch/substitutions/test_boolean_substitution.py