O'Reilly logo

Robot Operating System Cookbook by Kumar Bipin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Getting ready

ROS has a great number of functions and macros to display log messages which support various verbosity levels, conditions, STL streams, throttling, and other special features. We are going to learn about these in this section.

We will start with a simple information message that prints the messages onto the console:

ROS_INFO( ""ROS INFO message."" );

As a result of running a program with the preceding message, the following outputs are shown on the screen:

[INFO] [1456880231.839068150]: ROS INFO message.

As we can see, all of the messages are printed with their verbosity and current timestamp followed by the actual message, which is both within square brackets. Moreover, this function also allows parameter arguments, just like ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required