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

Hello, I have had the same issue and for me (on Eloquent) the following works:

logger = launch.substitutions.LaunchConfiguration("log_level")
launch.LaunchDescription([
      launch.actions.DeclareLaunchArgument(
            "log_level",
            default_value=["debug"],
            description="Logging level",
      ),
     launch_ros.actions.Node(
         package='demo_nodes_cpp',
         executable='talker',
         output='screen', 
         arguments=['--ros-args', '--log-level', logger]
    )
])

I got this idea from this open issue: https://github.com/ros2/launch/issues/383 and hopefully a more elegant solution will be available soon.

If anyone has an idea for a better solution in the meantime, please share!