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 | ros @ Robotics Stack Exchange |
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).
Asked: 2011-03-31 06:38:12 -0600
Seen: 19,070 times
Last updated: Apr 01 '11
Can I call one .launch file from another .launch file?
Spawn and kill nodes from nodes/smach
How to compile all packages ROS with debug info?
combining launch files doesn't give same behavior: order / timing of ik solver
Is it possible to save the rxloggerlevel level's?
how to debug a package dependent on multiple packages?
Multiple Kinects - 2nd openni_node never publishes anything