Ask Your Question
1

Control ROS2 logging output with launch command

asked 2020-04-11 17:40:51 -0500

Hi,

I'm kicking off "ros2 launch nav2_bringup tb3_simulation_launch.py" using ROS2 Eloquent.

This successfully runs rviz2, gazebo, among a whole bunch of other nodes in the navigation2 package.

The logging output at stdout at the INFO level is overwhelming.

I tried the " --ros-args --log-level debug" but that doesn't seem to work with "ros2 launch...".

Question - is there a way either for the "ros2 launch..." command or post launch to omit/disable the logger outputs for specific nodes (ie disable all rviz2 logging, or log rviz2 only at the ERROR level while outputting INFO level for everything else)?

Thanks! Jack

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-04-22 17:45:01 -0500

johnconn gravatar image

updated 2020-04-22 17:50:12 -0500

from the docs you can find that there are some options for redirecting stdout and stderr to log files and to the screen.

If you want to redirect one or both stdout and stderr per node away from the screen, try messing with those options

For one of my nodes, I'm tired of seeing stuff output from it to the screen, so I set the output param like so:

object_mapper = launch_ros.actions.Node(
        package='object_mapper',
        node_executable='object_mapper',
        node_name='object_mapper',
        output={'both': 'log'}
)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-04-11 17:40:51 -0500

Seen: 1,168 times

Last updated: Apr 22 '20