Behavior Tree (BT)
I first heard about this through nav2
Resources
- https://navigation.ros.org/behavior_trees/index.html
- https://medium.com/@nullbyte.in/behavior-trees-for-ros2-part-1-unlocking-advanced-robotic-decision-making-and-control-7856582fb812
Ooh, they can also do this with GXF, see https://docs.nvidia.com/holoscan/sdk-user-guide/gxf/doc/behavior_tree/behavior_trees.html
Tree based execution model and task planner.
Can model more complex tasks than practical with FSM.
Strongly recommended by Steve Macenski to read the first 3 chapters:
Behavior Trees are used extensively in Robot Manipulation.
Motivation
The motivation can be analogous to the shift from Goto statements (one-way control) to Function Calls (two-way control)
The Goto statement as it stands is just too primitive; it is too much an invitation to make a mess of oneās programā. Looking back at the state transitions in FSMs, we note that they are indeed one-way control transfers. This is where the tradeoff between reactivity and modularity is created. For the system to be reactive, there needs to be many transitions between components, and many transitions means many one-way control transfers which, just as Dijkstra noted, harms modularity by being an āinvitation to make a mess of oneās programā. If, for example, one component is removed, every transition to that component needs to be revised. As will be seen, BTs use two-way control transfers, governed by the internal nodes of the trees.
In the classical formulation, there exist 4 categories of control flow nodes:
- Sequence
- Fallback
- Parallel
- Decorator
and 2 categories of execution nodes:
- Action
- Condition