New in ROS C Turtle: SMACH

One of the new features in ROS C Turtle was a critical component of our recent "hackathons."  When fetching a drink out of a refrigerator, for example, a robot has to perform numerous tasks such as grasping a handle, opening a door, and scanning for drinks.  These tasks have to be carefully orchestrated to deal with unexpected conditions and errors. We've previously used complex task-planning systems to orchestrate these actions, but our developers and researchers needed something more rapid for prototyping robot behaviors.

One of our interns came up with an answer.  SMACH ("State MACHine", pronounced "smash") is a task-specification and coordination architecture that was developed by Jonathan Bohren as part of his second internship here at Willow Garage. Jonathan came to us from the GRASP Lab at University of Pennsylvania and is now headed off to the Laboratory for Computational Sensing and Robotics (LCSR) at Johns Hopkins.  During his extended stay here, SMACH was used in a variety of PR2 projects.

SMACH was first used in the rewrite of our plugging and doors code, then further refined during our billiards, cart-pushing, and drink-fetching hackathons. In all of these projects, the ability to code these behaviors quickly was critical, as was the ability to create more robust behaviors for dealing with failure.

SMACH is a ROS-independent Python library, so it can be used with and without ROS infrastructure. It comes with important developer tools like a visualizer for the current SMACH plan and introspection tools to
monitor the internal state and data flow. There are already many SMACH tutorials that can be found on the ROS wiki, and we hope to see SMACH used to produce many more cool robotics apps!