The best way to learn about SMACH is through examples. Let's look at some simple examples of how to get started with SMACH so that we can create our state machine for our waiter robot analogy. Note that this book will act as a starting point for SMACH ROS and not all the examples and methodologies used in SMACH will be explained due to our limited scope. Hence, I suggest that you have a look at the official tutorials link, http://wiki.ros.org/smach/Tutorials, which has a very good and comprehensive list of tutorials.
Getting started with SMACH examples
Installing and using SMACH-ROS
The installation of SMACH is pretty straightforward and it can be installed directly using the following command:
$ sudo apt-get install...