Book Image

Learning ROS for Robotics Programming Second Edition

Book Image

Learning ROS for Robotics Programming Second Edition

Overview of this book

Table of Contents (27 chapters)
Learning ROS for Robotics Programming Second Edition
Credits
About the Author
Acknowledgments
About the Author
Acknowledgments
About the Author
Acknowledgments
About the Author
Acknowledgments
About the Reviewer
About the Reviewer
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Visualizing node diagnostics


ROS nodes can provide diagnostic information using the diagnostics topic. For that, there is an API that helps to publish diagnostic information in a standard way. The information follows the diagnostic_msgs/DiagnositcStatus message type, which allows us to specify a level (OK, WARN, ERROR), name, message, and hardware ID as well as a list of diagnostic_msgs/KeyValue, which are pairs of key and value strings.

The interesting part comes with the tools to collect and visualize this diagnostic information. At the basic level, rqt_runtime_monitor allows us to visualize the information directly published through the diagnostics topic. Run the example7 node, which publishes information through the diagnostics topic and this visualization tool to see the diagnostic information:

$ roslaunch chapter3_tutorials example7.launch
$ rosrun rqt_runtime_monitor rqt_runtime_monitor

The preceding commands display the following output:

When the system is large, we can aggregate diagnostic...