Behavior Tree (BT)

I first heard about this through nav2

Resources

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:

  1. Sequence
  2. Fallback
  3. Parallel
  4. Decorator

and 2 categories of execution nodes:

  1. Action
  2. Condition