|
behaviortree_cpp package from behaviortree_cpp_v3 repobehaviortree_cpp |
ROS Distro
|
Package Summary
| Version | 4.11.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-11-13 |
| 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
BT.CPP includes its own copy of nlohmann/json.
To use the one installed in your system instead (version 3.10 or newer), add -DUSE_VENDORED_JSON=OFF.
Since nlohmann::json is part of the public API, everything that links BT.CPP must then be
compiled with that same version.
If you want to build in a pixi project (conda virtual environment).
pixi run build
If you want to use BT.CPP in your application, please refer to the example here: https://github.com/BehaviorTree/btcpp_sample .
Installing BehaviorTree.CPP (vcpkg)
Alternatively, you can build and install behaviortree-cpp using vcpkg dependency manager:
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.11.1 (2026-11-12)
- Roll back a rejected XML load as a whole, and keep Tree's
destructor from throwing
(#1289)
Fixes
#1282
and
#1281.
- Behavior change: when a load call fails, the trees registered by its valid <include> files are dropped too, and a tree it redefined gets its previous definition back. Before, they stayed registered.
- Tree::~Tree() no longer calls std::terminate when halting throws (e.g. a TryCatch with catch_on_halt="true"); the exception is printed to stderr.
- Fix GCC 15 -Wnull-dereference in public headers; always build with
-Werror
(#1290)
Fixes
#1288.
- The library, tests and examples always build with -Wall -Wextra -Wpedantic -Wnull-dereference -Werror (MSVC: /W4 /WX). This applies only to in-tree targets; it is not exported to downstream packages.
- Behavior change: JsonExporter throws LogicError when a BT::Any does not hold the type its converter expects. Before, this was a null dereference (undefined behavior).
- Contributors: Davide Faconti, Marco Matteo Bassa, 渠超胜
4.11.0 (2026-11-08)
- Feature: advanced xml validation (#1146)
- add Finally control node for guaranteed cleanup
(#1229)
- Behavior change: "Finally" is now a built-in node ID, so an application that registers its own node with that ID gets a duplicate-registration error.
- Add _onlyIf and _onStart preconditions
(#820,
#895)
(#1261)
- Behavior change: the attribute names [_onlyIf]{.title-ref} and [_onStart]{.title-ref} are now reserved. Before, they were stored silently as non-port attributes and did nothing.
- test: don't assume a tick rate in Reactive.TestLogging (#1285)
- null-check the entry in ImportBlackboardFromJSON after createEntry (#1284)
- Restore 4.10.0 ABI of Sleep/Delay/Timeout nodes; ignore stale timer handlers (#1283)
- add unit test for subtree with default values and autoremap enabled
(#1272)
- Behavior change: for a modelled input port with a literal default that is not explicitly remapped, the default is now set in the SubTree blackboard if no entry with that name exists in the parent blackboard when the tree is created (creation-time rule, documented in PORT_CONNECTION_RULES.md). A parent key created only at runtime (e.g. by a Script) is shadowed by the default.
- bound the AST height of flat script expressions
(#1259)
- Behavior change: a single script expression with more than ~255 chained operators is now rejected when the tree is created.
- reset a child's status when its halt() throws in ControlNode::haltChild (#1273)
- OSS-Fuzz: Add new fuzzer/corpus/dict targets tree exec (#1277)
- fix: bad_expected_access::what() returns the error message (#1269)
- Propagate skipped conditions in IfThenElse and WhileDoElse (#1276)
- Reset Precondition state between activations (#1275)
- forget a rejected XML document in XMLParser (#1266)
- ignore aborted timer handler in SleepNode (#1267)
- fix stack overflow on nested JSON in JsonToInteger and fromJson (#1274)
- make wildcards_match iterative to avoid stack overflow (#1270)
- use the locked entry in script assignment string conversion (#1265)
- Sort ports in the TreeNodesModel XML (#851) (#1260)
- fix: keep the name of SubTree nodes in WriteTreeToXML (#1262) (#1268)
- Bump prefix-dev/setup-pixi from 0.11.2 to 0.11.3 (#1280)
- feat: write the library version as BTCPP_version in the <root> of generated XML (#1264)
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.11.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-11-13 |
| 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
BT.CPP includes its own copy of nlohmann/json.
To use the one installed in your system instead (version 3.10 or newer), add -DUSE_VENDORED_JSON=OFF.
Since nlohmann::json is part of the public API, everything that links BT.CPP must then be
compiled with that same version.
If you want to build in a pixi project (conda virtual environment).
pixi run build
If you want to use BT.CPP in your application, please refer to the example here: https://github.com/BehaviorTree/btcpp_sample .
Installing BehaviorTree.CPP (vcpkg)
Alternatively, you can build and install behaviortree-cpp using vcpkg dependency manager:
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.11.1 (2026-11-12)
- Roll back a rejected XML load as a whole, and keep Tree's
destructor from throwing
(#1289)
Fixes
#1282
and
#1281.
- Behavior change: when a load call fails, the trees registered by its valid <include> files are dropped too, and a tree it redefined gets its previous definition back. Before, they stayed registered.
- Tree::~Tree() no longer calls std::terminate when halting throws (e.g. a TryCatch with catch_on_halt="true"); the exception is printed to stderr.
- Fix GCC 15 -Wnull-dereference in public headers; always build with
-Werror
(#1290)
Fixes
#1288.
- The library, tests and examples always build with -Wall -Wextra -Wpedantic -Wnull-dereference -Werror (MSVC: /W4 /WX). This applies only to in-tree targets; it is not exported to downstream packages.
- Behavior change: JsonExporter throws LogicError when a BT::Any does not hold the type its converter expects. Before, this was a null dereference (undefined behavior).
- Contributors: Davide Faconti, Marco Matteo Bassa, 渠超胜
4.11.0 (2026-11-08)
- Feature: advanced xml validation (#1146)
- add Finally control node for guaranteed cleanup
(#1229)
- Behavior change: "Finally" is now a built-in node ID, so an application that registers its own node with that ID gets a duplicate-registration error.
- Add _onlyIf and _onStart preconditions
(#820,
#895)
(#1261)
- Behavior change: the attribute names [_onlyIf]{.title-ref} and [_onStart]{.title-ref} are now reserved. Before, they were stored silently as non-port attributes and did nothing.
- test: don't assume a tick rate in Reactive.TestLogging (#1285)
- null-check the entry in ImportBlackboardFromJSON after createEntry (#1284)
- Restore 4.10.0 ABI of Sleep/Delay/Timeout nodes; ignore stale timer handlers (#1283)
- add unit test for subtree with default values and autoremap enabled
(#1272)
- Behavior change: for a modelled input port with a literal default that is not explicitly remapped, the default is now set in the SubTree blackboard if no entry with that name exists in the parent blackboard when the tree is created (creation-time rule, documented in PORT_CONNECTION_RULES.md). A parent key created only at runtime (e.g. by a Script) is shadowed by the default.
- bound the AST height of flat script expressions
(#1259)
- Behavior change: a single script expression with more than ~255 chained operators is now rejected when the tree is created.
- reset a child's status when its halt() throws in ControlNode::haltChild (#1273)
- OSS-Fuzz: Add new fuzzer/corpus/dict targets tree exec (#1277)
- fix: bad_expected_access::what() returns the error message (#1269)
- Propagate skipped conditions in IfThenElse and WhileDoElse (#1276)
- Reset Precondition state between activations (#1275)
- forget a rejected XML document in XMLParser (#1266)
- ignore aborted timer handler in SleepNode (#1267)
- fix stack overflow on nested JSON in JsonToInteger and fromJson (#1274)
- make wildcards_match iterative to avoid stack overflow (#1270)
- use the locked entry in script assignment string conversion (#1265)
- Sort ports in the TreeNodesModel XML (#851) (#1260)
- fix: keep the name of SubTree nodes in WriteTreeToXML (#1262) (#1268)
- Bump prefix-dev/setup-pixi from 0.11.2 to 0.11.3 (#1280)
- feat: write the library version as BTCPP_version in the <root> of generated XML (#1264)
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.11.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-11-13 |
| 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
BT.CPP includes its own copy of nlohmann/json.
To use the one installed in your system instead (version 3.10 or newer), add -DUSE_VENDORED_JSON=OFF.
Since nlohmann::json is part of the public API, everything that links BT.CPP must then be
compiled with that same version.
If you want to build in a pixi project (conda virtual environment).
pixi run build
If you want to use BT.CPP in your application, please refer to the example here: https://github.com/BehaviorTree/btcpp_sample .
Installing BehaviorTree.CPP (vcpkg)
Alternatively, you can build and install behaviortree-cpp using vcpkg dependency manager:
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.11.1 (2026-11-12)
- Roll back a rejected XML load as a whole, and keep Tree's
destructor from throwing
(#1289)
Fixes
#1282
and
#1281.
- Behavior change: when a load call fails, the trees registered by its valid <include> files are dropped too, and a tree it redefined gets its previous definition back. Before, they stayed registered.
- Tree::~Tree() no longer calls std::terminate when halting throws (e.g. a TryCatch with catch_on_halt="true"); the exception is printed to stderr.
- Fix GCC 15 -Wnull-dereference in public headers; always build with
-Werror
(#1290)
Fixes
#1288.
- The library, tests and examples always build with -Wall -Wextra -Wpedantic -Wnull-dereference -Werror (MSVC: /W4 /WX). This applies only to in-tree targets; it is not exported to downstream packages.
- Behavior change: JsonExporter throws LogicError when a BT::Any does not hold the type its converter expects. Before, this was a null dereference (undefined behavior).
- Contributors: Davide Faconti, Marco Matteo Bassa, 渠超胜
4.11.0 (2026-11-08)
- Feature: advanced xml validation (#1146)
- add Finally control node for guaranteed cleanup
(#1229)
- Behavior change: "Finally" is now a built-in node ID, so an application that registers its own node with that ID gets a duplicate-registration error.
- Add _onlyIf and _onStart preconditions
(#820,
#895)
(#1261)
- Behavior change: the attribute names [_onlyIf]{.title-ref} and [_onStart]{.title-ref} are now reserved. Before, they were stored silently as non-port attributes and did nothing.
- test: don't assume a tick rate in Reactive.TestLogging (#1285)
- null-check the entry in ImportBlackboardFromJSON after createEntry (#1284)
- Restore 4.10.0 ABI of Sleep/Delay/Timeout nodes; ignore stale timer handlers (#1283)
- add unit test for subtree with default values and autoremap enabled
(#1272)
- Behavior change: for a modelled input port with a literal default that is not explicitly remapped, the default is now set in the SubTree blackboard if no entry with that name exists in the parent blackboard when the tree is created (creation-time rule, documented in PORT_CONNECTION_RULES.md). A parent key created only at runtime (e.g. by a Script) is shadowed by the default.
- bound the AST height of flat script expressions
(#1259)
- Behavior change: a single script expression with more than ~255 chained operators is now rejected when the tree is created.
- reset a child's status when its halt() throws in ControlNode::haltChild (#1273)
- OSS-Fuzz: Add new fuzzer/corpus/dict targets tree exec (#1277)
- fix: bad_expected_access::what() returns the error message (#1269)
- Propagate skipped conditions in IfThenElse and WhileDoElse (#1276)
- Reset Precondition state between activations (#1275)
- forget a rejected XML document in XMLParser (#1266)
- ignore aborted timer handler in SleepNode (#1267)
- fix stack overflow on nested JSON in JsonToInteger and fromJson (#1274)
- make wildcards_match iterative to avoid stack overflow (#1270)
- use the locked entry in script assignment string conversion (#1265)
- Sort ports in the TreeNodesModel XML (#851) (#1260)
- fix: keep the name of SubTree nodes in WriteTreeToXML (#1262) (#1268)
- Bump prefix-dev/setup-pixi from 0.11.2 to 0.11.3 (#1280)
- feat: write the library version as BTCPP_version in the <root> of generated XML (#1264)
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.11.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-11-13 |
| 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
BT.CPP includes its own copy of nlohmann/json.
To use the one installed in your system instead (version 3.10 or newer), add -DUSE_VENDORED_JSON=OFF.
Since nlohmann::json is part of the public API, everything that links BT.CPP must then be
compiled with that same version.
If you want to build in a pixi project (conda virtual environment).
pixi run build
If you want to use BT.CPP in your application, please refer to the example here: https://github.com/BehaviorTree/btcpp_sample .
Installing BehaviorTree.CPP (vcpkg)
Alternatively, you can build and install behaviortree-cpp using vcpkg dependency manager:
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.11.1 (2026-11-12)
- Roll back a rejected XML load as a whole, and keep Tree's
destructor from throwing
(#1289)
Fixes
#1282
and
#1281.
- Behavior change: when a load call fails, the trees registered by its valid <include> files are dropped too, and a tree it redefined gets its previous definition back. Before, they stayed registered.
- Tree::~Tree() no longer calls std::terminate when halting throws (e.g. a TryCatch with catch_on_halt="true"); the exception is printed to stderr.
- Fix GCC 15 -Wnull-dereference in public headers; always build with
-Werror
(#1290)
Fixes
#1288.
- The library, tests and examples always build with -Wall -Wextra -Wpedantic -Wnull-dereference -Werror (MSVC: /W4 /WX). This applies only to in-tree targets; it is not exported to downstream packages.
- Behavior change: JsonExporter throws LogicError when a BT::Any does not hold the type its converter expects. Before, this was a null dereference (undefined behavior).
- Contributors: Davide Faconti, Marco Matteo Bassa, 渠超胜
4.11.0 (2026-11-08)
- Feature: advanced xml validation (#1146)
- add Finally control node for guaranteed cleanup
(#1229)
- Behavior change: "Finally" is now a built-in node ID, so an application that registers its own node with that ID gets a duplicate-registration error.
- Add _onlyIf and _onStart preconditions
(#820,
#895)
(#1261)
- Behavior change: the attribute names [_onlyIf]{.title-ref} and [_onStart]{.title-ref} are now reserved. Before, they were stored silently as non-port attributes and did nothing.
- test: don't assume a tick rate in Reactive.TestLogging (#1285)
- null-check the entry in ImportBlackboardFromJSON after createEntry (#1284)
- Restore 4.10.0 ABI of Sleep/Delay/Timeout nodes; ignore stale timer handlers (#1283)
- add unit test for subtree with default values and autoremap enabled
(#1272)
- Behavior change: for a modelled input port with a literal default that is not explicitly remapped, the default is now set in the SubTree blackboard if no entry with that name exists in the parent blackboard when the tree is created (creation-time rule, documented in PORT_CONNECTION_RULES.md). A parent key created only at runtime (e.g. by a Script) is shadowed by the default.
- bound the AST height of flat script expressions
(#1259)
- Behavior change: a single script expression with more than ~255 chained operators is now rejected when the tree is created.
- reset a child's status when its halt() throws in ControlNode::haltChild (#1273)
- OSS-Fuzz: Add new fuzzer/corpus/dict targets tree exec (#1277)
- fix: bad_expected_access::what() returns the error message (#1269)
- Propagate skipped conditions in IfThenElse and WhileDoElse (#1276)
- Reset Precondition state between activations (#1275)
- forget a rejected XML document in XMLParser (#1266)
- ignore aborted timer handler in SleepNode (#1267)
- fix stack overflow on nested JSON in JsonToInteger and fromJson (#1274)
- make wildcards_match iterative to avoid stack overflow (#1270)
- use the locked entry in script assignment string conversion (#1265)
- Sort ports in the TreeNodesModel XML (#851) (#1260)
- fix: keep the name of SubTree nodes in WriteTreeToXML (#1262) (#1268)
- Bump prefix-dev/setup-pixi from 0.11.2 to 0.11.3 (#1280)
- feat: write the library version as BTCPP_version in the <root> of generated XML (#1264)
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.11.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-11-13 |
| 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
BT.CPP includes its own copy of nlohmann/json.
To use the one installed in your system instead (version 3.10 or newer), add -DUSE_VENDORED_JSON=OFF.
Since nlohmann::json is part of the public API, everything that links BT.CPP must then be
compiled with that same version.
If you want to build in a pixi project (conda virtual environment).
pixi run build
If you want to use BT.CPP in your application, please refer to the example here: https://github.com/BehaviorTree/btcpp_sample .
Installing BehaviorTree.CPP (vcpkg)
Alternatively, you can build and install behaviortree-cpp using vcpkg dependency manager:
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.11.1 (2026-11-12)
- Roll back a rejected XML load as a whole, and keep Tree's
destructor from throwing
(#1289)
Fixes
#1282
and
#1281.
- Behavior change: when a load call fails, the trees registered by its valid <include> files are dropped too, and a tree it redefined gets its previous definition back. Before, they stayed registered.
- Tree::~Tree() no longer calls std::terminate when halting throws (e.g. a TryCatch with catch_on_halt="true"); the exception is printed to stderr.
- Fix GCC 15 -Wnull-dereference in public headers; always build with
-Werror
(#1290)
Fixes
#1288.
- The library, tests and examples always build with -Wall -Wextra -Wpedantic -Wnull-dereference -Werror (MSVC: /W4 /WX). This applies only to in-tree targets; it is not exported to downstream packages.
- Behavior change: JsonExporter throws LogicError when a BT::Any does not hold the type its converter expects. Before, this was a null dereference (undefined behavior).
- Contributors: Davide Faconti, Marco Matteo Bassa, 渠超胜
4.11.0 (2026-11-08)
- Feature: advanced xml validation (#1146)
- add Finally control node for guaranteed cleanup
(#1229)
- Behavior change: "Finally" is now a built-in node ID, so an application that registers its own node with that ID gets a duplicate-registration error.
- Add _onlyIf and _onStart preconditions
(#820,
#895)
(#1261)
- Behavior change: the attribute names [_onlyIf]{.title-ref} and [_onStart]{.title-ref} are now reserved. Before, they were stored silently as non-port attributes and did nothing.
- test: don't assume a tick rate in Reactive.TestLogging (#1285)
- null-check the entry in ImportBlackboardFromJSON after createEntry (#1284)
- Restore 4.10.0 ABI of Sleep/Delay/Timeout nodes; ignore stale timer handlers (#1283)
- add unit test for subtree with default values and autoremap enabled
(#1272)
- Behavior change: for a modelled input port with a literal default that is not explicitly remapped, the default is now set in the SubTree blackboard if no entry with that name exists in the parent blackboard when the tree is created (creation-time rule, documented in PORT_CONNECTION_RULES.md). A parent key created only at runtime (e.g. by a Script) is shadowed by the default.
- bound the AST height of flat script expressions
(#1259)
- Behavior change: a single script expression with more than ~255 chained operators is now rejected when the tree is created.
- reset a child's status when its halt() throws in ControlNode::haltChild (#1273)
- OSS-Fuzz: Add new fuzzer/corpus/dict targets tree exec (#1277)
- fix: bad_expected_access::what() returns the error message (#1269)
- Propagate skipped conditions in IfThenElse and WhileDoElse (#1276)
- Reset Precondition state between activations (#1275)
- forget a rejected XML document in XMLParser (#1266)
- ignore aborted timer handler in SleepNode (#1267)
- fix stack overflow on nested JSON in JsonToInteger and fromJson (#1274)
- make wildcards_match iterative to avoid stack overflow (#1270)
- use the locked entry in script assignment string conversion (#1265)
- Sort ports in the TreeNodesModel XML (#851) (#1260)
- fix: keep the name of SubTree nodes in WriteTreeToXML (#1262) (#1268)
- Bump prefix-dev/setup-pixi from 0.11.2 to 0.11.3 (#1280)
- feat: write the library version as BTCPP_version in the <root> of generated XML (#1264)
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.11.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-11-13 |
| 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
BT.CPP includes its own copy of nlohmann/json.
To use the one installed in your system instead (version 3.10 or newer), add -DUSE_VENDORED_JSON=OFF.
Since nlohmann::json is part of the public API, everything that links BT.CPP must then be
compiled with that same version.
If you want to build in a pixi project (conda virtual environment).
pixi run build
If you want to use BT.CPP in your application, please refer to the example here: https://github.com/BehaviorTree/btcpp_sample .
Installing BehaviorTree.CPP (vcpkg)
Alternatively, you can build and install behaviortree-cpp using vcpkg dependency manager:
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.11.1 (2026-11-12)
- Roll back a rejected XML load as a whole, and keep Tree's
destructor from throwing
(#1289)
Fixes
#1282
and
#1281.
- Behavior change: when a load call fails, the trees registered by its valid <include> files are dropped too, and a tree it redefined gets its previous definition back. Before, they stayed registered.
- Tree::~Tree() no longer calls std::terminate when halting throws (e.g. a TryCatch with catch_on_halt="true"); the exception is printed to stderr.
- Fix GCC 15 -Wnull-dereference in public headers; always build with
-Werror
(#1290)
Fixes
#1288.
- The library, tests and examples always build with -Wall -Wextra -Wpedantic -Wnull-dereference -Werror (MSVC: /W4 /WX). This applies only to in-tree targets; it is not exported to downstream packages.
- Behavior change: JsonExporter throws LogicError when a BT::Any does not hold the type its converter expects. Before, this was a null dereference (undefined behavior).
- Contributors: Davide Faconti, Marco Matteo Bassa, 渠超胜
4.11.0 (2026-11-08)
- Feature: advanced xml validation (#1146)
- add Finally control node for guaranteed cleanup
(#1229)
- Behavior change: "Finally" is now a built-in node ID, so an application that registers its own node with that ID gets a duplicate-registration error.
- Add _onlyIf and _onStart preconditions
(#820,
#895)
(#1261)
- Behavior change: the attribute names [_onlyIf]{.title-ref} and [_onStart]{.title-ref} are now reserved. Before, they were stored silently as non-port attributes and did nothing.
- test: don't assume a tick rate in Reactive.TestLogging (#1285)
- null-check the entry in ImportBlackboardFromJSON after createEntry (#1284)
- Restore 4.10.0 ABI of Sleep/Delay/Timeout nodes; ignore stale timer handlers (#1283)
- add unit test for subtree with default values and autoremap enabled
(#1272)
- Behavior change: for a modelled input port with a literal default that is not explicitly remapped, the default is now set in the SubTree blackboard if no entry with that name exists in the parent blackboard when the tree is created (creation-time rule, documented in PORT_CONNECTION_RULES.md). A parent key created only at runtime (e.g. by a Script) is shadowed by the default.
- bound the AST height of flat script expressions
(#1259)
- Behavior change: a single script expression with more than ~255 chained operators is now rejected when the tree is created.
- reset a child's status when its halt() throws in ControlNode::haltChild (#1273)
- OSS-Fuzz: Add new fuzzer/corpus/dict targets tree exec (#1277)
- fix: bad_expected_access::what() returns the error message (#1269)
- Propagate skipped conditions in IfThenElse and WhileDoElse (#1276)
- Reset Precondition state between activations (#1275)
- forget a rejected XML document in XMLParser (#1266)
- ignore aborted timer handler in SleepNode (#1267)
- fix stack overflow on nested JSON in JsonToInteger and fromJson (#1274)
- make wildcards_match iterative to avoid stack overflow (#1270)
- use the locked entry in script assignment string conversion (#1265)
- Sort ports in the TreeNodesModel XML (#851) (#1260)
- fix: keep the name of SubTree nodes in WriteTreeToXML (#1262) (#1268)
- Bump prefix-dev/setup-pixi from 0.11.2 to 0.11.3 (#1280)
- feat: write the library version as BTCPP_version in the <root> of generated XML (#1264)
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.11.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-11-13 |
| 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
BT.CPP includes its own copy of nlohmann/json.
To use the one installed in your system instead (version 3.10 or newer), add -DUSE_VENDORED_JSON=OFF.
Since nlohmann::json is part of the public API, everything that links BT.CPP must then be
compiled with that same version.
If you want to build in a pixi project (conda virtual environment).
pixi run build
If you want to use BT.CPP in your application, please refer to the example here: https://github.com/BehaviorTree/btcpp_sample .
Installing BehaviorTree.CPP (vcpkg)
Alternatively, you can build and install behaviortree-cpp using vcpkg dependency manager:
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.11.1 (2026-11-12)
- Roll back a rejected XML load as a whole, and keep Tree's
destructor from throwing
(#1289)
Fixes
#1282
and
#1281.
- Behavior change: when a load call fails, the trees registered by its valid <include> files are dropped too, and a tree it redefined gets its previous definition back. Before, they stayed registered.
- Tree::~Tree() no longer calls std::terminate when halting throws (e.g. a TryCatch with catch_on_halt="true"); the exception is printed to stderr.
- Fix GCC 15 -Wnull-dereference in public headers; always build with
-Werror
(#1290)
Fixes
#1288.
- The library, tests and examples always build with -Wall -Wextra -Wpedantic -Wnull-dereference -Werror (MSVC: /W4 /WX). This applies only to in-tree targets; it is not exported to downstream packages.
- Behavior change: JsonExporter throws LogicError when a BT::Any does not hold the type its converter expects. Before, this was a null dereference (undefined behavior).
- Contributors: Davide Faconti, Marco Matteo Bassa, 渠超胜
4.11.0 (2026-11-08)
- Feature: advanced xml validation (#1146)
- add Finally control node for guaranteed cleanup
(#1229)
- Behavior change: "Finally" is now a built-in node ID, so an application that registers its own node with that ID gets a duplicate-registration error.
- Add _onlyIf and _onStart preconditions
(#820,
#895)
(#1261)
- Behavior change: the attribute names [_onlyIf]{.title-ref} and [_onStart]{.title-ref} are now reserved. Before, they were stored silently as non-port attributes and did nothing.
- test: don't assume a tick rate in Reactive.TestLogging (#1285)
- null-check the entry in ImportBlackboardFromJSON after createEntry (#1284)
- Restore 4.10.0 ABI of Sleep/Delay/Timeout nodes; ignore stale timer handlers (#1283)
- add unit test for subtree with default values and autoremap enabled
(#1272)
- Behavior change: for a modelled input port with a literal default that is not explicitly remapped, the default is now set in the SubTree blackboard if no entry with that name exists in the parent blackboard when the tree is created (creation-time rule, documented in PORT_CONNECTION_RULES.md). A parent key created only at runtime (e.g. by a Script) is shadowed by the default.
- bound the AST height of flat script expressions
(#1259)
- Behavior change: a single script expression with more than ~255 chained operators is now rejected when the tree is created.
- reset a child's status when its halt() throws in ControlNode::haltChild (#1273)
- OSS-Fuzz: Add new fuzzer/corpus/dict targets tree exec (#1277)
- fix: bad_expected_access::what() returns the error message (#1269)
- Propagate skipped conditions in IfThenElse and WhileDoElse (#1276)
- Reset Precondition state between activations (#1275)
- forget a rejected XML document in XMLParser (#1266)
- ignore aborted timer handler in SleepNode (#1267)
- fix stack overflow on nested JSON in JsonToInteger and fromJson (#1274)
- make wildcards_match iterative to avoid stack overflow (#1270)
- use the locked entry in script assignment string conversion (#1265)
- Sort ports in the TreeNodesModel XML (#851) (#1260)
- fix: keep the name of SubTree nodes in WriteTreeToXML (#1262) (#1268)
- Bump prefix-dev/setup-pixi from 0.11.2 to 0.11.3 (#1280)
- feat: write the library version as BTCPP_version in the <root> of generated XML (#1264)
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.11.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-11-13 |
| 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
BT.CPP includes its own copy of nlohmann/json.
To use the one installed in your system instead (version 3.10 or newer), add -DUSE_VENDORED_JSON=OFF.
Since nlohmann::json is part of the public API, everything that links BT.CPP must then be
compiled with that same version.
If you want to build in a pixi project (conda virtual environment).
pixi run build
If you want to use BT.CPP in your application, please refer to the example here: https://github.com/BehaviorTree/btcpp_sample .
Installing BehaviorTree.CPP (vcpkg)
Alternatively, you can build and install behaviortree-cpp using vcpkg dependency manager:
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.11.1 (2026-11-12)
- Roll back a rejected XML load as a whole, and keep Tree's
destructor from throwing
(#1289)
Fixes
#1282
and
#1281.
- Behavior change: when a load call fails, the trees registered by its valid <include> files are dropped too, and a tree it redefined gets its previous definition back. Before, they stayed registered.
- Tree::~Tree() no longer calls std::terminate when halting throws (e.g. a TryCatch with catch_on_halt="true"); the exception is printed to stderr.
- Fix GCC 15 -Wnull-dereference in public headers; always build with
-Werror
(#1290)
Fixes
#1288.
- The library, tests and examples always build with -Wall -Wextra -Wpedantic -Wnull-dereference -Werror (MSVC: /W4 /WX). This applies only to in-tree targets; it is not exported to downstream packages.
- Behavior change: JsonExporter throws LogicError when a BT::Any does not hold the type its converter expects. Before, this was a null dereference (undefined behavior).
- Contributors: Davide Faconti, Marco Matteo Bassa, 渠超胜
4.11.0 (2026-11-08)
- Feature: advanced xml validation (#1146)
- add Finally control node for guaranteed cleanup
(#1229)
- Behavior change: "Finally" is now a built-in node ID, so an application that registers its own node with that ID gets a duplicate-registration error.
- Add _onlyIf and _onStart preconditions
(#820,
#895)
(#1261)
- Behavior change: the attribute names [_onlyIf]{.title-ref} and [_onStart]{.title-ref} are now reserved. Before, they were stored silently as non-port attributes and did nothing.
- test: don't assume a tick rate in Reactive.TestLogging (#1285)
- null-check the entry in ImportBlackboardFromJSON after createEntry (#1284)
- Restore 4.10.0 ABI of Sleep/Delay/Timeout nodes; ignore stale timer handlers (#1283)
- add unit test for subtree with default values and autoremap enabled
(#1272)
- Behavior change: for a modelled input port with a literal default that is not explicitly remapped, the default is now set in the SubTree blackboard if no entry with that name exists in the parent blackboard when the tree is created (creation-time rule, documented in PORT_CONNECTION_RULES.md). A parent key created only at runtime (e.g. by a Script) is shadowed by the default.
- bound the AST height of flat script expressions
(#1259)
- Behavior change: a single script expression with more than ~255 chained operators is now rejected when the tree is created.
- reset a child's status when its halt() throws in ControlNode::haltChild (#1273)
- OSS-Fuzz: Add new fuzzer/corpus/dict targets tree exec (#1277)
- fix: bad_expected_access::what() returns the error message (#1269)
- Propagate skipped conditions in IfThenElse and WhileDoElse (#1276)
- Reset Precondition state between activations (#1275)
- forget a rejected XML document in XMLParser (#1266)
- ignore aborted timer handler in SleepNode (#1267)
- fix stack overflow on nested JSON in JsonToInteger and fromJson (#1274)
- make wildcards_match iterative to avoid stack overflow (#1270)
- use the locked entry in script assignment string conversion (#1265)
- Sort ports in the TreeNodesModel XML (#851) (#1260)
- fix: keep the name of SubTree nodes in WriteTreeToXML (#1262) (#1268)
- Bump prefix-dev/setup-pixi from 0.11.2 to 0.11.3 (#1280)
- feat: write the library version as BTCPP_version in the <root> of generated XML (#1264)
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.11.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-11-13 |
| 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
BT.CPP includes its own copy of nlohmann/json.
To use the one installed in your system instead (version 3.10 or newer), add -DUSE_VENDORED_JSON=OFF.
Since nlohmann::json is part of the public API, everything that links BT.CPP must then be
compiled with that same version.
If you want to build in a pixi project (conda virtual environment).
pixi run build
If you want to use BT.CPP in your application, please refer to the example here: https://github.com/BehaviorTree/btcpp_sample .
Installing BehaviorTree.CPP (vcpkg)
Alternatively, you can build and install behaviortree-cpp using vcpkg dependency manager:
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.11.1 (2026-11-12)
- Roll back a rejected XML load as a whole, and keep Tree's
destructor from throwing
(#1289)
Fixes
#1282
and
#1281.
- Behavior change: when a load call fails, the trees registered by its valid <include> files are dropped too, and a tree it redefined gets its previous definition back. Before, they stayed registered.
- Tree::~Tree() no longer calls std::terminate when halting throws (e.g. a TryCatch with catch_on_halt="true"); the exception is printed to stderr.
- Fix GCC 15 -Wnull-dereference in public headers; always build with
-Werror
(#1290)
Fixes
#1288.
- The library, tests and examples always build with -Wall -Wextra -Wpedantic -Wnull-dereference -Werror (MSVC: /W4 /WX). This applies only to in-tree targets; it is not exported to downstream packages.
- Behavior change: JsonExporter throws LogicError when a BT::Any does not hold the type its converter expects. Before, this was a null dereference (undefined behavior).
- Contributors: Davide Faconti, Marco Matteo Bassa, 渠超胜
4.11.0 (2026-11-08)
- Feature: advanced xml validation (#1146)
- add Finally control node for guaranteed cleanup
(#1229)
- Behavior change: "Finally" is now a built-in node ID, so an application that registers its own node with that ID gets a duplicate-registration error.
- Add _onlyIf and _onStart preconditions
(#820,
#895)
(#1261)
- Behavior change: the attribute names [_onlyIf]{.title-ref} and [_onStart]{.title-ref} are now reserved. Before, they were stored silently as non-port attributes and did nothing.
- test: don't assume a tick rate in Reactive.TestLogging (#1285)
- null-check the entry in ImportBlackboardFromJSON after createEntry (#1284)
- Restore 4.10.0 ABI of Sleep/Delay/Timeout nodes; ignore stale timer handlers (#1283)
- add unit test for subtree with default values and autoremap enabled
(#1272)
- Behavior change: for a modelled input port with a literal default that is not explicitly remapped, the default is now set in the SubTree blackboard if no entry with that name exists in the parent blackboard when the tree is created (creation-time rule, documented in PORT_CONNECTION_RULES.md). A parent key created only at runtime (e.g. by a Script) is shadowed by the default.
- bound the AST height of flat script expressions
(#1259)
- Behavior change: a single script expression with more than ~255 chained operators is now rejected when the tree is created.
- reset a child's status when its halt() throws in ControlNode::haltChild (#1273)
- OSS-Fuzz: Add new fuzzer/corpus/dict targets tree exec (#1277)
- fix: bad_expected_access::what() returns the error message (#1269)
- Propagate skipped conditions in IfThenElse and WhileDoElse (#1276)
- Reset Precondition state between activations (#1275)
- forget a rejected XML document in XMLParser (#1266)
- ignore aborted timer handler in SleepNode (#1267)
- fix stack overflow on nested JSON in JsonToInteger and fromJson (#1274)
- make wildcards_match iterative to avoid stack overflow (#1270)
- use the locked entry in script assignment string conversion (#1265)
- Sort ports in the TreeNodesModel XML (#851) (#1260)
- fix: keep the name of SubTree nodes in WriteTreeToXML (#1262) (#1268)
- Bump prefix-dev/setup-pixi from 0.11.2 to 0.11.3 (#1280)
- feat: write the library version as BTCPP_version in the <root> of generated XML (#1264)
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.11.1 |
| License | MIT |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Description | |
| Checkout URI | https://github.com/BehaviorTree/BehaviorTree.CPP.git |
| VCS Type | git |
| VCS Version | master |
| Last Updated | 2026-11-13 |
| 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
BT.CPP includes its own copy of nlohmann/json.
To use the one installed in your system instead (version 3.10 or newer), add -DUSE_VENDORED_JSON=OFF.
Since nlohmann::json is part of the public API, everything that links BT.CPP must then be
compiled with that same version.
If you want to build in a pixi project (conda virtual environment).
pixi run build
If you want to use BT.CPP in your application, please refer to the example here: https://github.com/BehaviorTree/btcpp_sample .
Installing BehaviorTree.CPP (vcpkg)
Alternatively, you can build and install behaviortree-cpp using vcpkg dependency manager:
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
File truncated at 100 lines see the full file
Changelog for package behaviortree_cpp
4.11.1 (2026-11-12)
- Roll back a rejected XML load as a whole, and keep Tree's
destructor from throwing
(#1289)
Fixes
#1282
and
#1281.
- Behavior change: when a load call fails, the trees registered by its valid <include> files are dropped too, and a tree it redefined gets its previous definition back. Before, they stayed registered.
- Tree::~Tree() no longer calls std::terminate when halting throws (e.g. a TryCatch with catch_on_halt="true"); the exception is printed to stderr.
- Fix GCC 15 -Wnull-dereference in public headers; always build with
-Werror
(#1290)
Fixes
#1288.
- The library, tests and examples always build with -Wall -Wextra -Wpedantic -Wnull-dereference -Werror (MSVC: /W4 /WX). This applies only to in-tree targets; it is not exported to downstream packages.
- Behavior change: JsonExporter throws LogicError when a BT::Any does not hold the type its converter expects. Before, this was a null dereference (undefined behavior).
- Contributors: Davide Faconti, Marco Matteo Bassa, 渠超胜
4.11.0 (2026-11-08)
- Feature: advanced xml validation (#1146)
- add Finally control node for guaranteed cleanup
(#1229)
- Behavior change: "Finally" is now a built-in node ID, so an application that registers its own node with that ID gets a duplicate-registration error.
- Add _onlyIf and _onStart preconditions
(#820,
#895)
(#1261)
- Behavior change: the attribute names [_onlyIf]{.title-ref} and [_onStart]{.title-ref} are now reserved. Before, they were stored silently as non-port attributes and did nothing.
- test: don't assume a tick rate in Reactive.TestLogging (#1285)
- null-check the entry in ImportBlackboardFromJSON after createEntry (#1284)
- Restore 4.10.0 ABI of Sleep/Delay/Timeout nodes; ignore stale timer handlers (#1283)
- add unit test for subtree with default values and autoremap enabled
(#1272)
- Behavior change: for a modelled input port with a literal default that is not explicitly remapped, the default is now set in the SubTree blackboard if no entry with that name exists in the parent blackboard when the tree is created (creation-time rule, documented in PORT_CONNECTION_RULES.md). A parent key created only at runtime (e.g. by a Script) is shadowed by the default.
- bound the AST height of flat script expressions
(#1259)
- Behavior change: a single script expression with more than ~255 chained operators is now rejected when the tree is created.
- reset a child's status when its halt() throws in ControlNode::haltChild (#1273)
- OSS-Fuzz: Add new fuzzer/corpus/dict targets tree exec (#1277)
- fix: bad_expected_access::what() returns the error message (#1269)
- Propagate skipped conditions in IfThenElse and WhileDoElse (#1276)
- Reset Precondition state between activations (#1275)
- forget a rejected XML document in XMLParser (#1266)
- ignore aborted timer handler in SleepNode (#1267)
- fix stack overflow on nested JSON in JsonToInteger and fromJson (#1274)
- make wildcards_match iterative to avoid stack overflow (#1270)
- use the locked entry in script assignment string conversion (#1265)
- Sort ports in the TreeNodesModel XML (#851) (#1260)
- fix: keep the name of SubTree nodes in WriteTreeToXML (#1262) (#1268)
- Bump prefix-dev/setup-pixi from 0.11.2 to 0.11.3 (#1280)
- feat: write the library version as BTCPP_version in the <root> of generated XML (#1264)
File truncated at 100 lines see the full file