Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags. |
HSM
Description: Writing Hierarchical FSMKeywords: decision_making
Tutorial Level: BEGINNER
Contents
Introduction
One way to avoid the explosion of states and events is to design the FSM in a hierarchical manner. First, there are a number of high-level states, corresponding to very broad contexts of the robot behavior. Then within each high-level state, we could have many sub-states, which would be used for modeling more refined behaviors within this state. The resulting system is called a hierarchical finite state machine (HFSM).
HSMs use the same annotation as FSM. In order to call hierarchical calls between FSM, from your current FSM use FSM_CALL_FSM http://wiki.ros.org/decision_making/Tutorials/FSM%28C%2B%2B%29#FSM_CALL_FSM
Reading material
FSM, HSM and Behavior treeshttp://www.cs.umd.edu/class/spring2013/cmsc425/Lects/lect20.pdf