Console output

Try to avoid printf or cout statements for printing debug messages inside ROS nodes.

We can use rosconsole (http://wiki.ros.org/rosconsole) for printing debug messages from ROS nodes, instead of printf or cout functions. Rosconsole offers timestamped output messages, automatically logs the printed messages, and provides five different levels of verbosity. For detailed coding styles, refer to http://wiki.ros.org/CppStyleGuide.

Get Mastering ROS for Robotics Programming - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.