Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I set VERBOSITY in ROS for individual nodes?

Tags:

ros

I would like a specific node in my ROS package to display output at the DEBUG verbosity level, while other nodes to display at the INFO level. I am aware of the rosconsole configuration file, and am able to set verbosity for a package with:

log4j.logger.ros.my_package=DEBUG

However, the following does not work:

log4j.logger.ros.my_package.my_node=DEBUG
like image 685
Brad Saund Avatar asked Feb 06 '23 04:02

Brad Saund


1 Answers

The easiest way is running rqt_logger_level GUI. If you have no GUI on robot, you can do that using service :

rosservice call /my_node/set_logger_level "{logger: 'rosout', level: 'debug'}" 

Replace my_node and debug to specify the node and verbosity level, respectively.

like image 86
MichałPełka Avatar answered Mar 24 '23 22:03

MichałPełka