Giter VIP home page Giter VIP logo

py_trees's Introduction

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:

  • Behaviours, Decorators, Sequences, Selectors, Parallels and BehaviourTree.
  • Blackboards for data sharing.
  • A useful library of behaviours, decorators and idioms.
  • Serialise to a dot graph or render to ascii/unicode in a terminal.
  • Tested on Linux and Mac (YMMV with Windows).

What's New?

  • [2023-01-28] The 2.2.x Release is out! Sequences and Selectors with AND without memory.
  • [2023-01-28] Get Started with py_trees in under 5mins.
  • [2023-01-28] This is now a poetry project with configuration governed by pyproject.toml.
    • The vestigial setup.py is only to assist distribution where PEP-517 is not yet well supported.

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:

  • ReadTheDocs - PyTrees ROS Tutorials - significantly more edifying than the demos, these incrementally walk through the process of building a decision making layer for a robot. These use ROS2 (sparsely), but merely browsing should be enlightening regardless.

Visualisation:

  • py_trees_js - a javascript library for building your own runtime visualisation tool

Robotics:

Releases

  • 2.2.x - Selectors, Sequences with and without memory. Improved testing and style/type checking.
  • 2.1.x - Chooser deprecated. API housekeeping.
  • 2.0.x - Blackboards V2!
  • 1.2.x - Trees can now shutdown cleanly. StatusToBlackboard and EternalGuard, Visitors get finalise().
  • 1.1.x - Fixes for setup, tick-tock, viz.
  • 1.0.x - Behaviours, Decorators, Composites, Blackboards, Tree Management and Viz tools.
  • 0.y.x - First open source pre-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

py_trees's People

Contributors

stonier avatar heuristicus avatar winros avatar naveedhd avatar bit-pirate avatar asmodehn avatar sachit-wp avatar dwlee avatar andrewbest-tri avatar sachitv avatar iovsiann avatar gitpushoriginmaster avatar sinback avatar liangfok avatar kgreenek avatar iwishiwasaneagle avatar jfeil avatar gabrielsr avatar fredrikbaberg avatar clalancette avatar aadeshnpn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.