Overview of the API
The API is split up in three parts:
- BeTFSM: pure Python, main framework for Behavior-tree based, ticking, finite state machines.
- BeTFSM ROS2": ROS2 related part
- BeTFSM cROSpi: cROSpi related part
Todo
finish these tables
BeTFSM
Fundamental classes:
| Class | Description |
|---|---|
| TickingState | Fundamental base-class that contains the main logic where all the other states are based on |
| Generator | Auxiliary class using Python generator, i.e. yield, to facilitate definition of nodes. To be used as a base class |
| GeneratorWithState | Auxiliary class inherited from Generator that also manages a state |
| GeneratorWithList | Auxiliary class inherited from Generator that also manages a list of states |
| TickingStateMachine | Auxiliary class to implement state machines, just have to define the states and the transitions |
Orchestration:
| Class | Description |
|---|---|
| Sequence | Executes sequentially its children as long as they return SUCCEED or TICKING, any other outcome returns directly with that outcome |
| Fallback | Executes sequentially its children as long as they return CANCEL or TICKING, any other outcome returns directly with that outcome (including SUCCEED) |
| Adapt | Adapts the outcome of a single child using a transition table |
| While | |
| Repeat | |
| [CheckCancel][betfsm.CheckCancel] | |
| [Ctrl_C_Handler][betfsm.Ctrl_C_Handler] |
Concurrency:
| Class | Description |
|---|---|
| ConcurrentSequence | |
| ConcurrentFallback | |
| Concurrent |
Timing:
| Class | Description |
|---|---|
| TimedWait | |
| TimedRepeat |
Utility:
| Class | Description |
|---|---|
| Message | |
| LogBlackboard | |
| Adapt | |
| Compute | |
| AlwaysOutcome | |
| WaitFor | |
| WaitForever | redundant AlwaysOutcome(TICKING) Waitfor(lambda bb: True |
BeTFSM ROS
Timing related
| Class | Description |
|---|---|
| TimedRepeat for ROS2 | |
| TimedWait for ROS2 | |
| Timeout |
Services and actions
| Class | Description |
|---|---|
| ServiceClient | Creates a TickingState that calls a ROS2 service and generates an outcome when the service returns back. While waiting, it continues to tick |
| ActionClient | Creates a TickingState that calls an action and generates an outcome when the action returns back. While waiting, it gets the response of the action to the blackboard and returns TICKING. |
| LifeCycle | Manages the life cycle of another node |
BeTFSM cROSpi
| Class | Description |
|---|---|
| load_task_list | |
| setTaskParameters | |
| ReadRobotSpecification | |
| ReadTaskSpecification | |
| eTaSLOutput | |
| eTaSLEvent | |
| eTaSL_StateMachine |