Simple library to load XML begavior Trees done using Groot GUI into the py_trees library
Project description
Import Groot XML files into py_trees
Groot is a Graphical Editor, written in C++ and Qt, to create BehaviorTrees. It is only compatible with BehaviorTree.CPP. This module is an attempt to use Groot to generate trees using py_trees instead of BehaviorTree.CPP.
Groot supported features
BehaviorTree.CPP and py_trees use different control sequences, decorators and tree leaves. This section explains the mapping between one and the other in order to use Groot in py_trees.
Control nodes to Composite nodes:
Groot | py_trees |
---|---|
Sequence | Sequence with memory=True |
ReactiveSequence | Sequence with memory=False |
Fallback | Selector with memory=True |
ReactiveFallback | Selector with memory=False |
Parallel with success_threshold=1 |
Parallel with policy=SuccessOnOne |
Parallel with success_threshold <> 1 |
Parallel with policy=SuccessOnAll |
IfThenElse | not available |
WhileDoElse | not available |
SwitchX | not available |
Decorators to Decorators
Groot | py_trees |
---|---|
Timeout | Timeout |
ForceFailure | SuccessIsFailure |
ForceSuccess | FailureIsSuccess |
Inverter | Inverter |
BlackboardCheckX | EternalGuard? |
KeepRunningUntilFailure | Condition? |
Repeat | not available |
RetryUntilSuccessful | not available |
Delay | not available |
User defined Decorator | Decorator in user_decorators |
Additional py_trees decorators, both core defined as OneShot
, StatusToBlackboard
, FailureIsRunning
, RunningIsSuccess
... or completely created by the use must be added in the user_decorators
diccionare and pass to the groot_xml_to_py_trees
function to be used.
Actions and Conditions to Behaviors
Groot | py_trees |
---|---|
AlwaysFailure | Failure |
AlwaysSuccess | Success |
SetBlackBoard | SetBlackboardVariable output_key=value |
user defined Action | Behavior in user_behaviors |
user defined Condition | Behavior in user_behaviors |
All manually defined Actions or Conditions in Groot has to be defined as py_trees behaviors
and added into the user_behaviors
list in function groot_xml_to_py_trees
to be used.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for py_trees_meet_groot-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1925f354961baa4e28e51e7412e3c0065737e8fb7619978435294bce5426b5a2 |
|
MD5 | a864539486686751e983f3293868d405 |
|
BLAKE2b-256 | ad8cebe6f1261a157e7406e5878906efd721700f7ee5f8fcfc3f6edc4e7c2639 |