Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b433802

Browse files
Update README.md
1 parent 295eb1f commit b433802

File tree

1 file changed

+31
-99
lines changed

1 file changed

+31
-99
lines changed

README.md

Lines changed: 31 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
1-
NEWS!
2-
-----------
3-
The Preprint of our book titled "**Behavior Trees in Robotics and AI**" is available here: https://arxiv.org/abs/1709.00084
1+
# About this library
42

5-
<img width="100" alt="portfolio_view" src="http://michelecolledanchise.com/BTPPLOGO.png"> BT++
6-
====
7-
![License MIT](https://img.shields.io/dub/l/vibe-d.svg) ![Version](https://img.shields.io/badge/version-v1.4-green.svg) <img src="https://travis-ci.org/miccol/Behavior-Tree.svg?branch=master"/>
8-
<br/>
9-
A behavior tree library in `C++`.
3+
This __C++__ library provides a framework to create BehaviorTrees.
4+
It was designed to be flexible, easy to use and fast.
105

11-
REFERENCE
6+
Even if our main use-case is __robotics__, you can use this library to build
7+
__AI for games__, or to replace Finite State Machines in you application.
8+
9+
__BehaviorTree.CPP__ has many interesting features, when compared to other implementations:
10+
11+
- It makes asynchronous Actions, i.e. non-blocking, a first-class citizen.
12+
- It allows the creation of trees at run-time, using a textual representation (XML).
13+
- You can link staticaly you custom TreeNodes or convert them into plugins
14+
which are loaded at run-time.
15+
- It includes a __logging/profiling__ infrastructure that allows the user
16+
to visualize, record, replay and analyze state transitions.
17+
18+
Documentation
19+
------------
20+
21+
https://eurecat.github.io/BehaviorTree.CPP
22+
23+
Reference
1224
------------
1325
Please refer to the following paper when using the library:
1426

@@ -29,100 +41,20 @@ bibtex entry:
2941
`ISSN={1552-3098},` <br/>
3042
`month={April},}`<br/>
3143

32-
DEPENDENCIES
33-
------------
34-
35-
Regarding visualization purposes:
36-
* [OpenGL](https://www.opengl.org/)
37-
* [Glut](https://www.opengl.org/resources/libraries/glut/)
38-
39-
Regarding tests:
40-
* [GTests](https://github.com/google/googletest)
41-
42-
BT NODES SUPPORT
43-
----------------
44-
**Fallback:** Fallback 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, from `left` to `right`.
45-
46-
**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 of `failure` or `running` when one of its children returns failure or running. The children are ticked in order, from `left` to `right`.
47-
48-
**Parallel:** The parallel node ticks its children in parallel and returns success if `M ≤ N` children return success, it returns failure if `N − M + 1` children return failure, and it returns running otherwise.
49-
50-
**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; and *Decorator Negation* That inverts the Success/Failure outcome.
51-
52-
**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.
53-
54-
**Condition:** A Condition node determines if a desired condition `c` 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.
55-
56-
A user manual is available in the project folder ([BTppUserManual.pdf](https://github.com/miccol/Behavior-Tree/blob/master/BTppUserManual.pdf)).
57-
58-
SETUP
59-
-----------
60-
61-
The first step to use BT++ is to retrieve its source code. You can either download it
62-
here (https://github.com/miccol/Behavior-Tree) or clone the repository:
44+
45+
# Aknowledgement
6346

64-
`$ cd /path/to/folder` <br/>
65-
`$ git clone https://github.com/miccol/Behavior−Tree.git`
47+
This project is one of the main components of [MOOD2Be](https://eurecat.org/es/portfolio-items/mood2be/),
48+
and it is developed at [Eurecat](https://eurecat.org) by Davide Faconti.
6649

67-
Once you have the repository, compile the library:
50+
MOOD2Be is one of the six **Integrated Technical Projects (ITPs)** selected from the
51+
[RobMoSys first open call](https://robmosys.eu/itp/)
52+
.
53+
It received funding from the European Union’s Horizon 2020 Research and Innovation Programme
54+
under the RobMoSys project.
6855

69-
`$ cd /path/to/folder/` <br/>
70-
`$ mkdir ./build` <br/>
71-
`$ cd build` <br/>
72-
`$ cmake ..` <br/>
73-
`$ make` <br/>
74-
75-
76-
**NOTE**
77-
In case you get the following error:
78-
79-
`CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
80-
Please set them or make sure they are set and tested correctly in the CMake files:
81-
GLUT_Xmu_LIBRARY (ADVANCED)`
82-
83-
please see solution [here](https://ubuntuforums.org/archive/index.php/t-1703770.html). Thanks [miquelramirez](https://github.com/miquelramirez) for this.
84-
85-
86-
Check the installation by running a sample example.
87-
88-
`$ cd /path/to/folder/` <br/>
89-
`$ cd build/sample` <br/>
90-
`$ ./btpp_example` <br/>
91-
92-
INSTALL THE LIBRARY SYSTEM-WIDE (tested on Ubuntu 14.04 and 16.04)
93-
-------------------------------
94-
95-
If you would like to install the library system-wide, then run:
96-
97-
`$ cd /path/to/folder/` <br/>
98-
`$ cd build` <br/>
99-
`$ sudo make install` <br/>
100-
101-
On Ubuntu, this will install the library (libbtpp.so) in `/usr/local/lib`. <br/>
102-
In an external project, just call in your CMakeLists 'find_package(BTpp)' to find the library. <br/>
103-
The include directory is defined as `BTpp_INCLUDE_DIRS` and the libraries to link as `BTpp_LIBRARIES`.<br/>
104-
The repository [my-behavior-tree-project](https://github.com/miccol/my-behavior-tree-project) shows an example on how to use the library once system-wide installed.
105-
106-
107-
CREATE YOUR OWN ACTION NODE
108-
------
109-
1) Implement your action node class extending the abstract class `BT::ActionNode`.
110-
2) Implement the method `BT::ReturnStatus Tick()` with the code you want to execute while the action is running. Use the method `is_halted()` to check if the action has been prempted. When the execution of your action finished, return `BT::SUCCESS` or `BT::FAILURE` accordingly.
111-
3) Implement the method `void Halt()` with the code you want to execute when the action gets preempted (halted).
112-
See the file `src/example.cpp` for an example.
113-
114-
CREATE YOUR OWN CONDITION NODE
115-
------
116-
1) Implement your condition node class extending the abstract class `BT::ConditionNode`.
117-
2) Implement the method `BT::ReturnStatus Tick()` with the code you want to execute to check the condition. Return `BT::SUCCESS` or `BT::FAILURE` accordingly.
118-
See the file `src/example.cpp` for an example.
119-
120-
121-
NOTES
122-
-------
123-
In case you are puzzled about why a sequence (or fallback) node with 2 or more actions as children never get past the first action, see [this](https://github.com/miccol/ROS-Behavior-Tree/issues/16) discussion.
12456

125-
LICENSE
57+
License
12658
-------
12759
The MIT License (MIT)
12860

0 commit comments

Comments
 (0)