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. |
FSM
Description: Finite State Machine IntroKeywords: decision_making
Tutorial Level: BEGINNER
Next Tutorial: decision_making/Tutorials/FSM(C++)
Contents
Introduction
An example of a very simple mechanism that can be modeled by a state machine is a turnstile [http://en.wikipedia.org/wiki/Finite-state_machine].
Though FSM are a simple executive concept, there are several alternatives for describing the desired execution using an FSM (we refer to them as passive and active FSM):
Passive FSM, models Transition as Actions to be executed when a condition is fulfilled or when an event is received. Using such representation the state itself is idle waiting for an action to be emposed.
Active FSM, models States as Actions, either using Entry actions and Exit actions or by representing the state itself as an action.
Passive FSM are more likely to be utilized to model logical transitions, while active FSM are more suitable for purely reactive systems.
For system that require internal state motivation or proactive actions see Behavior Trees decision_making/Tutorials/BehaviorTree
Scxml
- FSM's have several notations in xml like syntax, we chose scxml
Dot
- DOT language supports the definition of directed graphs, where double circles and/or filled point/circle are usually used to define the starting state.
Reading material
FSM, HSM and Behavior treeshttps://www.cs.umd.edu/class/spring2018/cmsc425/Lects/lect21-ai-dec-making.pdf