Robotics StackExchange | Archived questions

Getting ROS_DEBUG during startup

Is it possible to set the debug level during node initialization?

I'm trying to debug yet another pluginlib-not-loading bug in rqt, and it'd be awfully handy to see all the ROS_DEBUG statements in pluginlib.

In summary, how can I get ROS Debug output when running: rqt -v --list-plugins --force-discover Thanks.

Asked by ivaughn on 2019-02-01 13:25:31 UTC

Comments

Answers

Ok, I found an answer. You have to create a temporary logger config file that sets the requested log debug level. Here's an example that sets the default logger:

$ cat tmp.cfg 
log4j.logger.ros=DEBUG

Then you pass that using an environment variable as:

$ ROSCONSOLE_CONFIG_FILE=tmp.cfg rqt --force-discover -v --list-plugins

The logger will load the config file at startup and initialize itself to the config in that file instead of the default level ("warn").

Asked by ivaughn on 2019-02-01 14:15:00 UTC

Comments