Action decomposition and execution framework
Project description
Action Trees
Documentation: https://roxautomation.gitlab.io/action-trees
Source Code: https://gitlab.com/roxautomation/action-trees
Action Trees is a control architecture for robotic systems, drawing inspiration from behavior trees but incorporating distinct features suitable for specific real-time applications.
Summary
Action Trees adopt a hierarchical structure, similar to behavior trees, to decompose complex behaviors into smaller, manageable actions. The architecture is designed to facilitate the development and maintenance of machine behaviors in systems where asynchronous processing and error handling are crucial.
Key Features
- Hierarchical and Modular Design: Enables the breakdown of complex behaviors into simpler actions, enhancing maintainability.
- Concurrency Through Asyncio: Utilizes Python's asyncio library to support parallel execution of actions, crucial for non-blocking operation in real-time systems.
- Error Handling: Integrates exception handling within actions, aiming to improve system reliability and response to failures.
- State Management: Incorporates state tracking for each action, assisting in the management and debugging of the execution flow.
- VDA5050 compliant: Action states follow VDA5050 guidelines along with support for pause and cancel actions.
Comparison with Behavior Trees
Behavior Trees (BTs) and Action Trees (ATs) both utilize a hierarchical structure for managing AI behaviors, but they serve distinct purposes. BTs are decision-oriented, focusing on selecting the next action in dynamic environments based on real-time changes and conditions. They excel in scenarios where frequent decision-making is critical.
On the other hand, ATs concentrate on the efficient execution of predefined complex actions. Their design prioritizes asynchronous operations and comprehensive error handling, making them well-suited for tasks that require real-time responsiveness and reliability. Unlike BTs, ATs are less about decision-making and more about the methodical execution of a series of actions.
This core difference aligns BTs with decision-making needs, while ATs are tailored for execution efficiency in robotic systems.
Development
Please develop inside the container, this will ensure all the required checks (pylint
& mypy
) as well as formatting (black
)
If you are not familiar with devcontainers, read Developing inside a Container first
- Clone this repository
- open dir in VS Code
vscode .
- rebuild and reopen in container (you'll need
Dev Containers
extension)
note: if a container with devcontainer
name already exists, an error will occur. You can remove it with
docker container prune -f
What goes where
gitlab-ci.yml
- gitlab ci scriptinit_container.sh
script to initialize container for development.setup.py
- main packge setup filedocs
- documentation, uses mkdocsinstall
- scripts for preparing host system
Version control
Version control is done with git tags using setuptools_scm
use git tag v1.2.3
to update version number. Use git describe
to show current version.
Documentation
The documentation is automatically generated from the content of the docs directory and from the docstrings of the public signatures of the source code.
run serve_docs.sh
from inside the container to build and serve documentation.
note: pyreverse
creates images of packages and classes in docs/uml/..
Pre-commit
optional. Add precommit install
to init_container.sh
if required.
This project was forked from cookiecutter template template.
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 action_trees-0.2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 215c47743ac83cd7ce181aeec0e9dfe24ec97b8d7f0d0431213fb97245132a94 |
|
MD5 | 98fa719f00067c054c9b657b58ab485b |
|
BLAKE2b-256 | bedbc372e9ee77c62197e90f846b356977727e80ffe3ed28098edf016aa4f0f1 |