GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - BehaviorTree/BehaviorTree.CPP: Behavior Trees Library in C++. Batteries included.

BranchesTags
Open more actions menu

Latest commit

 

History

1,752 Commits
1,752 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
3rdparty
3rdparty
 
 
cmake
cmake
 
 
docs
docs
 
 
examples
examples
 
 
fuzzing
fuzzing
 
 
include/behaviortree_cpp
include/behaviortree_cpp
 
 
sample_nodes
sample_nodes
 
 
src
src
 
 
tests
tests
 
 
tools
tools
 
 
.clang-format
.clang-format
 
 
.clang-tidy
.clang-tidy
 
 
.codespell_ignore_words
.codespell_ignore_words
 
 
.gitignore
.gitignore
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
CHANGELOG.rst
CHANGELOG.rst
 
 
CLAUDE.md
CLAUDE.md
 
 
CMakeLists.txt
CMakeLists.txt
 
 
CONTRIBUTORS_GUIDE.md
CONTRIBUTORS_GUIDE.md
 
 
Doxyfile
Doxyfile
 
 
LICENSE
LICENSE
 
 
MOOD2Be_final_report.pdf
MOOD2Be_final_report.pdf
 
 
README.md
README.md
 
 
animated.svg
animated.svg
 
 
btcpp_logo.png
btcpp_logo.png
 
 
btcpp_logo.svg
btcpp_logo.svg
 
 
codecov.yml
codecov.yml
 
 
conanfile.py
conanfile.py
 
 
contributors.txt
contributors.txt
 
 
convert_v3_to_v4.py
convert_v3_to_v4.py
 
 
mkdocs.yml
mkdocs.yml
 
 
netlify.toml
netlify.toml
 
 
package.xml
package.xml
 
 
pixi.lock
pixi.lock
 
 
pixi.toml
pixi.toml
 
 
pyproject.toml
pyproject.toml
 
 
run_clang_tidy.sh
run_clang_tidy.sh
 
 
run_clang_tidy_hook.sh
run_clang_tidy_hook.sh
 
 
run_coverage.sh
run_coverage.sh
 
 
runtime.txt
runtime.txt
 
 
sonar-project.properties
sonar-project.properties
 
 

Repository files navigation

License MIT conan Ubuntu conan Windows ros2 pixi (Conda) Coverage Status

BehaviorTree.CPP 4.9

This C++ 17 library provides a framework to create BehaviorTrees. It was designed to be flexible, easy to use, reactive and fast.

Even if our main use-case is robotics, you can use this library to build AI for games, or to replace Finite State Machines.

There are a few features that make BehaviorTree.CPP unique, when compared to other implementations:

  • It makes asynchronous Actions, i.e. non-blocking, a first-class citizen.

  • You can build reactive behaviors that execute multiple Actions concurrently (orthogonality).

  • Trees are defined using a Domain Specific scripting language (based on XML), and can be loaded at run-time; in other words, even if written in C++, the morphology of the Trees is not hard-coded.

  • You can statically link your custom TreeNodes or convert them into plugins and load them at run-time.

  • It provides a type-safe and flexible mechanism to do Dataflow between Nodes of the Tree.

  • It includes a logging/profiling infrastructure that allows the user to visualize, record, replay, and analyze state transitions.

Documentation

  • Tutorials and general documentation: https://www.behaviortree.dev/
  • Auto-generated Doxygen: https://behaviortree.github.io/BehaviorTree.CPP/
  • Community support and forum: https://github.com/BehaviorTree/BehaviorTree.CPP/discussions

GUI Editor

Editing a BehaviorTree is as simple as editing an XML file in your favorite text editor.

If you are looking for a fancier graphical user interface (and I know you do) check Groot2 out.

Groot screenshot

How to compile

BT.CPP requires a compiler that supports C++17.

Three build systems are supported:

  • colcon (ament), if you use ROS2
  • conan otherwise (Linux/Windows).
  • straight cmake if you want to be personally responsible for dependencies :)

Compiling with conan:

Note

Conan builds require CMake 3.23 or newer.

Assuming that you are in the root directory of BehaviorTree.CPP:

conan install . -s build_type=Release --build=missing
cmake --preset conan-release
cmake --build --preset conan-release

If you have dependencies such as ZeroMQ and SQlite already installed and you don't want to use conan, simply type:

mkdir build_release
cmake -S . -B build_release
cmake --build build_release --parallel

BT.CPP includes its own copy of nlohmann/json. To use the one installed in your system instead (version 3.10 or newer), add -DUSE_VENDORED_JSON=OFF. Since nlohmann::json is part of the public API, everything that links BT.CPP must then be compiled with that same version.

If you want to build in a pixi project (conda virtual environment).

pixi run build

If you want to use BT.CPP in your application, please refer to the example here: https://github.com/BehaviorTree/btcpp_sample .

Installing BehaviorTree.CPP (vcpkg)

Alternatively, you can build and install behaviortree-cpp using vcpkg dependency manager:

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install behaviortree-cpp

The behaviortree-cpp port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please create an issue or pull request on the vcpkg repository.

Commercial support

Are you using BT.CPP in your commercial product, and do you need technical support / consulting? You can contact the primary author, [email protected], to discuss your use case and needs.

Previous version

Version 3.8 of the software can be found in the branch v3.8.

That branch might receive bug fixes, but the new features will be implemented only in the master branch.

Star History

Star History Chart

Contributors

License

The MIT License (MIT)

Copyright (c) 2019-2026 Davide Faconti

Copyright (c) 2018-2019 Davide Faconti, Eurecat

Copyright (c) 2014-2018 Michele Colledanchise

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 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 THE SOFTWARE.

About

Behavior Trees Library in C++. Batteries included.

behaviortree.dev

Topics

aibehaviortreecoordinationgamesroboticsrosstate-machine

Resources

Readme
MIT license
Activity
Custom properties

Stars

4.3k stars

Watchers

74 watching

Forks

873 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.