"Separation of Concerns" and "Composability" are two core principles
you need to understand to build good robotic systems
We want to build a high level "Task Planner", AKA "Coordinator / Orchestrator" that executes complex behaviors in a Service Oriented system.
An alternative to Hierarchical State Machines.
A Domain Specific Language to describe Behaviors.
bool FetchBeer()
{
if( GoTo("kitchen") &&
OpenFridge() &&
Grasp("beer") &&
CloseFridge() )
{
return true;
}
else{
return false;
}
}
There are no beers in the fridge and I don't want to keep the door of the fridge open
The only building block of State Machines are the transitions.
Behavior Trees have more abstractions, but you probably want to have even more (or different one) to make your tree more readable and less verbose.
About Behavior Trees in general
About BehaviorTree.CPP