[ROS2] How do you set verbosity of a Composable Node?
Using ROS2 Foxy, and I want to set the verbosity (log level) of a composable node in the launch file. The code below shows the options I've tried:
container = ComposableNodeContainer(
name='ExampleContainer',
namespace='',
package='rclcpp_components',
executable='component_container',
composable_node_descriptions=[
ComposableNode(
package='package_name',
plugin='namespace::node_class',
name='node_name',
extra_arguments=[{'LOG_LEVEL': 'INFO'}] # Option 1, compiles but doesn't work
)
],
output='screen',
arguments=['--ros-args', '--log-level', 'INFO'] # Option 2, compiles and works but causes the error below if the verbosity is set to 'DEBUG'
)
So far I haven't found anything that works properly. Does anyone know the correct syntax?
Option 2 does seem to work for WARN, INFO, and ERROR, but causes this run-time error with DEBUG:
[ERROR] [component_container-1]: process has died [pid 4137, exit code -11, cmd '/opt/ros/foxy/lib/rclcpp_components/component_container --ros-args --log-level DEBUG --ros-args -r __node:=ExampleContainer -r __ns:=/'].
M@t did you ever get this working for DEBUG?