|
behaviortree_cpp package from behaviortree_cpp_v3 repobehaviortree_cpp |
ROS Distro
|
Package Summary
| Version | 4.9.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-07-06 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Davide Faconti
Authors
- Davide Faconti
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.

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
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.
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.9.1 (2026-07-06)
-
Merge pull request #1139 from mini-1235/patch-3 Fix -Wfree-nonheap-object and -Wunused-result
-
Fix -Wfree-nonheap-object and -Wnull-dereference
-
Merge pull request #1128 from XinyuKhan/patch-1 Rename header guard for shared_library.h
-
Rename header guard for shared_library.h
-
Merge pull request #1126 from BehaviorTree/dependabot/github_actions/prefix-dev/setup-pixi-0.9.5 Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5
-
Merge pull request #1127 from botsandus/add-sleep-override Add [Tree::wakeUpSignal()]{.title-ref} getter
-
Merge pull request #1121 from PickNikRobotics/fix-subtree-literal-numeric-types Preserve numeric types for literal subtree port values
-
version 2
-
lint
-
Add support for custom sleep override function in Tree class
-
Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5 Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/v0.9.4...v0.9.5) ---updated-dependencies:
- dependency-name: prefix-dev/setup-pixi dependency-version: 0.9.5 dependency-type: direct:production update-type: version-update:semver-patch ...
-
Preserve numeric types for literal subtree port values When literal values are passed to SubTree ports (not blackboard remapping), detect numeric types (int64_t, double) before storing them in the child blackboard. Previously all literals were stored as std::string, which caused type-mismatch errors in Script expressions that tried to do arithmetic. Co-Authored-By: Claude Opus 4.6 <<noreply@anthropic.com>>
-
Contributors: Davide Faconti, Ladislav Skvarka, Tony Najjar, Xinyu Han, dependabot[bot], mini-1235
4.9.0 (2026-02-11)
- Fix Blackboard thread-safety: 6 data races fixed, use shared_mutex for storage
- Fix XML parser null pointer dereference in loadSubtreeModel on missing SubTree ID
- Add TryCatch control node for try/catch recovery patterns
- Fix #1111: EntryUpdatedDecorator::halt() not halting its child (#1112)
- Add polymorphic shared_ptr port support (#943) (#1107)
- Fix [std::from_chars]{.title-ref} compilation on older g++ versions (#1110)
- Fix clang-tidy warnings across tests, examples, and samples (#1109)
- Add exception tracking with node backtrace (#990) (#1106)
- Fix #861
- Fix #917: add comments about preconditions
- Fix missing read_parameter_from_ports initialization in DelayNode (#1103)
- Fix #880: createTreeFromText now finds previously registered subtrees (#1105)
- Remove lexy dependency, replace with hand-written tokenizer and Pratt parser (#1099)
- Fix
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged behaviortree_cpp at Robotics Stack Exchange
|
behaviortree_cpp package from behaviortree_cpp_v3 repobehaviortree_cpp |
ROS Distro
|
Package Summary
| Version | 4.9.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-07-06 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Davide Faconti
Authors
- Davide Faconti
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.

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
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.
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.9.1 (2026-07-06)
-
Merge pull request #1139 from mini-1235/patch-3 Fix -Wfree-nonheap-object and -Wunused-result
-
Fix -Wfree-nonheap-object and -Wnull-dereference
-
Merge pull request #1128 from XinyuKhan/patch-1 Rename header guard for shared_library.h
-
Rename header guard for shared_library.h
-
Merge pull request #1126 from BehaviorTree/dependabot/github_actions/prefix-dev/setup-pixi-0.9.5 Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5
-
Merge pull request #1127 from botsandus/add-sleep-override Add [Tree::wakeUpSignal()]{.title-ref} getter
-
Merge pull request #1121 from PickNikRobotics/fix-subtree-literal-numeric-types Preserve numeric types for literal subtree port values
-
version 2
-
lint
-
Add support for custom sleep override function in Tree class
-
Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5 Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/v0.9.4...v0.9.5) ---updated-dependencies:
- dependency-name: prefix-dev/setup-pixi dependency-version: 0.9.5 dependency-type: direct:production update-type: version-update:semver-patch ...
-
Preserve numeric types for literal subtree port values When literal values are passed to SubTree ports (not blackboard remapping), detect numeric types (int64_t, double) before storing them in the child blackboard. Previously all literals were stored as std::string, which caused type-mismatch errors in Script expressions that tried to do arithmetic. Co-Authored-By: Claude Opus 4.6 <<noreply@anthropic.com>>
-
Contributors: Davide Faconti, Ladislav Skvarka, Tony Najjar, Xinyu Han, dependabot[bot], mini-1235
4.9.0 (2026-02-11)
- Fix Blackboard thread-safety: 6 data races fixed, use shared_mutex for storage
- Fix XML parser null pointer dereference in loadSubtreeModel on missing SubTree ID
- Add TryCatch control node for try/catch recovery patterns
- Fix #1111: EntryUpdatedDecorator::halt() not halting its child (#1112)
- Add polymorphic shared_ptr port support (#943) (#1107)
- Fix [std::from_chars]{.title-ref} compilation on older g++ versions (#1110)
- Fix clang-tidy warnings across tests, examples, and samples (#1109)
- Add exception tracking with node backtrace (#990) (#1106)
- Fix #861
- Fix #917: add comments about preconditions
- Fix missing read_parameter_from_ports initialization in DelayNode (#1103)
- Fix #880: createTreeFromText now finds previously registered subtrees (#1105)
- Remove lexy dependency, replace with hand-written tokenizer and Pratt parser (#1099)
- Fix
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Launch files
Messages
Services
Plugins
Recent questions tagged behaviortree_cpp at Robotics Stack Exchange
|
behaviortree_cpp package from behaviortree_cpp_v3 repobehaviortree_cpp |
ROS Distro
|
Package Summary
| Version | 4.9.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-07-06 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Davide Faconti
Authors
- Davide Faconti
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.

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
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.
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.9.1 (2026-07-06)
-
Merge pull request #1139 from mini-1235/patch-3 Fix -Wfree-nonheap-object and -Wunused-result
-
Fix -Wfree-nonheap-object and -Wnull-dereference
-
Merge pull request #1128 from XinyuKhan/patch-1 Rename header guard for shared_library.h
-
Rename header guard for shared_library.h
-
Merge pull request #1126 from BehaviorTree/dependabot/github_actions/prefix-dev/setup-pixi-0.9.5 Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5
-
Merge pull request #1127 from botsandus/add-sleep-override Add [Tree::wakeUpSignal()]{.title-ref} getter
-
Merge pull request #1121 from PickNikRobotics/fix-subtree-literal-numeric-types Preserve numeric types for literal subtree port values
-
version 2
-
lint
-
Add support for custom sleep override function in Tree class
-
Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5 Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/v0.9.4...v0.9.5) ---updated-dependencies:
- dependency-name: prefix-dev/setup-pixi dependency-version: 0.9.5 dependency-type: direct:production update-type: version-update:semver-patch ...
-
Preserve numeric types for literal subtree port values When literal values are passed to SubTree ports (not blackboard remapping), detect numeric types (int64_t, double) before storing them in the child blackboard. Previously all literals were stored as std::string, which caused type-mismatch errors in Script expressions that tried to do arithmetic. Co-Authored-By: Claude Opus 4.6 <<noreply@anthropic.com>>
-
Contributors: Davide Faconti, Ladislav Skvarka, Tony Najjar, Xinyu Han, dependabot[bot], mini-1235
4.9.0 (2026-02-11)
- Fix Blackboard thread-safety: 6 data races fixed, use shared_mutex for storage
- Fix XML parser null pointer dereference in loadSubtreeModel on missing SubTree ID
- Add TryCatch control node for try/catch recovery patterns
- Fix #1111: EntryUpdatedDecorator::halt() not halting its child (#1112)
- Add polymorphic shared_ptr port support (#943) (#1107)
- Fix [std::from_chars]{.title-ref} compilation on older g++ versions (#1110)
- Fix clang-tidy warnings across tests, examples, and samples (#1109)
- Add exception tracking with node backtrace (#990) (#1106)
- Fix #861
- Fix #917: add comments about preconditions
- Fix missing read_parameter_from_ports initialization in DelayNode (#1103)
- Fix #880: createTreeFromText now finds previously registered subtrees (#1105)
- Remove lexy dependency, replace with hand-written tokenizer and Pratt parser (#1099)
- Fix
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged behaviortree_cpp at Robotics Stack Exchange
|
behaviortree_cpp package from behaviortree_cpp_v3 repobehaviortree_cpp |
ROS Distro
|
Package Summary
| Version | 4.9.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-07-06 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Davide Faconti
Authors
- Davide Faconti
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.

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
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.
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.9.1 (2026-07-06)
-
Merge pull request #1139 from mini-1235/patch-3 Fix -Wfree-nonheap-object and -Wunused-result
-
Fix -Wfree-nonheap-object and -Wnull-dereference
-
Merge pull request #1128 from XinyuKhan/patch-1 Rename header guard for shared_library.h
-
Rename header guard for shared_library.h
-
Merge pull request #1126 from BehaviorTree/dependabot/github_actions/prefix-dev/setup-pixi-0.9.5 Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5
-
Merge pull request #1127 from botsandus/add-sleep-override Add [Tree::wakeUpSignal()]{.title-ref} getter
-
Merge pull request #1121 from PickNikRobotics/fix-subtree-literal-numeric-types Preserve numeric types for literal subtree port values
-
version 2
-
lint
-
Add support for custom sleep override function in Tree class
-
Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5 Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/v0.9.4...v0.9.5) ---updated-dependencies:
- dependency-name: prefix-dev/setup-pixi dependency-version: 0.9.5 dependency-type: direct:production update-type: version-update:semver-patch ...
-
Preserve numeric types for literal subtree port values When literal values are passed to SubTree ports (not blackboard remapping), detect numeric types (int64_t, double) before storing them in the child blackboard. Previously all literals were stored as std::string, which caused type-mismatch errors in Script expressions that tried to do arithmetic. Co-Authored-By: Claude Opus 4.6 <<noreply@anthropic.com>>
-
Contributors: Davide Faconti, Ladislav Skvarka, Tony Najjar, Xinyu Han, dependabot[bot], mini-1235
4.9.0 (2026-02-11)
- Fix Blackboard thread-safety: 6 data races fixed, use shared_mutex for storage
- Fix XML parser null pointer dereference in loadSubtreeModel on missing SubTree ID
- Add TryCatch control node for try/catch recovery patterns
- Fix #1111: EntryUpdatedDecorator::halt() not halting its child (#1112)
- Add polymorphic shared_ptr port support (#943) (#1107)
- Fix [std::from_chars]{.title-ref} compilation on older g++ versions (#1110)
- Fix clang-tidy warnings across tests, examples, and samples (#1109)
- Add exception tracking with node backtrace (#990) (#1106)
- Fix #861
- Fix #917: add comments about preconditions
- Fix missing read_parameter_from_ports initialization in DelayNode (#1103)
- Fix #880: createTreeFromText now finds previously registered subtrees (#1105)
- Remove lexy dependency, replace with hand-written tokenizer and Pratt parser (#1099)
- Fix
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| ffw_navigation | |
| auto_apms_behavior_tree_core |
Launch files
Messages
Services
Plugins
Recent questions tagged behaviortree_cpp at Robotics Stack Exchange
|
behaviortree_cpp package from behaviortree_cpp_v3 repobehaviortree_cpp |
ROS Distro
|
Package Summary
| Version | 4.9.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-07-06 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Davide Faconti
Authors
- Davide Faconti
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.

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
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.
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.9.1 (2026-07-06)
-
Merge pull request #1139 from mini-1235/patch-3 Fix -Wfree-nonheap-object and -Wunused-result
-
Fix -Wfree-nonheap-object and -Wnull-dereference
-
Merge pull request #1128 from XinyuKhan/patch-1 Rename header guard for shared_library.h
-
Rename header guard for shared_library.h
-
Merge pull request #1126 from BehaviorTree/dependabot/github_actions/prefix-dev/setup-pixi-0.9.5 Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5
-
Merge pull request #1127 from botsandus/add-sleep-override Add [Tree::wakeUpSignal()]{.title-ref} getter
-
Merge pull request #1121 from PickNikRobotics/fix-subtree-literal-numeric-types Preserve numeric types for literal subtree port values
-
version 2
-
lint
-
Add support for custom sleep override function in Tree class
-
Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5 Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/v0.9.4...v0.9.5) ---updated-dependencies:
- dependency-name: prefix-dev/setup-pixi dependency-version: 0.9.5 dependency-type: direct:production update-type: version-update:semver-patch ...
-
Preserve numeric types for literal subtree port values When literal values are passed to SubTree ports (not blackboard remapping), detect numeric types (int64_t, double) before storing them in the child blackboard. Previously all literals were stored as std::string, which caused type-mismatch errors in Script expressions that tried to do arithmetic. Co-Authored-By: Claude Opus 4.6 <<noreply@anthropic.com>>
-
Contributors: Davide Faconti, Ladislav Skvarka, Tony Najjar, Xinyu Han, dependabot[bot], mini-1235
4.9.0 (2026-02-11)
- Fix Blackboard thread-safety: 6 data races fixed, use shared_mutex for storage
- Fix XML parser null pointer dereference in loadSubtreeModel on missing SubTree ID
- Add TryCatch control node for try/catch recovery patterns
- Fix #1111: EntryUpdatedDecorator::halt() not halting its child (#1112)
- Add polymorphic shared_ptr port support (#943) (#1107)
- Fix [std::from_chars]{.title-ref} compilation on older g++ versions (#1110)
- Fix clang-tidy warnings across tests, examples, and samples (#1109)
- Add exception tracking with node backtrace (#990) (#1106)
- Fix #861
- Fix #917: add comments about preconditions
- Fix missing read_parameter_from_ports initialization in DelayNode (#1103)
- Fix #880: createTreeFromText now finds previously registered subtrees (#1105)
- Remove lexy dependency, replace with hand-written tokenizer and Pratt parser (#1099)
- Fix
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| ffw_navigation | |
| auto_apms_behavior_tree_core |
Launch files
Messages
Services
Plugins
Recent questions tagged behaviortree_cpp at Robotics Stack Exchange
|
behaviortree_cpp package from behaviortree_cpp_v3 repobehaviortree_cpp |
ROS Distro
|
Package Summary
| Version | 4.9.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-07-06 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Davide Faconti
Authors
- Davide Faconti
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.

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
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.
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.9.1 (2026-07-06)
-
Merge pull request #1139 from mini-1235/patch-3 Fix -Wfree-nonheap-object and -Wunused-result
-
Fix -Wfree-nonheap-object and -Wnull-dereference
-
Merge pull request #1128 from XinyuKhan/patch-1 Rename header guard for shared_library.h
-
Rename header guard for shared_library.h
-
Merge pull request #1126 from BehaviorTree/dependabot/github_actions/prefix-dev/setup-pixi-0.9.5 Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5
-
Merge pull request #1127 from botsandus/add-sleep-override Add [Tree::wakeUpSignal()]{.title-ref} getter
-
Merge pull request #1121 from PickNikRobotics/fix-subtree-literal-numeric-types Preserve numeric types for literal subtree port values
-
version 2
-
lint
-
Add support for custom sleep override function in Tree class
-
Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5 Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/v0.9.4...v0.9.5) ---updated-dependencies:
- dependency-name: prefix-dev/setup-pixi dependency-version: 0.9.5 dependency-type: direct:production update-type: version-update:semver-patch ...
-
Preserve numeric types for literal subtree port values When literal values are passed to SubTree ports (not blackboard remapping), detect numeric types (int64_t, double) before storing them in the child blackboard. Previously all literals were stored as std::string, which caused type-mismatch errors in Script expressions that tried to do arithmetic. Co-Authored-By: Claude Opus 4.6 <<noreply@anthropic.com>>
-
Contributors: Davide Faconti, Ladislav Skvarka, Tony Najjar, Xinyu Han, dependabot[bot], mini-1235
4.9.0 (2026-02-11)
- Fix Blackboard thread-safety: 6 data races fixed, use shared_mutex for storage
- Fix XML parser null pointer dereference in loadSubtreeModel on missing SubTree ID
- Add TryCatch control node for try/catch recovery patterns
- Fix #1111: EntryUpdatedDecorator::halt() not halting its child (#1112)
- Add polymorphic shared_ptr port support (#943) (#1107)
- Fix [std::from_chars]{.title-ref} compilation on older g++ versions (#1110)
- Fix clang-tidy warnings across tests, examples, and samples (#1109)
- Add exception tracking with node backtrace (#990) (#1106)
- Fix #861
- Fix #917: add comments about preconditions
- Fix missing read_parameter_from_ports initialization in DelayNode (#1103)
- Fix #880: createTreeFromText now finds previously registered subtrees (#1105)
- Remove lexy dependency, replace with hand-written tokenizer and Pratt parser (#1099)
- Fix
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged behaviortree_cpp at Robotics Stack Exchange
|
behaviortree_cpp package from behaviortree_cpp_v3 repobehaviortree_cpp |
ROS Distro
|
Package Summary
| Version | 4.9.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-07-06 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Davide Faconti
Authors
- Davide Faconti
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.

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
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.
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.9.1 (2026-07-06)
-
Merge pull request #1139 from mini-1235/patch-3 Fix -Wfree-nonheap-object and -Wunused-result
-
Fix -Wfree-nonheap-object and -Wnull-dereference
-
Merge pull request #1128 from XinyuKhan/patch-1 Rename header guard for shared_library.h
-
Rename header guard for shared_library.h
-
Merge pull request #1126 from BehaviorTree/dependabot/github_actions/prefix-dev/setup-pixi-0.9.5 Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5
-
Merge pull request #1127 from botsandus/add-sleep-override Add [Tree::wakeUpSignal()]{.title-ref} getter
-
Merge pull request #1121 from PickNikRobotics/fix-subtree-literal-numeric-types Preserve numeric types for literal subtree port values
-
version 2
-
lint
-
Add support for custom sleep override function in Tree class
-
Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5 Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/v0.9.4...v0.9.5) ---updated-dependencies:
- dependency-name: prefix-dev/setup-pixi dependency-version: 0.9.5 dependency-type: direct:production update-type: version-update:semver-patch ...
-
Preserve numeric types for literal subtree port values When literal values are passed to SubTree ports (not blackboard remapping), detect numeric types (int64_t, double) before storing them in the child blackboard. Previously all literals were stored as std::string, which caused type-mismatch errors in Script expressions that tried to do arithmetic. Co-Authored-By: Claude Opus 4.6 <<noreply@anthropic.com>>
-
Contributors: Davide Faconti, Ladislav Skvarka, Tony Najjar, Xinyu Han, dependabot[bot], mini-1235
4.9.0 (2026-02-11)
- Fix Blackboard thread-safety: 6 data races fixed, use shared_mutex for storage
- Fix XML parser null pointer dereference in loadSubtreeModel on missing SubTree ID
- Add TryCatch control node for try/catch recovery patterns
- Fix #1111: EntryUpdatedDecorator::halt() not halting its child (#1112)
- Add polymorphic shared_ptr port support (#943) (#1107)
- Fix [std::from_chars]{.title-ref} compilation on older g++ versions (#1110)
- Fix clang-tidy warnings across tests, examples, and samples (#1109)
- Add exception tracking with node backtrace (#990) (#1106)
- Fix #861
- Fix #917: add comments about preconditions
- Fix missing read_parameter_from_ports initialization in DelayNode (#1103)
- Fix #880: createTreeFromText now finds previously registered subtrees (#1105)
- Remove lexy dependency, replace with hand-written tokenizer and Pratt parser (#1099)
- Fix
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged behaviortree_cpp at Robotics Stack Exchange
|
behaviortree_cpp package from behaviortree_cpp_v3 repobehaviortree_cpp |
ROS Distro
|
Package Summary
| Version | 4.9.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-07-06 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Davide Faconti
Authors
- Davide Faconti
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.

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
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.
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.9.1 (2026-07-06)
-
Merge pull request #1139 from mini-1235/patch-3 Fix -Wfree-nonheap-object and -Wunused-result
-
Fix -Wfree-nonheap-object and -Wnull-dereference
-
Merge pull request #1128 from XinyuKhan/patch-1 Rename header guard for shared_library.h
-
Rename header guard for shared_library.h
-
Merge pull request #1126 from BehaviorTree/dependabot/github_actions/prefix-dev/setup-pixi-0.9.5 Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5
-
Merge pull request #1127 from botsandus/add-sleep-override Add [Tree::wakeUpSignal()]{.title-ref} getter
-
Merge pull request #1121 from PickNikRobotics/fix-subtree-literal-numeric-types Preserve numeric types for literal subtree port values
-
version 2
-
lint
-
Add support for custom sleep override function in Tree class
-
Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5 Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/v0.9.4...v0.9.5) ---updated-dependencies:
- dependency-name: prefix-dev/setup-pixi dependency-version: 0.9.5 dependency-type: direct:production update-type: version-update:semver-patch ...
-
Preserve numeric types for literal subtree port values When literal values are passed to SubTree ports (not blackboard remapping), detect numeric types (int64_t, double) before storing them in the child blackboard. Previously all literals were stored as std::string, which caused type-mismatch errors in Script expressions that tried to do arithmetic. Co-Authored-By: Claude Opus 4.6 <<noreply@anthropic.com>>
-
Contributors: Davide Faconti, Ladislav Skvarka, Tony Najjar, Xinyu Han, dependabot[bot], mini-1235
4.9.0 (2026-02-11)
- Fix Blackboard thread-safety: 6 data races fixed, use shared_mutex for storage
- Fix XML parser null pointer dereference in loadSubtreeModel on missing SubTree ID
- Add TryCatch control node for try/catch recovery patterns
- Fix #1111: EntryUpdatedDecorator::halt() not halting its child (#1112)
- Add polymorphic shared_ptr port support (#943) (#1107)
- Fix [std::from_chars]{.title-ref} compilation on older g++ versions (#1110)
- Fix clang-tidy warnings across tests, examples, and samples (#1109)
- Add exception tracking with node backtrace (#990) (#1106)
- Fix #861
- Fix #917: add comments about preconditions
- Fix missing read_parameter_from_ports initialization in DelayNode (#1103)
- Fix #880: createTreeFromText now finds previously registered subtrees (#1105)
- Remove lexy dependency, replace with hand-written tokenizer and Pratt parser (#1099)
- Fix
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
| Name | Deps |
|---|---|
| nav2_bt_navigator | |
| nav2_mission_executor | |
| nav2_tasks |
Launch files
Messages
Services
Plugins
Recent questions tagged behaviortree_cpp at Robotics Stack Exchange
|
behaviortree_cpp package from behaviortree_cpp_v3 repobehaviortree_cpp |
ROS Distro
|
Package Summary
| Version | 4.9.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-07-06 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Davide Faconti
Authors
- Davide Faconti
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.

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
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.
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.9.1 (2026-07-06)
-
Merge pull request #1139 from mini-1235/patch-3 Fix -Wfree-nonheap-object and -Wunused-result
-
Fix -Wfree-nonheap-object and -Wnull-dereference
-
Merge pull request #1128 from XinyuKhan/patch-1 Rename header guard for shared_library.h
-
Rename header guard for shared_library.h
-
Merge pull request #1126 from BehaviorTree/dependabot/github_actions/prefix-dev/setup-pixi-0.9.5 Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5
-
Merge pull request #1127 from botsandus/add-sleep-override Add [Tree::wakeUpSignal()]{.title-ref} getter
-
Merge pull request #1121 from PickNikRobotics/fix-subtree-literal-numeric-types Preserve numeric types for literal subtree port values
-
version 2
-
lint
-
Add support for custom sleep override function in Tree class
-
Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5 Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/v0.9.4...v0.9.5) ---updated-dependencies:
- dependency-name: prefix-dev/setup-pixi dependency-version: 0.9.5 dependency-type: direct:production update-type: version-update:semver-patch ...
-
Preserve numeric types for literal subtree port values When literal values are passed to SubTree ports (not blackboard remapping), detect numeric types (int64_t, double) before storing them in the child blackboard. Previously all literals were stored as std::string, which caused type-mismatch errors in Script expressions that tried to do arithmetic. Co-Authored-By: Claude Opus 4.6 <<noreply@anthropic.com>>
-
Contributors: Davide Faconti, Ladislav Skvarka, Tony Najjar, Xinyu Han, dependabot[bot], mini-1235
4.9.0 (2026-02-11)
- Fix Blackboard thread-safety: 6 data races fixed, use shared_mutex for storage
- Fix XML parser null pointer dereference in loadSubtreeModel on missing SubTree ID
- Add TryCatch control node for try/catch recovery patterns
- Fix #1111: EntryUpdatedDecorator::halt() not halting its child (#1112)
- Add polymorphic shared_ptr port support (#943) (#1107)
- Fix [std::from_chars]{.title-ref} compilation on older g++ versions (#1110)
- Fix clang-tidy warnings across tests, examples, and samples (#1109)
- Add exception tracking with node backtrace (#990) (#1106)
- Fix #861
- Fix #917: add comments about preconditions
- Fix missing read_parameter_from_ports initialization in DelayNode (#1103)
- Fix #880: createTreeFromText now finds previously registered subtrees (#1105)
- Remove lexy dependency, replace with hand-written tokenizer and Pratt parser (#1099)
- Fix
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged behaviortree_cpp at Robotics Stack Exchange
|
behaviortree_cpp package from behaviortree_cpp_v3 repobehaviortree_cpp |
ROS Distro
|
Package Summary
| Version | 4.9.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-07-06 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Davide Faconti
Authors
- Davide Faconti
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.

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
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.
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.9.1 (2026-07-06)
-
Merge pull request #1139 from mini-1235/patch-3 Fix -Wfree-nonheap-object and -Wunused-result
-
Fix -Wfree-nonheap-object and -Wnull-dereference
-
Merge pull request #1128 from XinyuKhan/patch-1 Rename header guard for shared_library.h
-
Rename header guard for shared_library.h
-
Merge pull request #1126 from BehaviorTree/dependabot/github_actions/prefix-dev/setup-pixi-0.9.5 Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5
-
Merge pull request #1127 from botsandus/add-sleep-override Add [Tree::wakeUpSignal()]{.title-ref} getter
-
Merge pull request #1121 from PickNikRobotics/fix-subtree-literal-numeric-types Preserve numeric types for literal subtree port values
-
version 2
-
lint
-
Add support for custom sleep override function in Tree class
-
Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5 Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/v0.9.4...v0.9.5) ---updated-dependencies:
- dependency-name: prefix-dev/setup-pixi dependency-version: 0.9.5 dependency-type: direct:production update-type: version-update:semver-patch ...
-
Preserve numeric types for literal subtree port values When literal values are passed to SubTree ports (not blackboard remapping), detect numeric types (int64_t, double) before storing them in the child blackboard. Previously all literals were stored as std::string, which caused type-mismatch errors in Script expressions that tried to do arithmetic. Co-Authored-By: Claude Opus 4.6 <<noreply@anthropic.com>>
-
Contributors: Davide Faconti, Ladislav Skvarka, Tony Najjar, Xinyu Han, dependabot[bot], mini-1235
4.9.0 (2026-02-11)
- Fix Blackboard thread-safety: 6 data races fixed, use shared_mutex for storage
- Fix XML parser null pointer dereference in loadSubtreeModel on missing SubTree ID
- Add TryCatch control node for try/catch recovery patterns
- Fix #1111: EntryUpdatedDecorator::halt() not halting its child (#1112)
- Add polymorphic shared_ptr port support (#943) (#1107)
- Fix [std::from_chars]{.title-ref} compilation on older g++ versions (#1110)
- Fix clang-tidy warnings across tests, examples, and samples (#1109)
- Add exception tracking with node backtrace (#990) (#1106)
- Fix #861
- Fix #917: add comments about preconditions
- Fix missing read_parameter_from_ports initialization in DelayNode (#1103)
- Fix #880: createTreeFromText now finds previously registered subtrees (#1105)
- Remove lexy dependency, replace with hand-written tokenizer and Pratt parser (#1099)
- Fix
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged behaviortree_cpp at Robotics Stack Exchange
|
behaviortree_cpp package from behaviortree_cpp_v3 repobehaviortree_cpp |
ROS Distro
|
Package Summary
| Version | 4.9.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-07-06 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Davide Faconti
Authors
- Davide Faconti
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.

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
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.
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.9.1 (2026-07-06)
-
Merge pull request #1139 from mini-1235/patch-3 Fix -Wfree-nonheap-object and -Wunused-result
-
Fix -Wfree-nonheap-object and -Wnull-dereference
-
Merge pull request #1128 from XinyuKhan/patch-1 Rename header guard for shared_library.h
-
Rename header guard for shared_library.h
-
Merge pull request #1126 from BehaviorTree/dependabot/github_actions/prefix-dev/setup-pixi-0.9.5 Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5
-
Merge pull request #1127 from botsandus/add-sleep-override Add [Tree::wakeUpSignal()]{.title-ref} getter
-
Merge pull request #1121 from PickNikRobotics/fix-subtree-literal-numeric-types Preserve numeric types for literal subtree port values
-
version 2
-
lint
-
Add support for custom sleep override function in Tree class
-
Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5 Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/v0.9.4...v0.9.5) ---updated-dependencies:
- dependency-name: prefix-dev/setup-pixi dependency-version: 0.9.5 dependency-type: direct:production update-type: version-update:semver-patch ...
-
Preserve numeric types for literal subtree port values When literal values are passed to SubTree ports (not blackboard remapping), detect numeric types (int64_t, double) before storing them in the child blackboard. Previously all literals were stored as std::string, which caused type-mismatch errors in Script expressions that tried to do arithmetic. Co-Authored-By: Claude Opus 4.6 <<noreply@anthropic.com>>
-
Contributors: Davide Faconti, Ladislav Skvarka, Tony Najjar, Xinyu Han, dependabot[bot], mini-1235
4.9.0 (2026-02-11)
- Fix Blackboard thread-safety: 6 data races fixed, use shared_mutex for storage
- Fix XML parser null pointer dereference in loadSubtreeModel on missing SubTree ID
- Add TryCatch control node for try/catch recovery patterns
- Fix #1111: EntryUpdatedDecorator::halt() not halting its child (#1112)
- Add polymorphic shared_ptr port support (#943) (#1107)
- Fix [std::from_chars]{.title-ref} compilation on older g++ versions (#1110)
- Fix clang-tidy warnings across tests, examples, and samples (#1109)
- Add exception tracking with node backtrace (#990) (#1106)
- Fix #861
- Fix #917: add comments about preconditions
- Fix missing read_parameter_from_ports initialization in DelayNode (#1103)
- Fix #880: createTreeFromText now finds previously registered subtrees (#1105)
- Remove lexy dependency, replace with hand-written tokenizer and Pratt parser (#1099)
- Fix
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged behaviortree_cpp at Robotics Stack Exchange
|
behaviortree_cpp package from behaviortree_cpp_v3 repobehaviortree_cpp |
ROS Distro
|
Package Summary
| Version | 4.9.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-07-06 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Davide Faconti
Authors
- Davide Faconti
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.

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
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.
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.9.1 (2026-07-06)
-
Merge pull request #1139 from mini-1235/patch-3 Fix -Wfree-nonheap-object and -Wunused-result
-
Fix -Wfree-nonheap-object and -Wnull-dereference
-
Merge pull request #1128 from XinyuKhan/patch-1 Rename header guard for shared_library.h
-
Rename header guard for shared_library.h
-
Merge pull request #1126 from BehaviorTree/dependabot/github_actions/prefix-dev/setup-pixi-0.9.5 Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5
-
Merge pull request #1127 from botsandus/add-sleep-override Add [Tree::wakeUpSignal()]{.title-ref} getter
-
Merge pull request #1121 from PickNikRobotics/fix-subtree-literal-numeric-types Preserve numeric types for literal subtree port values
-
version 2
-
lint
-
Add support for custom sleep override function in Tree class
-
Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5 Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/v0.9.4...v0.9.5) ---updated-dependencies:
- dependency-name: prefix-dev/setup-pixi dependency-version: 0.9.5 dependency-type: direct:production update-type: version-update:semver-patch ...
-
Preserve numeric types for literal subtree port values When literal values are passed to SubTree ports (not blackboard remapping), detect numeric types (int64_t, double) before storing them in the child blackboard. Previously all literals were stored as std::string, which caused type-mismatch errors in Script expressions that tried to do arithmetic. Co-Authored-By: Claude Opus 4.6 <<noreply@anthropic.com>>
-
Contributors: Davide Faconti, Ladislav Skvarka, Tony Najjar, Xinyu Han, dependabot[bot], mini-1235
4.9.0 (2026-02-11)
- Fix Blackboard thread-safety: 6 data races fixed, use shared_mutex for storage
- Fix XML parser null pointer dereference in loadSubtreeModel on missing SubTree ID
- Add TryCatch control node for try/catch recovery patterns
- Fix #1111: EntryUpdatedDecorator::halt() not halting its child (#1112)
- Add polymorphic shared_ptr port support (#943) (#1107)
- Fix [std::from_chars]{.title-ref} compilation on older g++ versions (#1110)
- Fix clang-tidy warnings across tests, examples, and samples (#1109)
- Add exception tracking with node backtrace (#990) (#1106)
- Fix #861
- Fix #917: add comments about preconditions
- Fix missing read_parameter_from_ports initialization in DelayNode (#1103)
- Fix #880: createTreeFromText now finds previously registered subtrees (#1105)
- Remove lexy dependency, replace with hand-written tokenizer and Pratt parser (#1099)
- Fix
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged behaviortree_cpp at Robotics Stack Exchange
|
behaviortree_cpp package from behaviortree_cpp_v3 repobehaviortree_cpp |
ROS Distro
|
Package Summary
| Version | 4.9.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-07-06 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Davide Faconti
Authors
- Davide Faconti
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.

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
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.
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.9.1 (2026-07-06)
-
Merge pull request #1139 from mini-1235/patch-3 Fix -Wfree-nonheap-object and -Wunused-result
-
Fix -Wfree-nonheap-object and -Wnull-dereference
-
Merge pull request #1128 from XinyuKhan/patch-1 Rename header guard for shared_library.h
-
Rename header guard for shared_library.h
-
Merge pull request #1126 from BehaviorTree/dependabot/github_actions/prefix-dev/setup-pixi-0.9.5 Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5
-
Merge pull request #1127 from botsandus/add-sleep-override Add [Tree::wakeUpSignal()]{.title-ref} getter
-
Merge pull request #1121 from PickNikRobotics/fix-subtree-literal-numeric-types Preserve numeric types for literal subtree port values
-
version 2
-
lint
-
Add support for custom sleep override function in Tree class
-
Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5 Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/v0.9.4...v0.9.5) ---updated-dependencies:
- dependency-name: prefix-dev/setup-pixi dependency-version: 0.9.5 dependency-type: direct:production update-type: version-update:semver-patch ...
-
Preserve numeric types for literal subtree port values When literal values are passed to SubTree ports (not blackboard remapping), detect numeric types (int64_t, double) before storing them in the child blackboard. Previously all literals were stored as std::string, which caused type-mismatch errors in Script expressions that tried to do arithmetic. Co-Authored-By: Claude Opus 4.6 <<noreply@anthropic.com>>
-
Contributors: Davide Faconti, Ladislav Skvarka, Tony Najjar, Xinyu Han, dependabot[bot], mini-1235
4.9.0 (2026-02-11)
- Fix Blackboard thread-safety: 6 data races fixed, use shared_mutex for storage
- Fix XML parser null pointer dereference in loadSubtreeModel on missing SubTree ID
- Add TryCatch control node for try/catch recovery patterns
- Fix #1111: EntryUpdatedDecorator::halt() not halting its child (#1112)
- Add polymorphic shared_ptr port support (#943) (#1107)
- Fix [std::from_chars]{.title-ref} compilation on older g++ versions (#1110)
- Fix clang-tidy warnings across tests, examples, and samples (#1109)
- Add exception tracking with node backtrace (#990) (#1106)
- Fix #861
- Fix #917: add comments about preconditions
- Fix missing read_parameter_from_ports initialization in DelayNode (#1103)
- Fix #880: createTreeFromText now finds previously registered subtrees (#1105)
- Remove lexy dependency, replace with hand-written tokenizer and Pratt parser (#1099)
- Fix
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged behaviortree_cpp at Robotics Stack Exchange
|
behaviortree_cpp package from behaviortree_cpp_v3 repobehaviortree_cpp |
ROS Distro
|
Package Summary
| Version | 4.9.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-07-06 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Davide Faconti
Authors
- Davide Faconti
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.

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
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.
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.9.1 (2026-07-06)
-
Merge pull request #1139 from mini-1235/patch-3 Fix -Wfree-nonheap-object and -Wunused-result
-
Fix -Wfree-nonheap-object and -Wnull-dereference
-
Merge pull request #1128 from XinyuKhan/patch-1 Rename header guard for shared_library.h
-
Rename header guard for shared_library.h
-
Merge pull request #1126 from BehaviorTree/dependabot/github_actions/prefix-dev/setup-pixi-0.9.5 Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5
-
Merge pull request #1127 from botsandus/add-sleep-override Add [Tree::wakeUpSignal()]{.title-ref} getter
-
Merge pull request #1121 from PickNikRobotics/fix-subtree-literal-numeric-types Preserve numeric types for literal subtree port values
-
version 2
-
lint
-
Add support for custom sleep override function in Tree class
-
Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5 Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/v0.9.4...v0.9.5) ---updated-dependencies:
- dependency-name: prefix-dev/setup-pixi dependency-version: 0.9.5 dependency-type: direct:production update-type: version-update:semver-patch ...
-
Preserve numeric types for literal subtree port values When literal values are passed to SubTree ports (not blackboard remapping), detect numeric types (int64_t, double) before storing them in the child blackboard. Previously all literals were stored as std::string, which caused type-mismatch errors in Script expressions that tried to do arithmetic. Co-Authored-By: Claude Opus 4.6 <<noreply@anthropic.com>>
-
Contributors: Davide Faconti, Ladislav Skvarka, Tony Najjar, Xinyu Han, dependabot[bot], mini-1235
4.9.0 (2026-02-11)
- Fix Blackboard thread-safety: 6 data races fixed, use shared_mutex for storage
- Fix XML parser null pointer dereference in loadSubtreeModel on missing SubTree ID
- Add TryCatch control node for try/catch recovery patterns
- Fix #1111: EntryUpdatedDecorator::halt() not halting its child (#1112)
- Add polymorphic shared_ptr port support (#943) (#1107)
- Fix [std::from_chars]{.title-ref} compilation on older g++ versions (#1110)
- Fix clang-tidy warnings across tests, examples, and samples (#1109)
- Add exception tracking with node backtrace (#990) (#1106)
- Fix #861
- Fix #917: add comments about preconditions
- Fix missing read_parameter_from_ports initialization in DelayNode (#1103)
- Fix #880: createTreeFromText now finds previously registered subtrees (#1105)
- Remove lexy dependency, replace with hand-written tokenizer and Pratt parser (#1099)
- Fix
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged behaviortree_cpp at Robotics Stack Exchange
|
behaviortree_cpp package from behaviortree_cpp_v3 repobehaviortree_cpp |
ROS Distro
|
Package Summary
| Version | 4.9.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-07-06 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Davide Faconti
Authors
- Davide Faconti
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.

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
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.
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.9.1 (2026-07-06)
-
Merge pull request #1139 from mini-1235/patch-3 Fix -Wfree-nonheap-object and -Wunused-result
-
Fix -Wfree-nonheap-object and -Wnull-dereference
-
Merge pull request #1128 from XinyuKhan/patch-1 Rename header guard for shared_library.h
-
Rename header guard for shared_library.h
-
Merge pull request #1126 from BehaviorTree/dependabot/github_actions/prefix-dev/setup-pixi-0.9.5 Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5
-
Merge pull request #1127 from botsandus/add-sleep-override Add [Tree::wakeUpSignal()]{.title-ref} getter
-
Merge pull request #1121 from PickNikRobotics/fix-subtree-literal-numeric-types Preserve numeric types for literal subtree port values
-
version 2
-
lint
-
Add support for custom sleep override function in Tree class
-
Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5 Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/v0.9.4...v0.9.5) ---updated-dependencies:
- dependency-name: prefix-dev/setup-pixi dependency-version: 0.9.5 dependency-type: direct:production update-type: version-update:semver-patch ...
-
Preserve numeric types for literal subtree port values When literal values are passed to SubTree ports (not blackboard remapping), detect numeric types (int64_t, double) before storing them in the child blackboard. Previously all literals were stored as std::string, which caused type-mismatch errors in Script expressions that tried to do arithmetic. Co-Authored-By: Claude Opus 4.6 <<noreply@anthropic.com>>
-
Contributors: Davide Faconti, Ladislav Skvarka, Tony Najjar, Xinyu Han, dependabot[bot], mini-1235
4.9.0 (2026-02-11)
- Fix Blackboard thread-safety: 6 data races fixed, use shared_mutex for storage
- Fix XML parser null pointer dereference in loadSubtreeModel on missing SubTree ID
- Add TryCatch control node for try/catch recovery patterns
- Fix #1111: EntryUpdatedDecorator::halt() not halting its child (#1112)
- Add polymorphic shared_ptr port support (#943) (#1107)
- Fix [std::from_chars]{.title-ref} compilation on older g++ versions (#1110)
- Fix clang-tidy warnings across tests, examples, and samples (#1109)
- Add exception tracking with node backtrace (#990) (#1106)
- Fix #861
- Fix #917: add comments about preconditions
- Fix missing read_parameter_from_ports initialization in DelayNode (#1103)
- Fix #880: createTreeFromText now finds previously registered subtrees (#1105)
- Remove lexy dependency, replace with hand-written tokenizer and Pratt parser (#1099)
- Fix
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged behaviortree_cpp at Robotics Stack Exchange
|
behaviortree_cpp package from behaviortree_cpp_v3 repobehaviortree_cpp |
ROS Distro
|
Package Summary
| Version | 4.9.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-07-06 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Davide Faconti
Authors
- Davide Faconti
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.

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
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.
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.9.1 (2026-07-06)
-
Merge pull request #1139 from mini-1235/patch-3 Fix -Wfree-nonheap-object and -Wunused-result
-
Fix -Wfree-nonheap-object and -Wnull-dereference
-
Merge pull request #1128 from XinyuKhan/patch-1 Rename header guard for shared_library.h
-
Rename header guard for shared_library.h
-
Merge pull request #1126 from BehaviorTree/dependabot/github_actions/prefix-dev/setup-pixi-0.9.5 Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5
-
Merge pull request #1127 from botsandus/add-sleep-override Add [Tree::wakeUpSignal()]{.title-ref} getter
-
Merge pull request #1121 from PickNikRobotics/fix-subtree-literal-numeric-types Preserve numeric types for literal subtree port values
-
version 2
-
lint
-
Add support for custom sleep override function in Tree class
-
Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5 Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/v0.9.4...v0.9.5) ---updated-dependencies:
- dependency-name: prefix-dev/setup-pixi dependency-version: 0.9.5 dependency-type: direct:production update-type: version-update:semver-patch ...
-
Preserve numeric types for literal subtree port values When literal values are passed to SubTree ports (not blackboard remapping), detect numeric types (int64_t, double) before storing them in the child blackboard. Previously all literals were stored as std::string, which caused type-mismatch errors in Script expressions that tried to do arithmetic. Co-Authored-By: Claude Opus 4.6 <<noreply@anthropic.com>>
-
Contributors: Davide Faconti, Ladislav Skvarka, Tony Najjar, Xinyu Han, dependabot[bot], mini-1235
4.9.0 (2026-02-11)
- Fix Blackboard thread-safety: 6 data races fixed, use shared_mutex for storage
- Fix XML parser null pointer dereference in loadSubtreeModel on missing SubTree ID
- Add TryCatch control node for try/catch recovery patterns
- Fix #1111: EntryUpdatedDecorator::halt() not halting its child (#1112)
- Add polymorphic shared_ptr port support (#943) (#1107)
- Fix [std::from_chars]{.title-ref} compilation on older g++ versions (#1110)
- Fix clang-tidy warnings across tests, examples, and samples (#1109)
- Add exception tracking with node backtrace (#990) (#1106)
- Fix #861
- Fix #917: add comments about preconditions
- Fix missing read_parameter_from_ports initialization in DelayNode (#1103)
- Fix #880: createTreeFromText now finds previously registered subtrees (#1105)
- Remove lexy dependency, replace with hand-written tokenizer and Pratt parser (#1099)
- Fix
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged behaviortree_cpp at Robotics Stack Exchange
|
behaviortree_cpp package from behaviortree_cpp_v3 repobehaviortree_cpp |
ROS Distro
|
Package Summary
| Version | 4.9.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-07-06 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Davide Faconti
Authors
- Davide Faconti
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.

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
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.
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.9.1 (2026-07-06)
-
Merge pull request #1139 from mini-1235/patch-3 Fix -Wfree-nonheap-object and -Wunused-result
-
Fix -Wfree-nonheap-object and -Wnull-dereference
-
Merge pull request #1128 from XinyuKhan/patch-1 Rename header guard for shared_library.h
-
Rename header guard for shared_library.h
-
Merge pull request #1126 from BehaviorTree/dependabot/github_actions/prefix-dev/setup-pixi-0.9.5 Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5
-
Merge pull request #1127 from botsandus/add-sleep-override Add [Tree::wakeUpSignal()]{.title-ref} getter
-
Merge pull request #1121 from PickNikRobotics/fix-subtree-literal-numeric-types Preserve numeric types for literal subtree port values
-
version 2
-
lint
-
Add support for custom sleep override function in Tree class
-
Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5 Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/v0.9.4...v0.9.5) ---updated-dependencies:
- dependency-name: prefix-dev/setup-pixi dependency-version: 0.9.5 dependency-type: direct:production update-type: version-update:semver-patch ...
-
Preserve numeric types for literal subtree port values When literal values are passed to SubTree ports (not blackboard remapping), detect numeric types (int64_t, double) before storing them in the child blackboard. Previously all literals were stored as std::string, which caused type-mismatch errors in Script expressions that tried to do arithmetic. Co-Authored-By: Claude Opus 4.6 <<noreply@anthropic.com>>
-
Contributors: Davide Faconti, Ladislav Skvarka, Tony Najjar, Xinyu Han, dependabot[bot], mini-1235
4.9.0 (2026-02-11)
- Fix Blackboard thread-safety: 6 data races fixed, use shared_mutex for storage
- Fix XML parser null pointer dereference in loadSubtreeModel on missing SubTree ID
- Add TryCatch control node for try/catch recovery patterns
- Fix #1111: EntryUpdatedDecorator::halt() not halting its child (#1112)
- Add polymorphic shared_ptr port support (#943) (#1107)
- Fix [std::from_chars]{.title-ref} compilation on older g++ versions (#1110)
- Fix clang-tidy warnings across tests, examples, and samples (#1109)
- Add exception tracking with node backtrace (#990) (#1106)
- Fix #861
- Fix #917: add comments about preconditions
- Fix missing read_parameter_from_ports initialization in DelayNode (#1103)
- Fix #880: createTreeFromText now finds previously registered subtrees (#1105)
- Remove lexy dependency, replace with hand-written tokenizer and Pratt parser (#1099)
- Fix
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged behaviortree_cpp at Robotics Stack Exchange
|
behaviortree_cpp package from behaviortree_cpp_v3 repobehaviortree_cpp |
ROS Distro
|
Package Summary
| Version | 4.9.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-07-06 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Davide Faconti
Authors
- Davide Faconti
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.

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
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.
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.9.1 (2026-07-06)
-
Merge pull request #1139 from mini-1235/patch-3 Fix -Wfree-nonheap-object and -Wunused-result
-
Fix -Wfree-nonheap-object and -Wnull-dereference
-
Merge pull request #1128 from XinyuKhan/patch-1 Rename header guard for shared_library.h
-
Rename header guard for shared_library.h
-
Merge pull request #1126 from BehaviorTree/dependabot/github_actions/prefix-dev/setup-pixi-0.9.5 Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5
-
Merge pull request #1127 from botsandus/add-sleep-override Add [Tree::wakeUpSignal()]{.title-ref} getter
-
Merge pull request #1121 from PickNikRobotics/fix-subtree-literal-numeric-types Preserve numeric types for literal subtree port values
-
version 2
-
lint
-
Add support for custom sleep override function in Tree class
-
Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5 Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/v0.9.4...v0.9.5) ---updated-dependencies:
- dependency-name: prefix-dev/setup-pixi dependency-version: 0.9.5 dependency-type: direct:production update-type: version-update:semver-patch ...
-
Preserve numeric types for literal subtree port values When literal values are passed to SubTree ports (not blackboard remapping), detect numeric types (int64_t, double) before storing them in the child blackboard. Previously all literals were stored as std::string, which caused type-mismatch errors in Script expressions that tried to do arithmetic. Co-Authored-By: Claude Opus 4.6 <<noreply@anthropic.com>>
-
Contributors: Davide Faconti, Ladislav Skvarka, Tony Najjar, Xinyu Han, dependabot[bot], mini-1235
4.9.0 (2026-02-11)
- Fix Blackboard thread-safety: 6 data races fixed, use shared_mutex for storage
- Fix XML parser null pointer dereference in loadSubtreeModel on missing SubTree ID
- Add TryCatch control node for try/catch recovery patterns
- Fix #1111: EntryUpdatedDecorator::halt() not halting its child (#1112)
- Add polymorphic shared_ptr port support (#943) (#1107)
- Fix [std::from_chars]{.title-ref} compilation on older g++ versions (#1110)
- Fix clang-tidy warnings across tests, examples, and samples (#1109)
- Add exception tracking with node backtrace (#990) (#1106)
- Fix #861
- Fix #917: add comments about preconditions
- Fix missing read_parameter_from_ports initialization in DelayNode (#1103)
- Fix #880: createTreeFromText now finds previously registered subtrees (#1105)
- Remove lexy dependency, replace with hand-written tokenizer and Pratt parser (#1099)
- Fix
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged behaviortree_cpp at Robotics Stack Exchange
|
behaviortree_cpp package from behaviortree_cpp_v3 repobehaviortree_cpp |
ROS Distro
|
Package Summary
| Version | 4.9.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-07-06 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Davide Faconti
Authors
- Davide Faconti
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.

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
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.
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.9.1 (2026-07-06)
-
Merge pull request #1139 from mini-1235/patch-3 Fix -Wfree-nonheap-object and -Wunused-result
-
Fix -Wfree-nonheap-object and -Wnull-dereference
-
Merge pull request #1128 from XinyuKhan/patch-1 Rename header guard for shared_library.h
-
Rename header guard for shared_library.h
-
Merge pull request #1126 from BehaviorTree/dependabot/github_actions/prefix-dev/setup-pixi-0.9.5 Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5
-
Merge pull request #1127 from botsandus/add-sleep-override Add [Tree::wakeUpSignal()]{.title-ref} getter
-
Merge pull request #1121 from PickNikRobotics/fix-subtree-literal-numeric-types Preserve numeric types for literal subtree port values
-
version 2
-
lint
-
Add support for custom sleep override function in Tree class
-
Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5 Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/v0.9.4...v0.9.5) ---updated-dependencies:
- dependency-name: prefix-dev/setup-pixi dependency-version: 0.9.5 dependency-type: direct:production update-type: version-update:semver-patch ...
-
Preserve numeric types for literal subtree port values When literal values are passed to SubTree ports (not blackboard remapping), detect numeric types (int64_t, double) before storing them in the child blackboard. Previously all literals were stored as std::string, which caused type-mismatch errors in Script expressions that tried to do arithmetic. Co-Authored-By: Claude Opus 4.6 <<noreply@anthropic.com>>
-
Contributors: Davide Faconti, Ladislav Skvarka, Tony Najjar, Xinyu Han, dependabot[bot], mini-1235
4.9.0 (2026-02-11)
- Fix Blackboard thread-safety: 6 data races fixed, use shared_mutex for storage
- Fix XML parser null pointer dereference in loadSubtreeModel on missing SubTree ID
- Add TryCatch control node for try/catch recovery patterns
- Fix #1111: EntryUpdatedDecorator::halt() not halting its child (#1112)
- Add polymorphic shared_ptr port support (#943) (#1107)
- Fix [std::from_chars]{.title-ref} compilation on older g++ versions (#1110)
- Fix clang-tidy warnings across tests, examples, and samples (#1109)
- Add exception tracking with node backtrace (#990) (#1106)
- Fix #861
- Fix #917: add comments about preconditions
- Fix missing read_parameter_from_ports initialization in DelayNode (#1103)
- Fix #880: createTreeFromText now finds previously registered subtrees (#1105)
- Remove lexy dependency, replace with hand-written tokenizer and Pratt parser (#1099)
- Fix
File truncated at 100 lines see the full file
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged behaviortree_cpp at Robotics Stack Exchange
|
behaviortree_cpp package from behaviortree_cpp_v3 repobehaviortree_cpp |
ROS Distro
|
Package Summary
| Version | 4.9.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-07-06 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- Davide Faconti
Authors
- Davide Faconti
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.

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
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.
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.9.1 (2026-07-06)
-
Merge pull request #1139 from mini-1235/patch-3 Fix -Wfree-nonheap-object and -Wunused-result
-
Fix -Wfree-nonheap-object and -Wnull-dereference
-
Merge pull request #1128 from XinyuKhan/patch-1 Rename header guard for shared_library.h
-
Rename header guard for shared_library.h
-
Merge pull request #1126 from BehaviorTree/dependabot/github_actions/prefix-dev/setup-pixi-0.9.5 Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5
-
Merge pull request #1127 from botsandus/add-sleep-override Add [Tree::wakeUpSignal()]{.title-ref} getter
-
Merge pull request #1121 from PickNikRobotics/fix-subtree-literal-numeric-types Preserve numeric types for literal subtree port values
-
version 2
-
lint
-
Add support for custom sleep override function in Tree class
-
Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5 Bumps [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) from 0.9.4 to 0.9.5.
- [Release notes](https://github.com/prefix-dev/setup-pixi/releases)
- [Commits](https://github.com/prefix-dev/setup-pixi/compare/v0.9.4...v0.9.5) ---updated-dependencies:
- dependency-name: prefix-dev/setup-pixi dependency-version: 0.9.5 dependency-type: direct:production update-type: version-update:semver-patch ...
-
Preserve numeric types for literal subtree port values When literal values are passed to SubTree ports (not blackboard remapping), detect numeric types (int64_t, double) before storing them in the child blackboard. Previously all literals were stored as std::string, which caused type-mismatch errors in Script expressions that tried to do arithmetic. Co-Authored-By: Claude Opus 4.6 <<noreply@anthropic.com>>
-
Contributors: Davide Faconti, Ladislav Skvarka, Tony Najjar, Xinyu Han, dependabot[bot], mini-1235
4.9.0 (2026-02-11)
- Fix Blackboard thread-safety: 6 data races fixed, use shared_mutex for storage
- Fix XML parser null pointer dereference in loadSubtreeModel on missing SubTree ID
- Add TryCatch control node for try/catch recovery patterns
- Fix #1111: EntryUpdatedDecorator::halt() not halting its child (#1112)
- Add polymorphic shared_ptr port support (#943) (#1107)
- Fix [std::from_chars]{.title-ref} compilation on older g++ versions (#1110)
- Fix clang-tidy warnings across tests, examples, and samples (#1109)
- Add exception tracking with node backtrace (#990) (#1106)
- Fix #861
- Fix #917: add comments about preconditions
- Fix missing read_parameter_from_ports initialization in DelayNode (#1103)
- Fix #880: createTreeFromText now finds previously registered subtrees (#1105)
- Remove lexy dependency, replace with hand-written tokenizer and Pratt parser (#1099)
- Fix
File truncated at 100 lines see the full file