splintered-reality / py_trees

Python implementation of behaviour trees.
Other
433 stars 143 forks source link
behaviour-trees python robotics

Py Trees

[About] [What's New?] [Documentation] [Getting Started] [Next Steps] [Releases]


About

PyTrees is a python implementation of behaviour trees designed to facilitate the rapid development of medium sized decision making engines for use in fields like robotics. Brief feature list:

What's New?

Documentation

devel 2.2.x 2.1.x 0.7.x 0.6.x

Getting Started

You can get started on CodeSpaces (with no mismatched environment issues and in under 5mins) [1]:

  1. Fork the project to your personal account
  2. Click on Code -> Codespaces -> + Create a Codespace
  3. Enter the Terminal
# Install Dependencies
(docker) zen@py_trees:/workspaces/py_trees$ poetry install

# Explore the demos
(docker) zen@py_trees:/workspaces/py_trees$ poetry shell
(py-trees-py3.8) (docker) zen@py_trees:/workspaces/py_trees$ py-trees-demo-<tab>-<tab>
py-trees-demo-action-behaviour            py-trees-demo-context-switching           py-trees-demo-logging
py-trees-demo-behaviour-lifecycle         py-trees-demo-display-modes               py-trees-demo-pick-up-where-you-left-off
py-trees-demo-blackboard                  py-trees-demo-dot-graphs                  py-trees-demo-selector
py-trees-demo-blackboard-namespaces       py-trees-demo-either-or                   py-trees-demo-sequence
py-trees-demo-blackboard-remappings       py-trees-demo-eternal-guard               py-trees-demo-tree-stewardship
(py-trees-py3.8) (docker) zen@py_trees:/workspaces/py_trees$ py-trees-demo-blackboard
...
(py-trees-py3.8) (docker) zen@py_trees:/workspaces/py_trees$ exit

# Hack some Code

# Run the Formatter, Tests, Linters and Mypy
(docker) zen@py_trees:/workspaces/py_trees$ poetry run tox -l
py38 py310 format check mypy38 mypy310
(docker) zen@py_trees:/workspaces/py_trees$ poetry run tox -e format
...
(docker) zen@py_trees:/workspaces/py_trees$ poetry run tox -e py38
...
(docker) zen@py_trees:/workspaces/py_trees$ poetry run tox -e check
...

# Contribute a PR!
# https://github.com/splintered-reality/py_trees/blob/devel/CONTRIBUTING.md

[1] All of the above will, of course, work in a local environment if you have poetry installed. If you're using VSCode you don't even need that, just reopen the project in the devcontainer and be froody.

Next Steps

On PyPi:

Examples:

Visualisation:

Robotics:

Releases

Devel 2.2.x 2.1.x 2.0.x 1.2.x 0.7.x 0.6.x
Sources devel 2.1.x 2.1.x 2.0.x 1.2.x 0.7.x 0.6.x
Compatibility Python 3.10 Python 3.8 Python 3.10 Python 3.8 Python 3.6 Python 3.6 Python 3.6 Python 3.6 Python 2.7
CI devel-Status 2.2.x-Status - - - - -
Documentation devel-Docs 2.2.x-Docs 2.1.x-Docs 2.0.x-Docs 1.2.x-Docs 0.7.x-Docs 0.6.x-Docs