Introspection

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: http://wiki.ros.org/smach_viewer. Image from ros.org. Licensed under Creative Commons CC-BY-3.0: https://creativecommons.org/licenses/by/3.0/us/legalcode)

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 server in your SMACH code.

We now have a basic understanding of SMACH. Now, let's look at a few examples based on SMACH.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.204.208