- Notifications
You must be signed in to change notification settings - Fork92
Behavior Trees Library for ROS (Robot Operating System). In C++ and python
License
miccol/ROS-Behavior-Tree
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Our bookBehavior Trees in Robotics and AI, published by CRC Press Taylor & Francis, is available for purchase (ebook and hardcover) on the CRC Press Store or Amazon. The Preprint version (free) is available here:https://arxiv.org/abs/1709.00084
Tutorials available athttps://btirai.github.io/
TheYARP version of this library has a GUI as the following:
A ROS behavior tree library. The leaf nodes (user defined) can be either inC++ orpython. Read the user manual for more information.
Please refer to the following paper when using the library:
How Behavior Trees Modularize Hybrid Control Systems and Generalize Sequential Behavior Compositions, the Subsumption Architecture, and Decision Trees. Michele Colledanchise and Petter Ogren. IEEE Transaction on Robotics 2017.
bibtex entry:
@ARTICLE{TRO17Colledanchise,author={M. Colledanchise and P. Ögren},journal={IEEE Transactions on Robotics},title={{How Behavior Trees Modularize Hybrid Control Systems and Generalize Sequential Behavior Compositions, the Subsumption Architecture, and Decision Trees}},year={2017},volume={33},number={2},pages={372-389},keywords={Computer architecture;Decision trees;High definition video;Robot control;Switches;Behavior trees (BTs);decision trees;finite state machines (FSMs);hybrid dynamical systems (HDSs);modularity;sequential behavior compositions;subsumption architecture},doi={10.1109/TRO.2016.2633567},ISSN={1552-3098},month={April},}
Contains 2 packages: behavior_tree_core and behavior_tree_leaves.
behavior_tree_core: Contains the core BT source code, including the tree and the leaf nodes.
behavior_tree_leaves: Contains action and condition specifications for BT leaf nodesrunning as external ROS nodes.
User manual available in the project folder (BTUserManual.pdf):
| Hydro | Indigo | Jade | Kinetic | |
|---|---|---|---|---|
| Release |
Regarding visualization purposes:
- Opengl
- Glut
- xdot: For visualizing using DOT language.
- rqt_dot: For visualizing the tree in RQT with DOT language.
Regarding unit tests:
Selector: Selector nodes are used to find and execute the first child that does not fail. A Selector node will return immediately with a status code of success or running when one of its children returns success or running. The children are ticked in order of importance, fromleft toright.
Sequence: Sequence nodes are used to find and execute the first child that has not yet succeeded. A sequence node will return immediately with a status code offailure orrunning when one of its children returns failure or running. The children are ticked in order, fromleft toright.
Parallel: The parallel node ticks its children in parallel and returns success ifM ≤ N children return success, it returns failure ifN − M + 1 children return failure, and it returns running otherwise.
Decorator: The decorator node manipulates the return status of its child according to the policy defined by the user (e.g. it inverts the success/failure status of the child). In this library the decorators implemented are the two common ones:Decorator Retry which retries the execution of a node if this fails; andDecorator Negation That inverts the Success/Failure outcome.
Action: An Action node performs an action, and returns Success if the action is completed, Failure if it can not be completed and Running if completion is under way.
Condition: A Condition node determines if a desired conditionc has been met. Conditions are technically a subset of the Actions, but are given a separate category and graphical symbol to improve readability of the BT and emphasize the fact that they never return running and do not change any internal states/variables of the BT.
USER MANUAL available inside the repo's folder
The first step to use BT++ is to retrieve its source code. You can either download ithere (https://github.com/miccol/ROS-Behavior-Tree) or clone the repository:
$ cd /path/to/catkin_ws/src$ git clone https://github.com/miccol/ROS-Behavior-Tree.git
Once you have the repository. Compile the library:
$ cd /path/to/catkin_ws/$ catkin_make
Check the installation by launching an example.
$ roslaunch behavior_tree_leaves test_behavior_tree.launch
Runrqt_dot plugin for the visualization in ROS and put the ROS topic inwhich the tree is published. The default topic is/bt_dotcode.
rosrun rqt_dot rqt_dotIn case you are puzzled about why a sequence (or fallback) node with 2 or more actions as children never get past the first action, seethis discussion.
The MIT License (MIT)
Copyright (c) 2014-2018 Michele Colledanchise
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.
About
Behavior Trees Library for ROS (Robot Operating System). In C++ and python
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.
