Debug output within a launch file
How do I enable debugging output (ROS_DEBUG) for a node within a launch file?
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org |
How do I enable debugging output (ROS_DEBUG) for a node within a launch file?
The previous answer is incomplete. Setting output="screen"
in the launch file will show INFO messages and above, not DEBUG output.
For that, you can set the ROS console configuration.
The rxconsole
package allows dynamic setting and resetting of DEBUG output. The "Levels" button near the lower right corner can set each C++ logger to any level. (It has no effect on Python loggers.)
Just set output="screen"
in the launch file as mentioned below. I prefer rqt_console over the screen. It's much easier to filter and even pause the output.
I think the ros console wiki had confusing language until I edited it just now- but to be clear there is no way to have a node launch with a specific logger level, if you want debug on to catch node start debug messages you have to go outside the launch file and edit this conf file (without going to extremes to have a launch file write DEBUG or INFO to a conf file and then load that with env, and the order of execution would probably be wrong without going to even further extremes of nested launch files)- is that right?
And there is no per-node log level capability in the conf file, just per-package?
In the node definition, you can set the output to screen:
<node pkg="amcl" type="amcl" name="amcl" output="screen">
for example. That will get the output pushed to your console.
You can also often find the information you're looking for through the rxconsole program. It's nice for separating the output from the many nodes that are launched, as well as displaying based on severity (warnings, errors, debugs).
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2011-03-31 06:38:12 -0500
Seen: 17,212 times
Last updated: Apr 01 '11
ros2 launch creates two nodes of same type
Calibrating turtlebot(create) can not find turtlebot.launch
using stdout of a node in a launch file
cant able to make my package [closed]
how to include an existing urdf file into anothe urdf file with xacro
Nested eval in ROS2 XML launch file
Run ros2 node using launch file with delay