About this project
BehaviorTree.CPP is a C++17 framework for creating behavior trees. The project states it was designed to be flexible, easy to use, reactive and fast. Its primary use case is robotics, but the README notes it can also be used to build AI for games or to replace finite state machines.
Key features highlighted by the project:
- Asynchronous, non-blocking actions are treated as first-class citizens.
- Reactive behaviors can execute multiple actions concurrently (orthogonality).
- Trees are defined with an XML-based domain-specific scripting language and can be loaded at runtime, so tree morphology is not hard-coded even though the library is written in C++.
- Custom tree nodes can be statically linked or converted into plugins and loaded at runtime.
- A type-safe and flexible mechanism supports dataflow between nodes of the tree.
- A logging/profiling infrastructure allows users to visualize, record, replay and analyze state transitions.
Documentation and community resources include the official site behaviortree.dev for tutorials and general documentation, auto-generated Doxygen pages, and GitHub Discussions for community support. A graphical editor called Groot2 is offered for editing behavior trees, while plain XML editing in any text editor is also possible.
Build and installation options described in the README:
- A compiler supporting C++17 is required.
- Three build systems are supported: colcon (ament) for ROS2 users, conan for Linux/Windows, and straight CMake for users managing dependencies themselves.
- Conan builds require CMake 3.23 or newer. Typical commands are conan install, then cmake with the conan-release preset, then cmake --build with the same preset.
- Without conan, if dependencies such as ZeroMQ and SQLite are already installed, users can configure and build with plain CMake commands.
- A pixi (conda virtual environment) workflow is available via pixi run build.
- The library can also be installed through vcpkg using the behaviortree-cpp port.
An example application showing how to use BT.CPP is linked in the README. Version 3.8 is available on a separate branch, which may receive bug fixes, while new features are implemented only on the master branch. Commercial support and consulting are offered by contacting the primary author. The project is released under the MIT License, with copyright attributed to Davide Faconti and Michele Colledanchise across various years.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.