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

Revision history [back]

click to hide/show revision 1
initial version

ROS_INFO's syntax is the same as printf, but ROS_INFO is not printf. The advantage of the ROS logging system is that it provided a wide variety of useful features that printf does not.

For example, ROS_INFO is automatically timestamped for you. Second, it contains five logging levels that you can use. The advantage of these levels is that you can determine how much information you want to see at any given time. You can display only INFO-FATAL messages, or if you're debugging a problem, you can set the level to DEBUG and see all relevant debug messages.

ROS also automatically logs all messages that use ROS_INFO (and all other logging levels) to log files on the filesystem for you so that you can go back and analyze a test later.

ROS_INFO's syntax is the same as printf, but ROS_INFO is not printf. The advantage of the ROS logging system is that it provided a wide variety of useful features that printf does not.

For example, ROS_INFO is automatically timestamped for you. Second, it contains five logging levels that you can use. The advantage of these levels is that you can determine how much information you want to see at any given time. You can display only INFO-FATAL messages, or if you're debugging a problem, you can set the level to DEBUG and see all relevant debug messages.

ROS also automatically logs all messages that use ROS_INFO (and all other logging levels) to log files on the filesystem for you so that you can go back and analyze a test later.

EDIT:

See the wiki page here.