The state machine we design or create in smach_ros can be visualized for debugging or analysis through a tool called SMACH viewer. The following diagram shows the use of SMACH viewer with the preceding PR2 robot example (the text and numbers in this image are intentionally illegible):

SMACH viewer representation (source: Image from Licensed under Creative Commons CC-BY-3.0:

The robot is currently in the DETECT_OUTLET state, which is indicated in green.

To view these states in the SMACH viewer, you must define an introspection ...

Get ROS Robotics Projects now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.