ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
10

Debug output within a launch file

asked 2011-03-31 06:38:12 -0500

How do I enable debugging output (ROS_DEBUG) for a node within a launch file?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
15

answered 2011-03-31 15:04:36 -0500

joq gravatar image

updated 2011-04-01 03:16:05 -0500

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.)

edit flag offensive delete link more

Comments

Yes. rxconsole is really what I was looking for. Screen output seems to display everything except debug information.
JediHamster gravatar image JediHamster  ( 2011-03-31 21:27:18 -0500 )edit

Can the debug information be pushed to the console or do we have to view it in rqt?

2ROS0 gravatar image 2ROS0  ( 2016-11-01 22:41:44 -0500 )edit

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.

roboticom314 gravatar image roboticom314  ( 2016-11-09 09:09:09 -0500 )edit

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?

lucasw gravatar image lucasw  ( 2021-11-25 10:13:48 -0500 )edit
3

answered 2011-03-31 07:29:04 -0500

Murph gravatar image

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).

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2011-03-31 06:38:12 -0500

Seen: 18,547 times

Last updated: Apr 01 '11