Robots are machines that need to understand the environment in order to perform any action the application demands. They sense the environment through a variety of sensors to the very last detail, after which they compute the logic through their compute systems and convert them into necessary control actions. To be more practical, while computing such logic, they're also supposed to take care of other factors that would affect their actions.
In this chapter, we shall look at how state machines are helpful in robotics and ROS. You will understand the fundamentals of state machines, be introduced to tools that handle tasks with feedback mechanisms, such as actionlib, and be introduced to ROS state machine packages called executive_smach. You will be introduced to writing examples in actionlib and state machines, which will...