behaviortree_cpp_v3 package from behaviortree_cpp repo

behaviortree_cpp_v3

Package Summary

Tags No category tags.
Version 3.7.0
License MIT
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/BehaviorTree/BehaviorTree.CPP.git
VCS Type git
VCS Version master
Last Updated 2022-09-27
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

This package provides the Behavior Trees core library.

Additional Links

No additional links.

Maintainers

  • Davide Faconti

Authors

  • Michele Colledanchise
  • Davide Faconti

License MIT Version cmake ros1 ros2 LGTM Grade Discourse topics

BehaviorTree.CPP

This C++ 14 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 in your application.

There are 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.

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

  • You can statically link your custom TreeNodes or convert them into plugins which can be loaded 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.

  • Last but not least: it is well documented!

Documentation

You can learn about the main concepts, the API and the tutorials here: https://www.behaviortree.dev/

To find more details about the conceptual ideas that make this implementation different from others, you can read the final deliverable of the project MOOD2Be.

Forum and Community

If the documentation doesn't answer your questions and/or you want to connect with the other BT.CPP users, visit https://discourse.behaviortree.dev/

Commercial support

Are you using BT.CPP in your commercial product and you need technical support / consulting? You can get in touch at dfaconti@aurynrobotics.com and we will happy to discuss your use case and needs.

Design principles

The main goal of this project is to create a Behavior Tree implementation that uses the principles of Model Driven Development to separate the role of the Component Developer from the Behavior Designer.

In practice, this means that:

  • Custom TreeNodes must be reusable building blocks. You should be able to implement them once and reuse them to build many behaviors.

  • To build a Behavior Tree out of TreeNodes, the Behavior Designer must not need to read nor modify the C++ source code of a given TreeNode.

  • Complex Behaviours must be composable using Subtrees

Many of the features and, sometimes, the apparent limitations of this library, might be a consequence of this design principle.

For instance, having a scoped BlackBoard, visible only in a portion of the tree, is particularly important to avoid "name pollution" and allow the creation of large scale trees.

GUI Editor

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

If you are looking for a more fancy graphical user interface (and I know you do) check Groot out.

Groot screenshot

Watch Groot and BehaviorTree.CPP in action

Click on the following image to see a short video of how the C++ library and the graphic user interface are used to design and monitor a Behavior Tree.

MOOD2Be

How to compile (plain old cmake)

On Ubuntu, you are encourage to install the following dependencies:

 sudo apt-get install libzmq3-dev libboost-dev

Other dependencies are already included in the 3rdparty folder.

To compile and install the library, from the BehaviorTree.CPP folder, execute:

 mkdir build; cd build
 cmake ..
 make
 sudo make install

If you want to use BT.CPp in your application a typical CMakeLists.txt file will look like this:

cmake_minimum_required(VERSION 3.5)

project(hello_BT)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(behaviortree_cpp_v3)

add_executable(${PROJECT_NAME} "hello_BT.cpp")
target_link_libraries(${PROJECT_NAME} BT::behaviortree_cpp_v3)

ROS1 or ROS2 users (Catkin/Ament)

You can easily install the package with the command

  sudo apt-get install ros-$ROS_DISTRO-behaviortree-cpp-v3

If you want to compile it with catkin, you must include this package to your catkin workspace.

Acknowledgement

This library was initially developed at Eurecat - https://eurecat.org/en/ (main author, Davide Faconti) in a joint effort with the Italian Institute of Technology (Michele Colledanchise).

This software is one of the main components of MOOD2Be, which is one of the six Integrated Technical Projects (ITPs) selected from the RobMoSys first open call. Therefore, MOOD2Be has been supported by the European Horizon2020 project RobMoSys. This software is RobMoSys conformant.

RobMoSys Conformant

Further readings

  • Introductory article: Behavior trees for AI: How they work

  • How Behavior Trees Modularize Hybrid Control Systems and Generalize Sequential Behavior Compositions, the Subsumption Architecture, and Decision Trees. Michele Colledanchise and Petter Ogren. IEEE Transaction on Robotics 2017.

  • Behavior Trees in Robotics and AI, published by CRC Press Taylor & Francis, available for purchase (ebook and hardcover) on the CRC Press Store or Amazon.

The Preprint version (free) is available here: https://arxiv.org/abs/1709.00084

License

The MIT License (MIT)

Copyright (c) 2014-2018 Michele Colledanchise

Copyright (c) 2018-2019 Davide Faconti, Eurecat

Copyright (c) 2019-2021 Davide Faconti

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

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

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

CHANGELOG

Changelog for package behaviortree_cpp

3.7.0 (2022-05-23) -----------* add netlify stuff * Event based trigger introduced Added a new mechanism to emit \"state changed\" events that can \"wake up\" a tree. In short, it just provide an interruptible \"sleep\" function. * Fixed bug where including relative paths would fail to find the correct file (#358) * Added unit tests to verify current behavior * Fixed bug where including relative paths would fail to find the correct file * Added gtest environment to access executable path This path lets tests access files relative to the executable for better transportability * Changed file commandto add_custom_target The file command only copies during the cmake configure step. If source files change, file is not ran again * Added pure CMake action to PR checks (#378) * Added CMake CI to PR checks * Renamed action to follow pattern * updated documentation * add the ability to register multiple BTs (#373) * Update ros1.yaml * fix #338 * fix issue #330 * fix issue #360 * Merge branch \'master\' of github.com:BehaviorTree/BehaviorTree.CPP * Update Tutorial 2 Docuemtation (#372) * Update tutorial_09_coroutines.md (#359) Minor fix, renamed Timepoint to TimePoint. * Export dependency on ament_index_cpp (#362) To make dependent packages try to link ament_index_cpp, export the dependency explicitly. * Change order of lock to prevent deadlock. (#368) Resolves #367. * Fix #320 : forbit refrences in Any * Update action_node.h * Contributors: Adam Sasine, Davide Faconti, Fabian Schurig, Griswald Brooks, Hyeongsik Min, Robodrome, imgbot[bot], panwauu

3.6.1 (2022-03-06)

  • remove windows tests
  • fix thread safety
  • fix CI
  • Don\'t restart SequenceStar on halt (#329)
    • Add more SequenceStar tests
    • Fix typo in test name
    • Don\'t reset SequenceStar on halt
  • [docs] add missing node SmashDoor (#342)
  • ROS2 include ros_pkg attribute support (#351)

    • ROS2 include pkg support

    * ros2 build fixed Co-authored-by: Benjamin Linne <benjamin.linne.civ@army.mil>

  • [ImgBot] Optimize images (#334) *Total -- 90.34kb -> 61.77kb (31.63%) /docs/images/Tutorial1.svg -- 10.08kb -> 6.33kb (37.19%) /docs/images/FetchBeerFails.svg -- 9.00kb -> 5.93kb (34.13%) /docs/images/FetchBeer2.svg -- 21.19kb -> 14.41kb (32%) /docs/images/Tutorial2.svg -- 34.19kb -> 23.75kb (30.54%) /docs/images/DecoratorEnterRoom.svg -- 15.88kb -> 11.35kb (28.54%) Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

  • [Docs] BT_basics fix typo (#343)

  • [docs] Clarify sentence (#344) ... will sleep up to 8 hours or less, if he/she is fully rested. was not clear. It can also be understood as If he/she is fully rested, the character will sleep ...

  • [docs] match text to graphics (#340)

  • Docs: BT_basics fix typo (#337)

  • Merge branch \'master\' of github.com:BehaviorTree/BehaviorTree.CPP

  • fix svg

  • Fix CMake ENABLE_COROUTINES flag with Boost < 1.59 (#335) Co-authored-by: Cam Fulton <cfulton@symbotic.com>

  • Add ENABLE_COROUTINES CMake option (#316)

    • Add DISABLE_COROUTINES CMake option

    * Change convention of CMake coroutine flag to ENABLE Co-authored-by: Cam Fulton <cfulton@symbotic.com>

  • [ImgBot] Optimize images (#333) *Total -- 152.97kb -> 114.57kb (25.1%) /docs/images/ReactiveSequence.svg -- 7.58kb -> 4.59kb (39.47%) /docs/images/SequenceNode.svg -- 11.28kb -> 7.12kb (36.87%) /docs/images/SequenceStar.svg -- 11.22kb -> 7.09kb (36.8%) /docs/images/DecoratorEnterRoom.svg -- 20.71kb -> 13.30kb (35.77%) /docs/images/FallbackBasic.svg -- 19.09kb -> 12.64kb (33.79%) /docs/images/FetchBeer.svg -- 24.30kb -> 16.36kb (32.66%) /docs/images/SequenceBasic.svg -- 6.32kb -> 5.49kb (13.04%) /docs/images/Tutorial1.svg -- 6.67kb -> 5.94kb (10.98%) /docs/images/FetchBeerFails.svg -- 6.46kb -> 5.83kb (9.76%) /docs/images/FetchBeer2.svg -- 14.99kb -> 13.76kb (8.18%) /docs/images/Tutorial2.svg -- 24.35kb -> 22.44kb (7.85%) Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

  • doc fix

  • Merge branch \'new_doc\'

  • remove deprecated code

  • updated documentation

  • [Fix] Fix cmake version warning and -Wformat warning (#319) Co-authored-by: Homalozoa <xuhaiwang@xiaomi.com>

  • Update README.md

  • Fix Windows shared lib build (#323)

  • fix shadowed variable in string_view.hpp (#327)

  • Build Sample Nodes By Default to Fix Github Action (#332)

    • Fix github action
    • Change working directory in github action step
    • Build samples by default
  • Added BlackboardCheckBool decorator node (#326)

    • Added tests for BlackboardCheck decorator node
    • Added BlackboardCheckBool decorator node
  • Fixed typo \"Exeption\" -> \"Exception\" (#331)

  • WIP

  • fix #325

  • Contributors: Adam Sasine, Affonso, Guilherme, Alberto Soragna, Davide Faconti, Homalozoa X, Jake Keller, Philippe Couvignou, Tobias Fischer, benjinne, fultoncjb, goekce, imgbot[bot]

3.6.0 (2021-11-10)

  • Build samples independently of examples (#315)
  • Fix dependency in package.xml (#313)
  • Fix doc statement (#309) Fix sentence
  • Fix references to RetryUntilSuccesful (#308)
    • Fix github action
    • Fix references to RetryUntilSuccesful
  • added subclass RetryNodeTypo (#295) Co-authored-by: Subaru Arai <SubaruArai@local>
  • Fix github action (#302)
  • Minor spelling correction (#305) Corrected the_aswer to the_answer
  • Update FallbackNode.md (#306) typo correction.
  • Add signal handler for Windows (#307)
  • fix
  • file renamed and documentation fixed
  • Update documentation for reactive sequence (#286)
  • Update FallbackNode.md (#287) Fix the pseudocode in the documentation of \'Reactive Fallback\' according to its source code.
  • Update fallback documentation to V3 (#288)
    • Update FallbackNode.md description to V3
    • Fix typo
  • Use pedantic for non MSVC builds (#289)
  • Merge branch \'master\' of https://github.com/BehaviorTree/BehaviorTree.CPP
  • updated to latest flatbuffers
  • Update README.md
  • Fix issue #273
  • remove potential crash when an unfinished tree throws an exception
  • remove appveyor
  • Merge branch \'git_actions\'
  • Fixes for compilation on windows. (#248) * Fix for detecting ZeroMQ on windows Naming convention is a bit different for ZeroMQ, specifically on Windows with vcpkg. While ZMQ and ZeroMQ are valid on linux, the ZMQ naming convention only works on linux.

    • Compilation on windows not working with /WX

    * Macro collision on Windows On windows, the macros defined in the abstract logger collides with other in windows.h. Made them lowercase to avoid collision

  • Remove native support for Conan (#280)

  • add github workflow

  • Registered missing dummy nodes for examples (#275)

    • Added CheckTemperature dummy node
    • Added SayHello dummy node
  • add zmq.hpp in 3rdparty dirfectory

  • add test

  • fix some warnings

  • Fix bug on halt of delay node (#272)

    • When DelayNode is halted and ticked again, it always returned FAILURE since the state of DelayNode was not properly reset.

    - This commit fixes unexpected behavior of DelayNode when it is halted. Co-authored-by: Jinwoo Choi <jinwoos.choi@samsung.com>

  • Clear all of blackboard\'s content (#269)

  • Added printTreeRecursively overload with ostream parameter (#264)

    • Added overload to printTreeRecursively
    • Changed include to iosfwd
    • Added test to verify function writes to stream
    • Added call to overload without stream parameter
    • Fixed conversion error
    • Removed overload in favor of default argument
  • Fix typo (#260) Co-authored-by: Francesco Vigni <francesco.vigni@sttech.de>

  • Update README.md

  • abstract_logger.h: fixed a typo (#257)

  • Contributors: Adam Sasine, Affonso, Guilherme, Akash, Billy, Cong Liu, Daisuke Nishimatsu, Davide Faconti, Francesco Vigni, Heben, Jake Keller, Per-Arne Andersen, Ross Weir, Steve Macenski, SubaruArai, Taehyeon, Uilian Ries, Yadu, Yuwei Liang, matthews-jca, swarajpeppermint

3.5.6 (2021-02-03)

3.5.5 (2021-01-27)

  • fix issue #251
  • Contributors: Davide Faconti

3.5.4 (2020-12-10)

  • Update bt_factory.cpp (#245)
  • Use the latest version of zmq.hpp
  • Improved switching BTs with active Groot monitoring (ZMQ logger destruction) (#244)
    • Skip 100ms (max) wait for detached thread
    • add {} to single line if statements
  • Update retry_node.cpp
  • fix
  • fix issue #230
  • Contributors: Davide Faconti, Florian Gram

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged behaviortree_cpp_v3 at answers.ros.org

behaviortree_cpp_v3 package from behaviortree_cpp repo

behaviortree_cpp_v3

Package Summary

Tags No category tags.
Version 3.7.0
License MIT
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/BehaviorTree/BehaviorTree.CPP.git
VCS Type git
VCS Version master
Last Updated 2022-09-27
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

This package provides the Behavior Trees core library.

Additional Links

No additional links.

Maintainers

  • Davide Faconti

Authors

  • Michele Colledanchise
  • Davide Faconti

License MIT Version cmake ros1 ros2 LGTM Grade Discourse topics

BehaviorTree.CPP

This C++ 14 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 in your application.

There are 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.

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

  • You can statically link your custom TreeNodes or convert them into plugins which can be loaded 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.

  • Last but not least: it is well documented!

Documentation

You can learn about the main concepts, the API and the tutorials here: https://www.behaviortree.dev/

To find more details about the conceptual ideas that make this implementation different from others, you can read the final deliverable of the project MOOD2Be.

Forum and Community

If the documentation doesn't answer your questions and/or you want to connect with the other BT.CPP users, visit https://discourse.behaviortree.dev/

Commercial support

Are you using BT.CPP in your commercial product and you need technical support / consulting? You can get in touch at dfaconti@aurynrobotics.com and we will happy to discuss your use case and needs.

Design principles

The main goal of this project is to create a Behavior Tree implementation that uses the principles of Model Driven Development to separate the role of the Component Developer from the Behavior Designer.

In practice, this means that:

  • Custom TreeNodes must be reusable building blocks. You should be able to implement them once and reuse them to build many behaviors.

  • To build a Behavior Tree out of TreeNodes, the Behavior Designer must not need to read nor modify the C++ source code of a given TreeNode.

  • Complex Behaviours must be composable using Subtrees

Many of the features and, sometimes, the apparent limitations of this library, might be a consequence of this design principle.

For instance, having a scoped BlackBoard, visible only in a portion of the tree, is particularly important to avoid "name pollution" and allow the creation of large scale trees.

GUI Editor

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

If you are looking for a more fancy graphical user interface (and I know you do) check Groot out.

Groot screenshot

Watch Groot and BehaviorTree.CPP in action

Click on the following image to see a short video of how the C++ library and the graphic user interface are used to design and monitor a Behavior Tree.

MOOD2Be

How to compile (plain old cmake)

On Ubuntu, you are encourage to install the following dependencies:

 sudo apt-get install libzmq3-dev libboost-dev

Other dependencies are already included in the 3rdparty folder.

To compile and install the library, from the BehaviorTree.CPP folder, execute:

 mkdir build; cd build
 cmake ..
 make
 sudo make install

If you want to use BT.CPp in your application a typical CMakeLists.txt file will look like this:

cmake_minimum_required(VERSION 3.5)

project(hello_BT)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(behaviortree_cpp_v3)

add_executable(${PROJECT_NAME} "hello_BT.cpp")
target_link_libraries(${PROJECT_NAME} BT::behaviortree_cpp_v3)

ROS1 or ROS2 users (Catkin/Ament)

You can easily install the package with the command

  sudo apt-get install ros-$ROS_DISTRO-behaviortree-cpp-v3

If you want to compile it with catkin, you must include this package to your catkin workspace.

Acknowledgement

This library was initially developed at Eurecat - https://eurecat.org/en/ (main author, Davide Faconti) in a joint effort with the Italian Institute of Technology (Michele Colledanchise).

This software is one of the main components of MOOD2Be, which is one of the six Integrated Technical Projects (ITPs) selected from the RobMoSys first open call. Therefore, MOOD2Be has been supported by the European Horizon2020 project RobMoSys. This software is RobMoSys conformant.

RobMoSys Conformant

Further readings

  • Introductory article: Behavior trees for AI: How they work

  • How Behavior Trees Modularize Hybrid Control Systems and Generalize Sequential Behavior Compositions, the Subsumption Architecture, and Decision Trees. Michele Colledanchise and Petter Ogren. IEEE Transaction on Robotics 2017.

  • Behavior Trees in Robotics and AI, published by CRC Press Taylor & Francis, available for purchase (ebook and hardcover) on the CRC Press Store or Amazon.

The Preprint version (free) is available here: https://arxiv.org/abs/1709.00084

License

The MIT License (MIT)

Copyright (c) 2014-2018 Michele Colledanchise

Copyright (c) 2018-2019 Davide Faconti, Eurecat

Copyright (c) 2019-2021 Davide Faconti

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

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

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

CHANGELOG

Changelog for package behaviortree_cpp

3.7.0 (2022-05-23) -----------* add netlify stuff * Event based trigger introduced Added a new mechanism to emit \"state changed\" events that can \"wake up\" a tree. In short, it just provide an interruptible \"sleep\" function. * Fixed bug where including relative paths would fail to find the correct file (#358) * Added unit tests to verify current behavior * Fixed bug where including relative paths would fail to find the correct file * Added gtest environment to access executable path This path lets tests access files relative to the executable for better transportability * Changed file commandto add_custom_target The file command only copies during the cmake configure step. If source files change, file is not ran again * Added pure CMake action to PR checks (#378) * Added CMake CI to PR checks * Renamed action to follow pattern * updated documentation * add the ability to register multiple BTs (#373) * Update ros1.yaml * fix #338 * fix issue #330 * fix issue #360 * Merge branch \'master\' of github.com:BehaviorTree/BehaviorTree.CPP * Update Tutorial 2 Docuemtation (#372) * Update tutorial_09_coroutines.md (#359) Minor fix, renamed Timepoint to TimePoint. * Export dependency on ament_index_cpp (#362) To make dependent packages try to link ament_index_cpp, export the dependency explicitly. * Change order of lock to prevent deadlock. (#368) Resolves #367. * Fix #320 : forbit refrences in Any * Update action_node.h * Contributors: Adam Sasine, Davide Faconti, Fabian Schurig, Griswald Brooks, Hyeongsik Min, Robodrome, imgbot[bot], panwauu

3.6.1 (2022-03-06)

  • remove windows tests
  • fix thread safety
  • fix CI
  • Don\'t restart SequenceStar on halt (#329)
    • Add more SequenceStar tests
    • Fix typo in test name
    • Don\'t reset SequenceStar on halt
  • [docs] add missing node SmashDoor (#342)
  • ROS2 include ros_pkg attribute support (#351)

    • ROS2 include pkg support

    * ros2 build fixed Co-authored-by: Benjamin Linne <benjamin.linne.civ@army.mil>

  • [ImgBot] Optimize images (#334) *Total -- 90.34kb -> 61.77kb (31.63%) /docs/images/Tutorial1.svg -- 10.08kb -> 6.33kb (37.19%) /docs/images/FetchBeerFails.svg -- 9.00kb -> 5.93kb (34.13%) /docs/images/FetchBeer2.svg -- 21.19kb -> 14.41kb (32%) /docs/images/Tutorial2.svg -- 34.19kb -> 23.75kb (30.54%) /docs/images/DecoratorEnterRoom.svg -- 15.88kb -> 11.35kb (28.54%) Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

  • [Docs] BT_basics fix typo (#343)

  • [docs] Clarify sentence (#344) ... will sleep up to 8 hours or less, if he/she is fully rested. was not clear. It can also be understood as If he/she is fully rested, the character will sleep ...

  • [docs] match text to graphics (#340)

  • Docs: BT_basics fix typo (#337)

  • Merge branch \'master\' of github.com:BehaviorTree/BehaviorTree.CPP

  • fix svg

  • Fix CMake ENABLE_COROUTINES flag with Boost < 1.59 (#335) Co-authored-by: Cam Fulton <cfulton@symbotic.com>

  • Add ENABLE_COROUTINES CMake option (#316)

    • Add DISABLE_COROUTINES CMake option

    * Change convention of CMake coroutine flag to ENABLE Co-authored-by: Cam Fulton <cfulton@symbotic.com>

  • [ImgBot] Optimize images (#333) *Total -- 152.97kb -> 114.57kb (25.1%) /docs/images/ReactiveSequence.svg -- 7.58kb -> 4.59kb (39.47%) /docs/images/SequenceNode.svg -- 11.28kb -> 7.12kb (36.87%) /docs/images/SequenceStar.svg -- 11.22kb -> 7.09kb (36.8%) /docs/images/DecoratorEnterRoom.svg -- 20.71kb -> 13.30kb (35.77%) /docs/images/FallbackBasic.svg -- 19.09kb -> 12.64kb (33.79%) /docs/images/FetchBeer.svg -- 24.30kb -> 16.36kb (32.66%) /docs/images/SequenceBasic.svg -- 6.32kb -> 5.49kb (13.04%) /docs/images/Tutorial1.svg -- 6.67kb -> 5.94kb (10.98%) /docs/images/FetchBeerFails.svg -- 6.46kb -> 5.83kb (9.76%) /docs/images/FetchBeer2.svg -- 14.99kb -> 13.76kb (8.18%) /docs/images/Tutorial2.svg -- 24.35kb -> 22.44kb (7.85%) Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

  • doc fix

  • Merge branch \'new_doc\'

  • remove deprecated code

  • updated documentation

  • [Fix] Fix cmake version warning and -Wformat warning (#319) Co-authored-by: Homalozoa <xuhaiwang@xiaomi.com>

  • Update README.md

  • Fix Windows shared lib build (#323)

  • fix shadowed variable in string_view.hpp (#327)

  • Build Sample Nodes By Default to Fix Github Action (#332)

    • Fix github action
    • Change working directory in github action step
    • Build samples by default
  • Added BlackboardCheckBool decorator node (#326)

    • Added tests for BlackboardCheck decorator node
    • Added BlackboardCheckBool decorator node
  • Fixed typo \"Exeption\" -> \"Exception\" (#331)

  • WIP

  • fix #325

  • Contributors: Adam Sasine, Affonso, Guilherme, Alberto Soragna, Davide Faconti, Homalozoa X, Jake Keller, Philippe Couvignou, Tobias Fischer, benjinne, fultoncjb, goekce, imgbot[bot]

3.6.0 (2021-11-10)

  • Build samples independently of examples (#315)
  • Fix dependency in package.xml (#313)
  • Fix doc statement (#309) Fix sentence
  • Fix references to RetryUntilSuccesful (#308)
    • Fix github action
    • Fix references to RetryUntilSuccesful
  • added subclass RetryNodeTypo (#295) Co-authored-by: Subaru Arai <SubaruArai@local>
  • Fix github action (#302)
  • Minor spelling correction (#305) Corrected the_aswer to the_answer
  • Update FallbackNode.md (#306) typo correction.
  • Add signal handler for Windows (#307)
  • fix
  • file renamed and documentation fixed
  • Update documentation for reactive sequence (#286)
  • Update FallbackNode.md (#287) Fix the pseudocode in the documentation of \'Reactive Fallback\' according to its source code.
  • Update fallback documentation to V3 (#288)
    • Update FallbackNode.md description to V3
    • Fix typo
  • Use pedantic for non MSVC builds (#289)
  • Merge branch \'master\' of https://github.com/BehaviorTree/BehaviorTree.CPP
  • updated to latest flatbuffers
  • Update README.md
  • Fix issue #273
  • remove potential crash when an unfinished tree throws an exception
  • remove appveyor
  • Merge branch \'git_actions\'
  • Fixes for compilation on windows. (#248) * Fix for detecting ZeroMQ on windows Naming convention is a bit different for ZeroMQ, specifically on Windows with vcpkg. While ZMQ and ZeroMQ are valid on linux, the ZMQ naming convention only works on linux.

    • Compilation on windows not working with /WX

    * Macro collision on Windows On windows, the macros defined in the abstract logger collides with other in windows.h. Made them lowercase to avoid collision

  • Remove native support for Conan (#280)

  • add github workflow

  • Registered missing dummy nodes for examples (#275)

    • Added CheckTemperature dummy node
    • Added SayHello dummy node
  • add zmq.hpp in 3rdparty dirfectory

  • add test

  • fix some warnings

  • Fix bug on halt of delay node (#272)

    • When DelayNode is halted and ticked again, it always returned FAILURE since the state of DelayNode was not properly reset.

    - This commit fixes unexpected behavior of DelayNode when it is halted. Co-authored-by: Jinwoo Choi <jinwoos.choi@samsung.com>

  • Clear all of blackboard\'s content (#269)

  • Added printTreeRecursively overload with ostream parameter (#264)

    • Added overload to printTreeRecursively
    • Changed include to iosfwd
    • Added test to verify function writes to stream
    • Added call to overload without stream parameter
    • Fixed conversion error
    • Removed overload in favor of default argument
  • Fix typo (#260) Co-authored-by: Francesco Vigni <francesco.vigni@sttech.de>

  • Update README.md

  • abstract_logger.h: fixed a typo (#257)

  • Contributors: Adam Sasine, Affonso, Guilherme, Akash, Billy, Cong Liu, Daisuke Nishimatsu, Davide Faconti, Francesco Vigni, Heben, Jake Keller, Per-Arne Andersen, Ross Weir, Steve Macenski, SubaruArai, Taehyeon, Uilian Ries, Yadu, Yuwei Liang, matthews-jca, swarajpeppermint

3.5.6 (2021-02-03)

3.5.5 (2021-01-27)

  • fix issue #251
  • Contributors: Davide Faconti

3.5.4 (2020-12-10)

  • Update bt_factory.cpp (#245)
  • Use the latest version of zmq.hpp
  • Improved switching BTs with active Groot monitoring (ZMQ logger destruction) (#244)
    • Skip 100ms (max) wait for detached thread
    • add {} to single line if statements
  • Update retry_node.cpp
  • fix
  • fix issue #230
  • Contributors: Davide Faconti, Florian Gram

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged behaviortree_cpp_v3 at answers.ros.org

behaviortree_cpp_v3 package from behaviortree_cpp repo

behaviortree_cpp_v3

Package Summary

Tags No category tags.
Version 3.7.0
License MIT
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/BehaviorTree/BehaviorTree.CPP.git
VCS Type git
VCS Version master
Last Updated 2022-09-27
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

This package provides the Behavior Trees core library.

Additional Links

No additional links.

Maintainers

  • Davide Faconti

Authors

  • Michele Colledanchise
  • Davide Faconti

License MIT Version cmake ros1 ros2 LGTM Grade Discourse topics

BehaviorTree.CPP

This C++ 14 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 in your application.

There are 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.

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

  • You can statically link your custom TreeNodes or convert them into plugins which can be loaded 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.

  • Last but not least: it is well documented!

Documentation

You can learn about the main concepts, the API and the tutorials here: https://www.behaviortree.dev/

To find more details about the conceptual ideas that make this implementation different from others, you can read the final deliverable of the project MOOD2Be.

Forum and Community

If the documentation doesn't answer your questions and/or you want to connect with the other BT.CPP users, visit https://discourse.behaviortree.dev/

Commercial support

Are you using BT.CPP in your commercial product and you need technical support / consulting? You can get in touch at dfaconti@aurynrobotics.com and we will happy to discuss your use case and needs.

Design principles

The main goal of this project is to create a Behavior Tree implementation that uses the principles of Model Driven Development to separate the role of the Component Developer from the Behavior Designer.

In practice, this means that:

  • Custom TreeNodes must be reusable building blocks. You should be able to implement them once and reuse them to build many behaviors.

  • To build a Behavior Tree out of TreeNodes, the Behavior Designer must not need to read nor modify the C++ source code of a given TreeNode.

  • Complex Behaviours must be composable using Subtrees

Many of the features and, sometimes, the apparent limitations of this library, might be a consequence of this design principle.

For instance, having a scoped BlackBoard, visible only in a portion of the tree, is particularly important to avoid "name pollution" and allow the creation of large scale trees.

GUI Editor

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

If you are looking for a more fancy graphical user interface (and I know you do) check Groot out.

Groot screenshot

Watch Groot and BehaviorTree.CPP in action

Click on the following image to see a short video of how the C++ library and the graphic user interface are used to design and monitor a Behavior Tree.

MOOD2Be

How to compile (plain old cmake)

On Ubuntu, you are encourage to install the following dependencies:

 sudo apt-get install libzmq3-dev libboost-dev

Other dependencies are already included in the 3rdparty folder.

To compile and install the library, from the BehaviorTree.CPP folder, execute:

 mkdir build; cd build
 cmake ..
 make
 sudo make install

If you want to use BT.CPp in your application a typical CMakeLists.txt file will look like this:

cmake_minimum_required(VERSION 3.5)

project(hello_BT)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(behaviortree_cpp_v3)

add_executable(${PROJECT_NAME} "hello_BT.cpp")
target_link_libraries(${PROJECT_NAME} BT::behaviortree_cpp_v3)

ROS1 or ROS2 users (Catkin/Ament)

You can easily install the package with the command

  sudo apt-get install ros-$ROS_DISTRO-behaviortree-cpp-v3

If you want to compile it with catkin, you must include this package to your catkin workspace.

Acknowledgement

This library was initially developed at Eurecat - https://eurecat.org/en/ (main author, Davide Faconti) in a joint effort with the Italian Institute of Technology (Michele Colledanchise).

This software is one of the main components of MOOD2Be, which is one of the six Integrated Technical Projects (ITPs) selected from the RobMoSys first open call. Therefore, MOOD2Be has been supported by the European Horizon2020 project RobMoSys. This software is RobMoSys conformant.

RobMoSys Conformant

Further readings

  • Introductory article: Behavior trees for AI: How they work

  • How Behavior Trees Modularize Hybrid Control Systems and Generalize Sequential Behavior Compositions, the Subsumption Architecture, and Decision Trees. Michele Colledanchise and Petter Ogren. IEEE Transaction on Robotics 2017.

  • Behavior Trees in Robotics and AI, published by CRC Press Taylor & Francis, available for purchase (ebook and hardcover) on the CRC Press Store or Amazon.

The Preprint version (free) is available here: https://arxiv.org/abs/1709.00084

License

The MIT License (MIT)

Copyright (c) 2014-2018 Michele Colledanchise

Copyright (c) 2018-2019 Davide Faconti, Eurecat

Copyright (c) 2019-2021 Davide Faconti

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

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

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

CHANGELOG

Changelog for package behaviortree_cpp

3.7.0 (2022-05-23) -----------* add netlify stuff * Event based trigger introduced Added a new mechanism to emit \"state changed\" events that can \"wake up\" a tree. In short, it just provide an interruptible \"sleep\" function. * Fixed bug where including relative paths would fail to find the correct file (#358) * Added unit tests to verify current behavior * Fixed bug where including relative paths would fail to find the correct file * Added gtest environment to access executable path This path lets tests access files relative to the executable for better transportability * Changed file commandto add_custom_target The file command only copies during the cmake configure step. If source files change, file is not ran again * Added pure CMake action to PR checks (#378) * Added CMake CI to PR checks * Renamed action to follow pattern * updated documentation * add the ability to register multiple BTs (#373) * Update ros1.yaml * fix #338 * fix issue #330 * fix issue #360 * Merge branch \'master\' of github.com:BehaviorTree/BehaviorTree.CPP * Update Tutorial 2 Docuemtation (#372) * Update tutorial_09_coroutines.md (#359) Minor fix, renamed Timepoint to TimePoint. * Export dependency on ament_index_cpp (#362) To make dependent packages try to link ament_index_cpp, export the dependency explicitly. * Change order of lock to prevent deadlock. (#368) Resolves #367. * Fix #320 : forbit refrences in Any * Update action_node.h * Contributors: Adam Sasine, Davide Faconti, Fabian Schurig, Griswald Brooks, Hyeongsik Min, Robodrome, imgbot[bot], panwauu

3.6.1 (2022-03-06)

  • remove windows tests
  • fix thread safety
  • fix CI
  • Don\'t restart SequenceStar on halt (#329)
    • Add more SequenceStar tests
    • Fix typo in test name
    • Don\'t reset SequenceStar on halt
  • [docs] add missing node SmashDoor (#342)
  • ROS2 include ros_pkg attribute support (#351)

    • ROS2 include pkg support

    * ros2 build fixed Co-authored-by: Benjamin Linne <benjamin.linne.civ@army.mil>

  • [ImgBot] Optimize images (#334) *Total -- 90.34kb -> 61.77kb (31.63%) /docs/images/Tutorial1.svg -- 10.08kb -> 6.33kb (37.19%) /docs/images/FetchBeerFails.svg -- 9.00kb -> 5.93kb (34.13%) /docs/images/FetchBeer2.svg -- 21.19kb -> 14.41kb (32%) /docs/images/Tutorial2.svg -- 34.19kb -> 23.75kb (30.54%) /docs/images/DecoratorEnterRoom.svg -- 15.88kb -> 11.35kb (28.54%) Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

  • [Docs] BT_basics fix typo (#343)

  • [docs] Clarify sentence (#344) ... will sleep up to 8 hours or less, if he/she is fully rested. was not clear. It can also be understood as If he/she is fully rested, the character will sleep ...

  • [docs] match text to graphics (#340)

  • Docs: BT_basics fix typo (#337)

  • Merge branch \'master\' of github.com:BehaviorTree/BehaviorTree.CPP

  • fix svg

  • Fix CMake ENABLE_COROUTINES flag with Boost < 1.59 (#335) Co-authored-by: Cam Fulton <cfulton@symbotic.com>

  • Add ENABLE_COROUTINES CMake option (#316)

    • Add DISABLE_COROUTINES CMake option

    * Change convention of CMake coroutine flag to ENABLE Co-authored-by: Cam Fulton <cfulton@symbotic.com>

  • [ImgBot] Optimize images (#333) *Total -- 152.97kb -> 114.57kb (25.1%) /docs/images/ReactiveSequence.svg -- 7.58kb -> 4.59kb (39.47%) /docs/images/SequenceNode.svg -- 11.28kb -> 7.12kb (36.87%) /docs/images/SequenceStar.svg -- 11.22kb -> 7.09kb (36.8%) /docs/images/DecoratorEnterRoom.svg -- 20.71kb -> 13.30kb (35.77%) /docs/images/FallbackBasic.svg -- 19.09kb -> 12.64kb (33.79%) /docs/images/FetchBeer.svg -- 24.30kb -> 16.36kb (32.66%) /docs/images/SequenceBasic.svg -- 6.32kb -> 5.49kb (13.04%) /docs/images/Tutorial1.svg -- 6.67kb -> 5.94kb (10.98%) /docs/images/FetchBeerFails.svg -- 6.46kb -> 5.83kb (9.76%) /docs/images/FetchBeer2.svg -- 14.99kb -> 13.76kb (8.18%) /docs/images/Tutorial2.svg -- 24.35kb -> 22.44kb (7.85%) Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

  • doc fix

  • Merge branch \'new_doc\'

  • remove deprecated code

  • updated documentation

  • [Fix] Fix cmake version warning and -Wformat warning (#319) Co-authored-by: Homalozoa <xuhaiwang@xiaomi.com>

  • Update README.md

  • Fix Windows shared lib build (#323)

  • fix shadowed variable in string_view.hpp (#327)

  • Build Sample Nodes By Default to Fix Github Action (#332)

    • Fix github action
    • Change working directory in github action step
    • Build samples by default
  • Added BlackboardCheckBool decorator node (#326)

    • Added tests for BlackboardCheck decorator node
    • Added BlackboardCheckBool decorator node
  • Fixed typo \"Exeption\" -> \"Exception\" (#331)

  • WIP

  • fix #325

  • Contributors: Adam Sasine, Affonso, Guilherme, Alberto Soragna, Davide Faconti, Homalozoa X, Jake Keller, Philippe Couvignou, Tobias Fischer, benjinne, fultoncjb, goekce, imgbot[bot]

3.6.0 (2021-11-10)

  • Build samples independently of examples (#315)
  • Fix dependency in package.xml (#313)
  • Fix doc statement (#309) Fix sentence
  • Fix references to RetryUntilSuccesful (#308)
    • Fix github action
    • Fix references to RetryUntilSuccesful
  • added subclass RetryNodeTypo (#295) Co-authored-by: Subaru Arai <SubaruArai@local>
  • Fix github action (#302)
  • Minor spelling correction (#305) Corrected the_aswer to the_answer
  • Update FallbackNode.md (#306) typo correction.
  • Add signal handler for Windows (#307)
  • fix
  • file renamed and documentation fixed
  • Update documentation for reactive sequence (#286)
  • Update FallbackNode.md (#287) Fix the pseudocode in the documentation of \'Reactive Fallback\' according to its source code.
  • Update fallback documentation to V3 (#288)
    • Update FallbackNode.md description to V3
    • Fix typo
  • Use pedantic for non MSVC builds (#289)
  • Merge branch \'master\' of https://github.com/BehaviorTree/BehaviorTree.CPP
  • updated to latest flatbuffers
  • Update README.md
  • Fix issue #273
  • remove potential crash when an unfinished tree throws an exception
  • remove appveyor
  • Merge branch \'git_actions\'
  • Fixes for compilation on windows. (#248) * Fix for detecting ZeroMQ on windows Naming convention is a bit different for ZeroMQ, specifically on Windows with vcpkg. While ZMQ and ZeroMQ are valid on linux, the ZMQ naming convention only works on linux.

    • Compilation on windows not working with /WX

    * Macro collision on Windows On windows, the macros defined in the abstract logger collides with other in windows.h. Made them lowercase to avoid collision

  • Remove native support for Conan (#280)

  • add github workflow

  • Registered missing dummy nodes for examples (#275)

    • Added CheckTemperature dummy node
    • Added SayHello dummy node
  • add zmq.hpp in 3rdparty dirfectory

  • add test

  • fix some warnings

  • Fix bug on halt of delay node (#272)

    • When DelayNode is halted and ticked again, it always returned FAILURE since the state of DelayNode was not properly reset.

    - This commit fixes unexpected behavior of DelayNode when it is halted. Co-authored-by: Jinwoo Choi <jinwoos.choi@samsung.com>

  • Clear all of blackboard\'s content (#269)

  • Added printTreeRecursively overload with ostream parameter (#264)

    • Added overload to printTreeRecursively
    • Changed include to iosfwd
    • Added test to verify function writes to stream
    • Added call to overload without stream parameter
    • Fixed conversion error
    • Removed overload in favor of default argument
  • Fix typo (#260) Co-authored-by: Francesco Vigni <francesco.vigni@sttech.de>

  • Update README.md

  • abstract_logger.h: fixed a typo (#257)

  • Contributors: Adam Sasine, Affonso, Guilherme, Akash, Billy, Cong Liu, Daisuke Nishimatsu, Davide Faconti, Francesco Vigni, Heben, Jake Keller, Per-Arne Andersen, Ross Weir, Steve Macenski, SubaruArai, Taehyeon, Uilian Ries, Yadu, Yuwei Liang, matthews-jca, swarajpeppermint

3.5.6 (2021-02-03)

3.5.5 (2021-01-27)

  • fix issue #251
  • Contributors: Davide Faconti

3.5.4 (2020-12-10)

  • Update bt_factory.cpp (#245)
  • Use the latest version of zmq.hpp
  • Improved switching BTs with active Groot monitoring (ZMQ logger destruction) (#244)
    • Skip 100ms (max) wait for detached thread
    • add {} to single line if statements
  • Update retry_node.cpp
  • fix
  • fix issue #230
  • Contributors: Davide Faconti, Florian Gram

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged behaviortree_cpp_v3 at answers.ros.org

behaviortree_cpp_v3 package from behaviortree_cpp repo

behaviortree_cpp_v3

Package Summary

Tags No category tags.
Version 3.7.0
License MIT
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/BehaviorTree/BehaviorTree.CPP.git
VCS Type git
VCS Version master
Last Updated 2022-09-27
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

This package provides the Behavior Trees core library.

Additional Links

No additional links.

Maintainers

  • Davide Faconti

Authors

  • Michele Colledanchise
  • Davide Faconti

License MIT Version cmake ros1 ros2 LGTM Grade Discourse topics

BehaviorTree.CPP

This C++ 14 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 in your application.

There are 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.

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

  • You can statically link your custom TreeNodes or convert them into plugins which can be loaded 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.

  • Last but not least: it is well documented!

Documentation

You can learn about the main concepts, the API and the tutorials here: https://www.behaviortree.dev/

To find more details about the conceptual ideas that make this implementation different from others, you can read the final deliverable of the project MOOD2Be.

Forum and Community

If the documentation doesn't answer your questions and/or you want to connect with the other BT.CPP users, visit https://discourse.behaviortree.dev/

Commercial support

Are you using BT.CPP in your commercial product and you need technical support / consulting? You can get in touch at dfaconti@aurynrobotics.com and we will happy to discuss your use case and needs.

Design principles

The main goal of this project is to create a Behavior Tree implementation that uses the principles of Model Driven Development to separate the role of the Component Developer from the Behavior Designer.

In practice, this means that:

  • Custom TreeNodes must be reusable building blocks. You should be able to implement them once and reuse them to build many behaviors.

  • To build a Behavior Tree out of TreeNodes, the Behavior Designer must not need to read nor modify the C++ source code of a given TreeNode.

  • Complex Behaviours must be composable using Subtrees

Many of the features and, sometimes, the apparent limitations of this library, might be a consequence of this design principle.

For instance, having a scoped BlackBoard, visible only in a portion of the tree, is particularly important to avoid "name pollution" and allow the creation of large scale trees.

GUI Editor

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

If you are looking for a more fancy graphical user interface (and I know you do) check Groot out.

Groot screenshot

Watch Groot and BehaviorTree.CPP in action

Click on the following image to see a short video of how the C++ library and the graphic user interface are used to design and monitor a Behavior Tree.

MOOD2Be

How to compile (plain old cmake)

On Ubuntu, you are encourage to install the following dependencies:

 sudo apt-get install libzmq3-dev libboost-dev

Other dependencies are already included in the 3rdparty folder.

To compile and install the library, from the BehaviorTree.CPP folder, execute:

 mkdir build; cd build
 cmake ..
 make
 sudo make install

If you want to use BT.CPp in your application a typical CMakeLists.txt file will look like this:

cmake_minimum_required(VERSION 3.5)

project(hello_BT)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(behaviortree_cpp_v3)

add_executable(${PROJECT_NAME} "hello_BT.cpp")
target_link_libraries(${PROJECT_NAME} BT::behaviortree_cpp_v3)

ROS1 or ROS2 users (Catkin/Ament)

You can easily install the package with the command

  sudo apt-get install ros-$ROS_DISTRO-behaviortree-cpp-v3

If you want to compile it with catkin, you must include this package to your catkin workspace.

Acknowledgement

This library was initially developed at Eurecat - https://eurecat.org/en/ (main author, Davide Faconti) in a joint effort with the Italian Institute of Technology (Michele Colledanchise).

This software is one of the main components of MOOD2Be, which is one of the six Integrated Technical Projects (ITPs) selected from the RobMoSys first open call. Therefore, MOOD2Be has been supported by the European Horizon2020 project RobMoSys. This software is RobMoSys conformant.

RobMoSys Conformant

Further readings

  • Introductory article: Behavior trees for AI: How they work

  • How Behavior Trees Modularize Hybrid Control Systems and Generalize Sequential Behavior Compositions, the Subsumption Architecture, and Decision Trees. Michele Colledanchise and Petter Ogren. IEEE Transaction on Robotics 2017.

  • Behavior Trees in Robotics and AI, published by CRC Press Taylor & Francis, available for purchase (ebook and hardcover) on the CRC Press Store or Amazon.

The Preprint version (free) is available here: https://arxiv.org/abs/1709.00084

License

The MIT License (MIT)

Copyright (c) 2014-2018 Michele Colledanchise

Copyright (c) 2018-2019 Davide Faconti, Eurecat

Copyright (c) 2019-2021 Davide Faconti

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

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

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

CHANGELOG

Changelog for package behaviortree_cpp

3.7.0 (2022-05-23) -----------* add netlify stuff * Event based trigger introduced Added a new mechanism to emit \"state changed\" events that can \"wake up\" a tree. In short, it just provide an interruptible \"sleep\" function. * Fixed bug where including relative paths would fail to find the correct file (#358) * Added unit tests to verify current behavior * Fixed bug where including relative paths would fail to find the correct file * Added gtest environment to access executable path This path lets tests access files relative to the executable for better transportability * Changed file commandto add_custom_target The file command only copies during the cmake configure step. If source files change, file is not ran again * Added pure CMake action to PR checks (#378) * Added CMake CI to PR checks * Renamed action to follow pattern * updated documentation * add the ability to register multiple BTs (#373) * Update ros1.yaml * fix #338 * fix issue #330 * fix issue #360 * Merge branch \'master\' of github.com:BehaviorTree/BehaviorTree.CPP * Update Tutorial 2 Docuemtation (#372) * Update tutorial_09_coroutines.md (#359) Minor fix, renamed Timepoint to TimePoint. * Export dependency on ament_index_cpp (#362) To make dependent packages try to link ament_index_cpp, export the dependency explicitly. * Change order of lock to prevent deadlock. (#368) Resolves #367. * Fix #320 : forbit refrences in Any * Update action_node.h * Contributors: Adam Sasine, Davide Faconti, Fabian Schurig, Griswald Brooks, Hyeongsik Min, Robodrome, imgbot[bot], panwauu

3.6.1 (2022-03-06)

  • remove windows tests
  • fix thread safety
  • fix CI
  • Don\'t restart SequenceStar on halt (#329)
    • Add more SequenceStar tests
    • Fix typo in test name
    • Don\'t reset SequenceStar on halt
  • [docs] add missing node SmashDoor (#342)
  • ROS2 include ros_pkg attribute support (#351)

    • ROS2 include pkg support

    * ros2 build fixed Co-authored-by: Benjamin Linne <benjamin.linne.civ@army.mil>

  • [ImgBot] Optimize images (#334) *Total -- 90.34kb -> 61.77kb (31.63%) /docs/images/Tutorial1.svg -- 10.08kb -> 6.33kb (37.19%) /docs/images/FetchBeerFails.svg -- 9.00kb -> 5.93kb (34.13%) /docs/images/FetchBeer2.svg -- 21.19kb -> 14.41kb (32%) /docs/images/Tutorial2.svg -- 34.19kb -> 23.75kb (30.54%) /docs/images/DecoratorEnterRoom.svg -- 15.88kb -> 11.35kb (28.54%) Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

  • [Docs] BT_basics fix typo (#343)

  • [docs] Clarify sentence (#344) ... will sleep up to 8 hours or less, if he/she is fully rested. was not clear. It can also be understood as If he/she is fully rested, the character will sleep ...

  • [docs] match text to graphics (#340)

  • Docs: BT_basics fix typo (#337)

  • Merge branch \'master\' of github.com:BehaviorTree/BehaviorTree.CPP

  • fix svg

  • Fix CMake ENABLE_COROUTINES flag with Boost < 1.59 (#335) Co-authored-by: Cam Fulton <cfulton@symbotic.com>

  • Add ENABLE_COROUTINES CMake option (#316)

    • Add DISABLE_COROUTINES CMake option

    * Change convention of CMake coroutine flag to ENABLE Co-authored-by: Cam Fulton <cfulton@symbotic.com>

  • [ImgBot] Optimize images (#333) *Total -- 152.97kb -> 114.57kb (25.1%) /docs/images/ReactiveSequence.svg -- 7.58kb -> 4.59kb (39.47%) /docs/images/SequenceNode.svg -- 11.28kb -> 7.12kb (36.87%) /docs/images/SequenceStar.svg -- 11.22kb -> 7.09kb (36.8%) /docs/images/DecoratorEnterRoom.svg -- 20.71kb -> 13.30kb (35.77%) /docs/images/FallbackBasic.svg -- 19.09kb -> 12.64kb (33.79%) /docs/images/FetchBeer.svg -- 24.30kb -> 16.36kb (32.66%) /docs/images/SequenceBasic.svg -- 6.32kb -> 5.49kb (13.04%) /docs/images/Tutorial1.svg -- 6.67kb -> 5.94kb (10.98%) /docs/images/FetchBeerFails.svg -- 6.46kb -> 5.83kb (9.76%) /docs/images/FetchBeer2.svg -- 14.99kb -> 13.76kb (8.18%) /docs/images/Tutorial2.svg -- 24.35kb -> 22.44kb (7.85%) Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

  • doc fix

  • Merge branch \'new_doc\'

  • remove deprecated code

  • updated documentation

  • [Fix] Fix cmake version warning and -Wformat warning (#319) Co-authored-by: Homalozoa <xuhaiwang@xiaomi.com>

  • Update README.md

  • Fix Windows shared lib build (#323)

  • fix shadowed variable in string_view.hpp (#327)

  • Build Sample Nodes By Default to Fix Github Action (#332)

    • Fix github action
    • Change working directory in github action step
    • Build samples by default
  • Added BlackboardCheckBool decorator node (#326)

    • Added tests for BlackboardCheck decorator node
    • Added BlackboardCheckBool decorator node
  • Fixed typo \"Exeption\" -> \"Exception\" (#331)

  • WIP

  • fix #325

  • Contributors: Adam Sasine, Affonso, Guilherme, Alberto Soragna, Davide Faconti, Homalozoa X, Jake Keller, Philippe Couvignou, Tobias Fischer, benjinne, fultoncjb, goekce, imgbot[bot]

3.6.0 (2021-11-10)

  • Build samples independently of examples (#315)
  • Fix dependency in package.xml (#313)
  • Fix doc statement (#309) Fix sentence
  • Fix references to RetryUntilSuccesful (#308)
    • Fix github action
    • Fix references to RetryUntilSuccesful
  • added subclass RetryNodeTypo (#295) Co-authored-by: Subaru Arai <SubaruArai@local>
  • Fix github action (#302)
  • Minor spelling correction (#305) Corrected the_aswer to the_answer
  • Update FallbackNode.md (#306) typo correction.
  • Add signal handler for Windows (#307)
  • fix
  • file renamed and documentation fixed
  • Update documentation for reactive sequence (#286)
  • Update FallbackNode.md (#287) Fix the pseudocode in the documentation of \'Reactive Fallback\' according to its source code.
  • Update fallback documentation to V3 (#288)
    • Update FallbackNode.md description to V3
    • Fix typo
  • Use pedantic for non MSVC builds (#289)
  • Merge branch \'master\' of https://github.com/BehaviorTree/BehaviorTree.CPP
  • updated to latest flatbuffers
  • Update README.md
  • Fix issue #273
  • remove potential crash when an unfinished tree throws an exception
  • remove appveyor
  • Merge branch \'git_actions\'
  • Fixes for compilation on windows. (#248) * Fix for detecting ZeroMQ on windows Naming convention is a bit different for ZeroMQ, specifically on Windows with vcpkg. While ZMQ and ZeroMQ are valid on linux, the ZMQ naming convention only works on linux.

    • Compilation on windows not working with /WX

    * Macro collision on Windows On windows, the macros defined in the abstract logger collides with other in windows.h. Made them lowercase to avoid collision

  • Remove native support for Conan (#280)

  • add github workflow

  • Registered missing dummy nodes for examples (#275)

    • Added CheckTemperature dummy node
    • Added SayHello dummy node
  • add zmq.hpp in 3rdparty dirfectory

  • add test

  • fix some warnings

  • Fix bug on halt of delay node (#272)

    • When DelayNode is halted and ticked again, it always returned FAILURE since the state of DelayNode was not properly reset.

    - This commit fixes unexpected behavior of DelayNode when it is halted. Co-authored-by: Jinwoo Choi <jinwoos.choi@samsung.com>

  • Clear all of blackboard\'s content (#269)

  • Added printTreeRecursively overload with ostream parameter (#264)

    • Added overload to printTreeRecursively
    • Changed include to iosfwd
    • Added test to verify function writes to stream
    • Added call to overload without stream parameter
    • Fixed conversion error
    • Removed overload in favor of default argument
  • Fix typo (#260) Co-authored-by: Francesco Vigni <francesco.vigni@sttech.de>

  • Update README.md

  • abstract_logger.h: fixed a typo (#257)

  • Contributors: Adam Sasine, Affonso, Guilherme, Akash, Billy, Cong Liu, Daisuke Nishimatsu, Davide Faconti, Francesco Vigni, Heben, Jake Keller, Per-Arne Andersen, Ross Weir, Steve Macenski, SubaruArai, Taehyeon, Uilian Ries, Yadu, Yuwei Liang, matthews-jca, swarajpeppermint

3.5.6 (2021-02-03)

3.5.5 (2021-01-27)

  • fix issue #251
  • Contributors: Davide Faconti

3.5.4 (2020-12-10)

  • Update bt_factory.cpp (#245)
  • Use the latest version of zmq.hpp
  • Improved switching BTs with active Groot monitoring (ZMQ logger destruction) (#244)
    • Skip 100ms (max) wait for detached thread
    • add {} to single line if statements
  • Update retry_node.cpp
  • fix
  • fix issue #230
  • Contributors: Davide Faconti, Florian Gram

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged behaviortree_cpp_v3 at answers.ros.org

behaviortree_cpp_v3 package from behaviortree_cpp repo

behaviortree_cpp_v3

Package Summary

Tags No category tags.
Version 3.7.0
License MIT
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/BehaviorTree/BehaviorTree.CPP.git
VCS Type git
VCS Version master
Last Updated 2022-09-27
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

This package provides the Behavior Trees core library.

Additional Links

No additional links.

Maintainers

  • Davide Faconti

Authors

  • Michele Colledanchise
  • Davide Faconti

License MIT Version cmake ros1 ros2 LGTM Grade Discourse topics

BehaviorTree.CPP

This C++ 14 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 in your application.

There are 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.

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

  • You can statically link your custom TreeNodes or convert them into plugins which can be loaded 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.

  • Last but not least: it is well documented!

Documentation

You can learn about the main concepts, the API and the tutorials here: https://www.behaviortree.dev/

To find more details about the conceptual ideas that make this implementation different from others, you can read the final deliverable of the project MOOD2Be.

Forum and Community

If the documentation doesn't answer your questions and/or you want to connect with the other BT.CPP users, visit https://discourse.behaviortree.dev/

Commercial support

Are you using BT.CPP in your commercial product and you need technical support / consulting? You can get in touch at dfaconti@aurynrobotics.com and we will happy to discuss your use case and needs.

Design principles

The main goal of this project is to create a Behavior Tree implementation that uses the principles of Model Driven Development to separate the role of the Component Developer from the Behavior Designer.

In practice, this means that:

  • Custom TreeNodes must be reusable building blocks. You should be able to implement them once and reuse them to build many behaviors.

  • To build a Behavior Tree out of TreeNodes, the Behavior Designer must not need to read nor modify the C++ source code of a given TreeNode.

  • Complex Behaviours must be composable using Subtrees

Many of the features and, sometimes, the apparent limitations of this library, might be a consequence of this design principle.

For instance, having a scoped BlackBoard, visible only in a portion of the tree, is particularly important to avoid "name pollution" and allow the creation of large scale trees.

GUI Editor

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

If you are looking for a more fancy graphical user interface (and I know you do) check Groot out.

Groot screenshot

Watch Groot and BehaviorTree.CPP in action

Click on the following image to see a short video of how the C++ library and the graphic user interface are used to design and monitor a Behavior Tree.

MOOD2Be

How to compile (plain old cmake)

On Ubuntu, you are encourage to install the following dependencies:

 sudo apt-get install libzmq3-dev libboost-dev

Other dependencies are already included in the 3rdparty folder.

To compile and install the library, from the BehaviorTree.CPP folder, execute:

 mkdir build; cd build
 cmake ..
 make
 sudo make install

If you want to use BT.CPp in your application a typical CMakeLists.txt file will look like this:

cmake_minimum_required(VERSION 3.5)

project(hello_BT)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(behaviortree_cpp_v3)

add_executable(${PROJECT_NAME} "hello_BT.cpp")
target_link_libraries(${PROJECT_NAME} BT::behaviortree_cpp_v3)

ROS1 or ROS2 users (Catkin/Ament)

You can easily install the package with the command

  sudo apt-get install ros-$ROS_DISTRO-behaviortree-cpp-v3

If you want to compile it with catkin, you must include this package to your catkin workspace.

Acknowledgement

This library was initially developed at Eurecat - https://eurecat.org/en/ (main author, Davide Faconti) in a joint effort with the Italian Institute of Technology (Michele Colledanchise).

This software is one of the main components of MOOD2Be, which is one of the six Integrated Technical Projects (ITPs) selected from the RobMoSys first open call. Therefore, MOOD2Be has been supported by the European Horizon2020 project RobMoSys. This software is RobMoSys conformant.

RobMoSys Conformant

Further readings

  • Introductory article: Behavior trees for AI: How they work

  • How Behavior Trees Modularize Hybrid Control Systems and Generalize Sequential Behavior Compositions, the Subsumption Architecture, and Decision Trees. Michele Colledanchise and Petter Ogren. IEEE Transaction on Robotics 2017.

  • Behavior Trees in Robotics and AI, published by CRC Press Taylor & Francis, available for purchase (ebook and hardcover) on the CRC Press Store or Amazon.

The Preprint version (free) is available here: https://arxiv.org/abs/1709.00084

License

The MIT License (MIT)

Copyright (c) 2014-2018 Michele Colledanchise

Copyright (c) 2018-2019 Davide Faconti, Eurecat

Copyright (c) 2019-2021 Davide Faconti

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

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

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

CHANGELOG

Changelog for package behaviortree_cpp

3.7.0 (2022-05-23) -----------* add netlify stuff * Event based trigger introduced Added a new mechanism to emit \"state changed\" events that can \"wake up\" a tree. In short, it just provide an interruptible \"sleep\" function. * Fixed bug where including relative paths would fail to find the correct file (#358) * Added unit tests to verify current behavior * Fixed bug where including relative paths would fail to find the correct file * Added gtest environment to access executable path This path lets tests access files relative to the executable for better transportability * Changed file commandto add_custom_target The file command only copies during the cmake configure step. If source files change, file is not ran again * Added pure CMake action to PR checks (#378) * Added CMake CI to PR checks * Renamed action to follow pattern * updated documentation * add the ability to register multiple BTs (#373) * Update ros1.yaml * fix #338 * fix issue #330 * fix issue #360 * Merge branch \'master\' of github.com:BehaviorTree/BehaviorTree.CPP * Update Tutorial 2 Docuemtation (#372) * Update tutorial_09_coroutines.md (#359) Minor fix, renamed Timepoint to TimePoint. * Export dependency on ament_index_cpp (#362) To make dependent packages try to link ament_index_cpp, export the dependency explicitly. * Change order of lock to prevent deadlock. (#368) Resolves #367. * Fix #320 : forbit refrences in Any * Update action_node.h * Contributors: Adam Sasine, Davide Faconti, Fabian Schurig, Griswald Brooks, Hyeongsik Min, Robodrome, imgbot[bot], panwauu

3.6.1 (2022-03-06)

  • remove windows tests
  • fix thread safety
  • fix CI
  • Don\'t restart SequenceStar on halt (#329)
    • Add more SequenceStar tests
    • Fix typo in test name
    • Don\'t reset SequenceStar on halt
  • [docs] add missing node SmashDoor (#342)
  • ROS2 include ros_pkg attribute support (#351)

    • ROS2 include pkg support

    * ros2 build fixed Co-authored-by: Benjamin Linne <benjamin.linne.civ@army.mil>

  • [ImgBot] Optimize images (#334) *Total -- 90.34kb -> 61.77kb (31.63%) /docs/images/Tutorial1.svg -- 10.08kb -> 6.33kb (37.19%) /docs/images/FetchBeerFails.svg -- 9.00kb -> 5.93kb (34.13%) /docs/images/FetchBeer2.svg -- 21.19kb -> 14.41kb (32%) /docs/images/Tutorial2.svg -- 34.19kb -> 23.75kb (30.54%) /docs/images/DecoratorEnterRoom.svg -- 15.88kb -> 11.35kb (28.54%) Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

  • [Docs] BT_basics fix typo (#343)

  • [docs] Clarify sentence (#344) ... will sleep up to 8 hours or less, if he/she is fully rested. was not clear. It can also be understood as If he/she is fully rested, the character will sleep ...

  • [docs] match text to graphics (#340)

  • Docs: BT_basics fix typo (#337)

  • Merge branch \'master\' of github.com:BehaviorTree/BehaviorTree.CPP

  • fix svg

  • Fix CMake ENABLE_COROUTINES flag with Boost < 1.59 (#335) Co-authored-by: Cam Fulton <cfulton@symbotic.com>

  • Add ENABLE_COROUTINES CMake option (#316)

    • Add DISABLE_COROUTINES CMake option

    * Change convention of CMake coroutine flag to ENABLE Co-authored-by: Cam Fulton <cfulton@symbotic.com>

  • [ImgBot] Optimize images (#333) *Total -- 152.97kb -> 114.57kb (25.1%) /docs/images/ReactiveSequence.svg -- 7.58kb -> 4.59kb (39.47%) /docs/images/SequenceNode.svg -- 11.28kb -> 7.12kb (36.87%) /docs/images/SequenceStar.svg -- 11.22kb -> 7.09kb (36.8%) /docs/images/DecoratorEnterRoom.svg -- 20.71kb -> 13.30kb (35.77%) /docs/images/FallbackBasic.svg -- 19.09kb -> 12.64kb (33.79%) /docs/images/FetchBeer.svg -- 24.30kb -> 16.36kb (32.66%) /docs/images/SequenceBasic.svg -- 6.32kb -> 5.49kb (13.04%) /docs/images/Tutorial1.svg -- 6.67kb -> 5.94kb (10.98%) /docs/images/FetchBeerFails.svg -- 6.46kb -> 5.83kb (9.76%) /docs/images/FetchBeer2.svg -- 14.99kb -> 13.76kb (8.18%) /docs/images/Tutorial2.svg -- 24.35kb -> 22.44kb (7.85%) Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

  • doc fix

  • Merge branch \'new_doc\'

  • remove deprecated code

  • updated documentation

  • [Fix] Fix cmake version warning and -Wformat warning (#319) Co-authored-by: Homalozoa <xuhaiwang@xiaomi.com>

  • Update README.md

  • Fix Windows shared lib build (#323)

  • fix shadowed variable in string_view.hpp (#327)

  • Build Sample Nodes By Default to Fix Github Action (#332)

    • Fix github action
    • Change working directory in github action step
    • Build samples by default
  • Added BlackboardCheckBool decorator node (#326)

    • Added tests for BlackboardCheck decorator node
    • Added BlackboardCheckBool decorator node
  • Fixed typo \"Exeption\" -> \"Exception\" (#331)

  • WIP

  • fix #325

  • Contributors: Adam Sasine, Affonso, Guilherme, Alberto Soragna, Davide Faconti, Homalozoa X, Jake Keller, Philippe Couvignou, Tobias Fischer, benjinne, fultoncjb, goekce, imgbot[bot]

3.6.0 (2021-11-10)

  • Build samples independently of examples (#315)
  • Fix dependency in package.xml (#313)
  • Fix doc statement (#309) Fix sentence
  • Fix references to RetryUntilSuccesful (#308)
    • Fix github action
    • Fix references to RetryUntilSuccesful
  • added subclass RetryNodeTypo (#295) Co-authored-by: Subaru Arai <SubaruArai@local>
  • Fix github action (#302)
  • Minor spelling correction (#305) Corrected the_aswer to the_answer
  • Update FallbackNode.md (#306) typo correction.
  • Add signal handler for Windows (#307)
  • fix
  • file renamed and documentation fixed
  • Update documentation for reactive sequence (#286)
  • Update FallbackNode.md (#287) Fix the pseudocode in the documentation of \'Reactive Fallback\' according to its source code.
  • Update fallback documentation to V3 (#288)
    • Update FallbackNode.md description to V3
    • Fix typo
  • Use pedantic for non MSVC builds (#289)
  • Merge branch \'master\' of https://github.com/BehaviorTree/BehaviorTree.CPP
  • updated to latest flatbuffers
  • Update README.md
  • Fix issue #273
  • remove potential crash when an unfinished tree throws an exception
  • remove appveyor
  • Merge branch \'git_actions\'
  • Fixes for compilation on windows. (#248) * Fix for detecting ZeroMQ on windows Naming convention is a bit different for ZeroMQ, specifically on Windows with vcpkg. While ZMQ and ZeroMQ are valid on linux, the ZMQ naming convention only works on linux.

    • Compilation on windows not working with /WX

    * Macro collision on Windows On windows, the macros defined in the abstract logger collides with other in windows.h. Made them lowercase to avoid collision

  • Remove native support for Conan (#280)

  • add github workflow

  • Registered missing dummy nodes for examples (#275)

    • Added CheckTemperature dummy node
    • Added SayHello dummy node
  • add zmq.hpp in 3rdparty dirfectory

  • add test

  • fix some warnings

  • Fix bug on halt of delay node (#272)

    • When DelayNode is halted and ticked again, it always returned FAILURE since the state of DelayNode was not properly reset.

    - This commit fixes unexpected behavior of DelayNode when it is halted. Co-authored-by: Jinwoo Choi <jinwoos.choi@samsung.com>

  • Clear all of blackboard\'s content (#269)

  • Added printTreeRecursively overload with ostream parameter (#264)

    • Added overload to printTreeRecursively
    • Changed include to iosfwd
    • Added test to verify function writes to stream
    • Added call to overload without stream parameter
    • Fixed conversion error
    • Removed overload in favor of default argument
  • Fix typo (#260) Co-authored-by: Francesco Vigni <francesco.vigni@sttech.de>

  • Update README.md

  • abstract_logger.h: fixed a typo (#257)

  • Contributors: Adam Sasine, Affonso, Guilherme, Akash, Billy, Cong Liu, Daisuke Nishimatsu, Davide Faconti, Francesco Vigni, Heben, Jake Keller, Per-Arne Andersen, Ross Weir, Steve Macenski, SubaruArai, Taehyeon, Uilian Ries, Yadu, Yuwei Liang, matthews-jca, swarajpeppermint

3.5.6 (2021-02-03)

3.5.5 (2021-01-27)

  • fix issue #251
  • Contributors: Davide Faconti

3.5.4 (2020-12-10)

  • Update bt_factory.cpp (#245)
  • Use the latest version of zmq.hpp
  • Improved switching BTs with active Groot monitoring (ZMQ logger destruction) (#244)
    • Skip 100ms (max) wait for detached thread
    • add {} to single line if statements
  • Update retry_node.cpp
  • fix
  • fix issue #230
  • Contributors: Davide Faconti, Florian Gram

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged behaviortree_cpp_v3 at answers.ros.org

behaviortree_cpp_v3 package from behaviortree_cpp repo

behaviortree_cpp_v3

Package Summary

Tags No category tags.
Version 3.7.0
License MIT
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/BehaviorTree/BehaviorTree.CPP.git
VCS Type git
VCS Version master
Last Updated 2022-09-27
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

This package provides the Behavior Trees core library.

Additional Links

No additional links.

Maintainers

  • Davide Faconti

Authors

  • Michele Colledanchise
  • Davide Faconti

License MIT Version cmake ros1 ros2 LGTM Grade Discourse topics

BehaviorTree.CPP

This C++ 14 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 in your application.

There are 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.

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

  • You can statically link your custom TreeNodes or convert them into plugins which can be loaded 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.

  • Last but not least: it is well documented!

Documentation

You can learn about the main concepts, the API and the tutorials here: https://www.behaviortree.dev/

To find more details about the conceptual ideas that make this implementation different from others, you can read the final deliverable of the project MOOD2Be.

Forum and Community

If the documentation doesn't answer your questions and/or you want to connect with the other BT.CPP users, visit https://discourse.behaviortree.dev/

Commercial support

Are you using BT.CPP in your commercial product and you need technical support / consulting? You can get in touch at dfaconti@aurynrobotics.com and we will happy to discuss your use case and needs.

Design principles

The main goal of this project is to create a Behavior Tree implementation that uses the principles of Model Driven Development to separate the role of the Component Developer from the Behavior Designer.

In practice, this means that:

  • Custom TreeNodes must be reusable building blocks. You should be able to implement them once and reuse them to build many behaviors.

  • To build a Behavior Tree out of TreeNodes, the Behavior Designer must not need to read nor modify the C++ source code of a given TreeNode.

  • Complex Behaviours must be composable using Subtrees

Many of the features and, sometimes, the apparent limitations of this library, might be a consequence of this design principle.

For instance, having a scoped BlackBoard, visible only in a portion of the tree, is particularly important to avoid "name pollution" and allow the creation of large scale trees.

GUI Editor

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

If you are looking for a more fancy graphical user interface (and I know you do) check Groot out.

Groot screenshot

Watch Groot and BehaviorTree.CPP in action

Click on the following image to see a short video of how the C++ library and the graphic user interface are used to design and monitor a Behavior Tree.

MOOD2Be

How to compile (plain old cmake)

On Ubuntu, you are encourage to install the following dependencies:

 sudo apt-get install libzmq3-dev libboost-dev

Other dependencies are already included in the 3rdparty folder.

To compile and install the library, from the BehaviorTree.CPP folder, execute:

 mkdir build; cd build
 cmake ..
 make
 sudo make install

If you want to use BT.CPp in your application a typical CMakeLists.txt file will look like this:

cmake_minimum_required(VERSION 3.5)

project(hello_BT)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(behaviortree_cpp_v3)

add_executable(${PROJECT_NAME} "hello_BT.cpp")
target_link_libraries(${PROJECT_NAME} BT::behaviortree_cpp_v3)

ROS1 or ROS2 users (Catkin/Ament)

You can easily install the package with the command

  sudo apt-get install ros-$ROS_DISTRO-behaviortree-cpp-v3

If you want to compile it with catkin, you must include this package to your catkin workspace.

Acknowledgement

This library was initially developed at Eurecat - https://eurecat.org/en/ (main author, Davide Faconti) in a joint effort with the Italian Institute of Technology (Michele Colledanchise).

This software is one of the main components of MOOD2Be, which is one of the six Integrated Technical Projects (ITPs) selected from the RobMoSys first open call. Therefore, MOOD2Be has been supported by the European Horizon2020 project RobMoSys. This software is RobMoSys conformant.

RobMoSys Conformant

Further readings

  • Introductory article: Behavior trees for AI: How they work

  • How Behavior Trees Modularize Hybrid Control Systems and Generalize Sequential Behavior Compositions, the Subsumption Architecture, and Decision Trees. Michele Colledanchise and Petter Ogren. IEEE Transaction on Robotics 2017.

  • Behavior Trees in Robotics and AI, published by CRC Press Taylor & Francis, available for purchase (ebook and hardcover) on the CRC Press Store or Amazon.

The Preprint version (free) is available here: https://arxiv.org/abs/1709.00084

License

The MIT License (MIT)

Copyright (c) 2014-2018 Michele Colledanchise

Copyright (c) 2018-2019 Davide Faconti, Eurecat

Copyright (c) 2019-2021 Davide Faconti

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

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

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

CHANGELOG

Changelog for package behaviortree_cpp

3.7.0 (2022-05-23) -----------* add netlify stuff * Event based trigger introduced Added a new mechanism to emit \"state changed\" events that can \"wake up\" a tree. In short, it just provide an interruptible \"sleep\" function. * Fixed bug where including relative paths would fail to find the correct file (#358) * Added unit tests to verify current behavior * Fixed bug where including relative paths would fail to find the correct file * Added gtest environment to access executable path This path lets tests access files relative to the executable for better transportability * Changed file commandto add_custom_target The file command only copies during the cmake configure step. If source files change, file is not ran again * Added pure CMake action to PR checks (#378) * Added CMake CI to PR checks * Renamed action to follow pattern * updated documentation * add the ability to register multiple BTs (#373) * Update ros1.yaml * fix #338 * fix issue #330 * fix issue #360 * Merge branch \'master\' of github.com:BehaviorTree/BehaviorTree.CPP * Update Tutorial 2 Docuemtation (#372) * Update tutorial_09_coroutines.md (#359) Minor fix, renamed Timepoint to TimePoint. * Export dependency on ament_index_cpp (#362) To make dependent packages try to link ament_index_cpp, export the dependency explicitly. * Change order of lock to prevent deadlock. (#368) Resolves #367. * Fix #320 : forbit refrences in Any * Update action_node.h * Contributors: Adam Sasine, Davide Faconti, Fabian Schurig, Griswald Brooks, Hyeongsik Min, Robodrome, imgbot[bot], panwauu

3.6.1 (2022-03-06)

  • remove windows tests
  • fix thread safety
  • fix CI
  • Don\'t restart SequenceStar on halt (#329)
    • Add more SequenceStar tests
    • Fix typo in test name
    • Don\'t reset SequenceStar on halt
  • [docs] add missing node SmashDoor (#342)
  • ROS2 include ros_pkg attribute support (#351)

    • ROS2 include pkg support

    * ros2 build fixed Co-authored-by: Benjamin Linne <benjamin.linne.civ@army.mil>

  • [ImgBot] Optimize images (#334) *Total -- 90.34kb -> 61.77kb (31.63%) /docs/images/Tutorial1.svg -- 10.08kb -> 6.33kb (37.19%) /docs/images/FetchBeerFails.svg -- 9.00kb -> 5.93kb (34.13%) /docs/images/FetchBeer2.svg -- 21.19kb -> 14.41kb (32%) /docs/images/Tutorial2.svg -- 34.19kb -> 23.75kb (30.54%) /docs/images/DecoratorEnterRoom.svg -- 15.88kb -> 11.35kb (28.54%) Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

  • [Docs] BT_basics fix typo (#343)

  • [docs] Clarify sentence (#344) ... will sleep up to 8 hours or less, if he/she is fully rested. was not clear. It can also be understood as If he/she is fully rested, the character will sleep ...

  • [docs] match text to graphics (#340)

  • Docs: BT_basics fix typo (#337)

  • Merge branch \'master\' of github.com:BehaviorTree/BehaviorTree.CPP

  • fix svg

  • Fix CMake ENABLE_COROUTINES flag with Boost < 1.59 (#335) Co-authored-by: Cam Fulton <cfulton@symbotic.com>

  • Add ENABLE_COROUTINES CMake option (#316)

    • Add DISABLE_COROUTINES CMake option

    * Change convention of CMake coroutine flag to ENABLE Co-authored-by: Cam Fulton <cfulton@symbotic.com>

  • [ImgBot] Optimize images (#333) *Total -- 152.97kb -> 114.57kb (25.1%) /docs/images/ReactiveSequence.svg -- 7.58kb -> 4.59kb (39.47%) /docs/images/SequenceNode.svg -- 11.28kb -> 7.12kb (36.87%) /docs/images/SequenceStar.svg -- 11.22kb -> 7.09kb (36.8%) /docs/images/DecoratorEnterRoom.svg -- 20.71kb -> 13.30kb (35.77%) /docs/images/FallbackBasic.svg -- 19.09kb -> 12.64kb (33.79%) /docs/images/FetchBeer.svg -- 24.30kb -> 16.36kb (32.66%) /docs/images/SequenceBasic.svg -- 6.32kb -> 5.49kb (13.04%) /docs/images/Tutorial1.svg -- 6.67kb -> 5.94kb (10.98%) /docs/images/FetchBeerFails.svg -- 6.46kb -> 5.83kb (9.76%) /docs/images/FetchBeer2.svg -- 14.99kb -> 13.76kb (8.18%) /docs/images/Tutorial2.svg -- 24.35kb -> 22.44kb (7.85%) Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

  • doc fix

  • Merge branch \'new_doc\'

  • remove deprecated code

  • updated documentation

  • [Fix] Fix cmake version warning and -Wformat warning (#319) Co-authored-by: Homalozoa <xuhaiwang@xiaomi.com>

  • Update README.md

  • Fix Windows shared lib build (#323)

  • fix shadowed variable in string_view.hpp (#327)

  • Build Sample Nodes By Default to Fix Github Action (#332)

    • Fix github action
    • Change working directory in github action step
    • Build samples by default
  • Added BlackboardCheckBool decorator node (#326)

    • Added tests for BlackboardCheck decorator node
    • Added BlackboardCheckBool decorator node
  • Fixed typo \"Exeption\" -> \"Exception\" (#331)

  • WIP

  • fix #325

  • Contributors: Adam Sasine, Affonso, Guilherme, Alberto Soragna, Davide Faconti, Homalozoa X, Jake Keller, Philippe Couvignou, Tobias Fischer, benjinne, fultoncjb, goekce, imgbot[bot]

3.6.0 (2021-11-10)

  • Build samples independently of examples (#315)
  • Fix dependency in package.xml (#313)
  • Fix doc statement (#309) Fix sentence
  • Fix references to RetryUntilSuccesful (#308)
    • Fix github action
    • Fix references to RetryUntilSuccesful
  • added subclass RetryNodeTypo (#295) Co-authored-by: Subaru Arai <SubaruArai@local>
  • Fix github action (#302)
  • Minor spelling correction (#305) Corrected the_aswer to the_answer
  • Update FallbackNode.md (#306) typo correction.
  • Add signal handler for Windows (#307)
  • fix
  • file renamed and documentation fixed
  • Update documentation for reactive sequence (#286)
  • Update FallbackNode.md (#287) Fix the pseudocode in the documentation of \'Reactive Fallback\' according to its source code.
  • Update fallback documentation to V3 (#288)
    • Update FallbackNode.md description to V3
    • Fix typo
  • Use pedantic for non MSVC builds (#289)
  • Merge branch \'master\' of https://github.com/BehaviorTree/BehaviorTree.CPP
  • updated to latest flatbuffers
  • Update README.md
  • Fix issue #273
  • remove potential crash when an unfinished tree throws an exception
  • remove appveyor
  • Merge branch \'git_actions\'
  • Fixes for compilation on windows. (#248) * Fix for detecting ZeroMQ on windows Naming convention is a bit different for ZeroMQ, specifically on Windows with vcpkg. While ZMQ and ZeroMQ are valid on linux, the ZMQ naming convention only works on linux.

    • Compilation on windows not working with /WX

    * Macro collision on Windows On windows, the macros defined in the abstract logger collides with other in windows.h. Made them lowercase to avoid collision

  • Remove native support for Conan (#280)

  • add github workflow

  • Registered missing dummy nodes for examples (#275)

    • Added CheckTemperature dummy node
    • Added SayHello dummy node
  • add zmq.hpp in 3rdparty dirfectory

  • add test

  • fix some warnings

  • Fix bug on halt of delay node (#272)

    • When DelayNode is halted and ticked again, it always returned FAILURE since the state of DelayNode was not properly reset.

    - This commit fixes unexpected behavior of DelayNode when it is halted. Co-authored-by: Jinwoo Choi <jinwoos.choi@samsung.com>

  • Clear all of blackboard\'s content (#269)

  • Added printTreeRecursively overload with ostream parameter (#264)

    • Added overload to printTreeRecursively
    • Changed include to iosfwd
    • Added test to verify function writes to stream
    • Added call to overload without stream parameter
    • Fixed conversion error
    • Removed overload in favor of default argument
  • Fix typo (#260) Co-authored-by: Francesco Vigni <francesco.vigni@sttech.de>

  • Update README.md

  • abstract_logger.h: fixed a typo (#257)

  • Contributors: Adam Sasine, Affonso, Guilherme, Akash, Billy, Cong Liu, Daisuke Nishimatsu, Davide Faconti, Francesco Vigni, Heben, Jake Keller, Per-Arne Andersen, Ross Weir, Steve Macenski, SubaruArai, Taehyeon, Uilian Ries, Yadu, Yuwei Liang, matthews-jca, swarajpeppermint

3.5.6 (2021-02-03)

3.5.5 (2021-01-27)

  • fix issue #251
  • Contributors: Davide Faconti

3.5.4 (2020-12-10)

  • Update bt_factory.cpp (#245)
  • Use the latest version of zmq.hpp
  • Improved switching BTs with active Groot monitoring (ZMQ logger destruction) (#244)
    • Skip 100ms (max) wait for detached thread
    • add {} to single line if statements
  • Update retry_node.cpp
  • fix
  • fix issue #230
  • Contributors: Davide Faconti, Florian Gram

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged behaviortree_cpp_v3 at answers.ros.org

No version for distro ardent. Known supported distros are highlighted in the buttons above.
No version for distro bouncy. Known supported distros are highlighted in the buttons above.

behaviortree_cpp_v3 package from behaviortree_cpp repo

behaviortree_cpp_v3

Package Summary

Tags No category tags.
Version 3.7.0
License MIT
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/BehaviorTree/BehaviorTree.CPP.git
VCS Type git
VCS Version master
Last Updated 2022-09-27
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

This package provides the Behavior Trees core library.

Additional Links

No additional links.

Maintainers

  • Davide Faconti

Authors

  • Michele Colledanchise
  • Davide Faconti

License MIT Version cmake ros1 ros2 LGTM Grade Discourse topics

BehaviorTree.CPP

This C++ 14 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 in your application.

There are 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.

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

  • You can statically link your custom TreeNodes or convert them into plugins which can be loaded 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.

  • Last but not least: it is well documented!

Documentation

You can learn about the main concepts, the API and the tutorials here: https://www.behaviortree.dev/

To find more details about the conceptual ideas that make this implementation different from others, you can read the final deliverable of the project MOOD2Be.

Forum and Community

If the documentation doesn't answer your questions and/or you want to connect with the other BT.CPP users, visit https://discourse.behaviortree.dev/

Commercial support

Are you using BT.CPP in your commercial product and you need technical support / consulting? You can get in touch at dfaconti@aurynrobotics.com and we will happy to discuss your use case and needs.

Design principles

The main goal of this project is to create a Behavior Tree implementation that uses the principles of Model Driven Development to separate the role of the Component Developer from the Behavior Designer.

In practice, this means that:

  • Custom TreeNodes must be reusable building blocks. You should be able to implement them once and reuse them to build many behaviors.

  • To build a Behavior Tree out of TreeNodes, the Behavior Designer must not need to read nor modify the C++ source code of a given TreeNode.

  • Complex Behaviours must be composable using Subtrees

Many of the features and, sometimes, the apparent limitations of this library, might be a consequence of this design principle.

For instance, having a scoped BlackBoard, visible only in a portion of the tree, is particularly important to avoid "name pollution" and allow the creation of large scale trees.

GUI Editor

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

If you are looking for a more fancy graphical user interface (and I know you do) check Groot out.

Groot screenshot

Watch Groot and BehaviorTree.CPP in action

Click on the following image to see a short video of how the C++ library and the graphic user interface are used to design and monitor a Behavior Tree.

MOOD2Be

How to compile (plain old cmake)

On Ubuntu, you are encourage to install the following dependencies:

 sudo apt-get install libzmq3-dev libboost-dev

Other dependencies are already included in the 3rdparty folder.

To compile and install the library, from the BehaviorTree.CPP folder, execute:

 mkdir build; cd build
 cmake ..
 make
 sudo make install

If you want to use BT.CPp in your application a typical CMakeLists.txt file will look like this:

cmake_minimum_required(VERSION 3.5)

project(hello_BT)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(behaviortree_cpp_v3)

add_executable(${PROJECT_NAME} "hello_BT.cpp")
target_link_libraries(${PROJECT_NAME} BT::behaviortree_cpp_v3)

ROS1 or ROS2 users (Catkin/Ament)

You can easily install the package with the command

  sudo apt-get install ros-$ROS_DISTRO-behaviortree-cpp-v3

If you want to compile it with catkin, you must include this package to your catkin workspace.

Acknowledgement

This library was initially developed at Eurecat - https://eurecat.org/en/ (main author, Davide Faconti) in a joint effort with the Italian Institute of Technology (Michele Colledanchise).

This software is one of the main components of MOOD2Be, which is one of the six Integrated Technical Projects (ITPs) selected from the RobMoSys first open call. Therefore, MOOD2Be has been supported by the European Horizon2020 project RobMoSys. This software is RobMoSys conformant.

RobMoSys Conformant

Further readings

  • Introductory article: Behavior trees for AI: How they work

  • How Behavior Trees Modularize Hybrid Control Systems and Generalize Sequential Behavior Compositions, the Subsumption Architecture, and Decision Trees. Michele Colledanchise and Petter Ogren. IEEE Transaction on Robotics 2017.

  • Behavior Trees in Robotics and AI, published by CRC Press Taylor & Francis, available for purchase (ebook and hardcover) on the CRC Press Store or Amazon.

The Preprint version (free) is available here: https://arxiv.org/abs/1709.00084

License

The MIT License (MIT)

Copyright (c) 2014-2018 Michele Colledanchise

Copyright (c) 2018-2019 Davide Faconti, Eurecat

Copyright (c) 2019-2021 Davide Faconti

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

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

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

CHANGELOG

Changelog for package behaviortree_cpp

3.7.0 (2022-05-23) -----------* add netlify stuff * Event based trigger introduced Added a new mechanism to emit \"state changed\" events that can \"wake up\" a tree. In short, it just provide an interruptible \"sleep\" function. * Fixed bug where including relative paths would fail to find the correct file (#358) * Added unit tests to verify current behavior * Fixed bug where including relative paths would fail to find the correct file * Added gtest environment to access executable path This path lets tests access files relative to the executable for better transportability * Changed file commandto add_custom_target The file command only copies during the cmake configure step. If source files change, file is not ran again * Added pure CMake action to PR checks (#378) * Added CMake CI to PR checks * Renamed action to follow pattern * updated documentation * add the ability to register multiple BTs (#373) * Update ros1.yaml * fix #338 * fix issue #330 * fix issue #360 * Merge branch \'master\' of github.com:BehaviorTree/BehaviorTree.CPP * Update Tutorial 2 Docuemtation (#372) * Update tutorial_09_coroutines.md (#359) Minor fix, renamed Timepoint to TimePoint. * Export dependency on ament_index_cpp (#362) To make dependent packages try to link ament_index_cpp, export the dependency explicitly. * Change order of lock to prevent deadlock. (#368) Resolves #367. * Fix #320 : forbit refrences in Any * Update action_node.h * Contributors: Adam Sasine, Davide Faconti, Fabian Schurig, Griswald Brooks, Hyeongsik Min, Robodrome, imgbot[bot], panwauu

3.6.1 (2022-03-06)

  • remove windows tests
  • fix thread safety
  • fix CI
  • Don\'t restart SequenceStar on halt (#329)
    • Add more SequenceStar tests
    • Fix typo in test name
    • Don\'t reset SequenceStar on halt
  • [docs] add missing node SmashDoor (#342)
  • ROS2 include ros_pkg attribute support (#351)

    • ROS2 include pkg support

    * ros2 build fixed Co-authored-by: Benjamin Linne <benjamin.linne.civ@army.mil>

  • [ImgBot] Optimize images (#334) *Total -- 90.34kb -> 61.77kb (31.63%) /docs/images/Tutorial1.svg -- 10.08kb -> 6.33kb (37.19%) /docs/images/FetchBeerFails.svg -- 9.00kb -> 5.93kb (34.13%) /docs/images/FetchBeer2.svg -- 21.19kb -> 14.41kb (32%) /docs/images/Tutorial2.svg -- 34.19kb -> 23.75kb (30.54%) /docs/images/DecoratorEnterRoom.svg -- 15.88kb -> 11.35kb (28.54%) Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

  • [Docs] BT_basics fix typo (#343)

  • [docs] Clarify sentence (#344) ... will sleep up to 8 hours or less, if he/she is fully rested. was not clear. It can also be understood as If he/she is fully rested, the character will sleep ...

  • [docs] match text to graphics (#340)

  • Docs: BT_basics fix typo (#337)

  • Merge branch \'master\' of github.com:BehaviorTree/BehaviorTree.CPP

  • fix svg

  • Fix CMake ENABLE_COROUTINES flag with Boost < 1.59 (#335) Co-authored-by: Cam Fulton <cfulton@symbotic.com>

  • Add ENABLE_COROUTINES CMake option (#316)

    • Add DISABLE_COROUTINES CMake option

    * Change convention of CMake coroutine flag to ENABLE Co-authored-by: Cam Fulton <cfulton@symbotic.com>

  • [ImgBot] Optimize images (#333) *Total -- 152.97kb -> 114.57kb (25.1%) /docs/images/ReactiveSequence.svg -- 7.58kb -> 4.59kb (39.47%) /docs/images/SequenceNode.svg -- 11.28kb -> 7.12kb (36.87%) /docs/images/SequenceStar.svg -- 11.22kb -> 7.09kb (36.8%) /docs/images/DecoratorEnterRoom.svg -- 20.71kb -> 13.30kb (35.77%) /docs/images/FallbackBasic.svg -- 19.09kb -> 12.64kb (33.79%) /docs/images/FetchBeer.svg -- 24.30kb -> 16.36kb (32.66%) /docs/images/SequenceBasic.svg -- 6.32kb -> 5.49kb (13.04%) /docs/images/Tutorial1.svg -- 6.67kb -> 5.94kb (10.98%) /docs/images/FetchBeerFails.svg -- 6.46kb -> 5.83kb (9.76%) /docs/images/FetchBeer2.svg -- 14.99kb -> 13.76kb (8.18%) /docs/images/Tutorial2.svg -- 24.35kb -> 22.44kb (7.85%) Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

  • doc fix

  • Merge branch \'new_doc\'

  • remove deprecated code

  • updated documentation

  • [Fix] Fix cmake version warning and -Wformat warning (#319) Co-authored-by: Homalozoa <xuhaiwang@xiaomi.com>

  • Update README.md

  • Fix Windows shared lib build (#323)

  • fix shadowed variable in string_view.hpp (#327)

  • Build Sample Nodes By Default to Fix Github Action (#332)

    • Fix github action
    • Change working directory in github action step
    • Build samples by default
  • Added BlackboardCheckBool decorator node (#326)

    • Added tests for BlackboardCheck decorator node
    • Added BlackboardCheckBool decorator node
  • Fixed typo \"Exeption\" -> \"Exception\" (#331)

  • WIP

  • fix #325

  • Contributors: Adam Sasine, Affonso, Guilherme, Alberto Soragna, Davide Faconti, Homalozoa X, Jake Keller, Philippe Couvignou, Tobias Fischer, benjinne, fultoncjb, goekce, imgbot[bot]

3.6.0 (2021-11-10)

  • Build samples independently of examples (#315)
  • Fix dependency in package.xml (#313)
  • Fix doc statement (#309) Fix sentence
  • Fix references to RetryUntilSuccesful (#308)
    • Fix github action
    • Fix references to RetryUntilSuccesful
  • added subclass RetryNodeTypo (#295) Co-authored-by: Subaru Arai <SubaruArai@local>
  • Fix github action (#302)
  • Minor spelling correction (#305) Corrected the_aswer to the_answer
  • Update FallbackNode.md (#306) typo correction.
  • Add signal handler for Windows (#307)
  • fix
  • file renamed and documentation fixed
  • Update documentation for reactive sequence (#286)
  • Update FallbackNode.md (#287) Fix the pseudocode in the documentation of \'Reactive Fallback\' according to its source code.
  • Update fallback documentation to V3 (#288)
    • Update FallbackNode.md description to V3
    • Fix typo
  • Use pedantic for non MSVC builds (#289)
  • Merge branch \'master\' of https://github.com/BehaviorTree/BehaviorTree.CPP
  • updated to latest flatbuffers
  • Update README.md
  • Fix issue #273
  • remove potential crash when an unfinished tree throws an exception
  • remove appveyor
  • Merge branch \'git_actions\'
  • Fixes for compilation on windows. (#248) * Fix for detecting ZeroMQ on windows Naming convention is a bit different for ZeroMQ, specifically on Windows with vcpkg. While ZMQ and ZeroMQ are valid on linux, the ZMQ naming convention only works on linux.

    • Compilation on windows not working with /WX

    * Macro collision on Windows On windows, the macros defined in the abstract logger collides with other in windows.h. Made them lowercase to avoid collision

  • Remove native support for Conan (#280)

  • add github workflow

  • Registered missing dummy nodes for examples (#275)

    • Added CheckTemperature dummy node
    • Added SayHello dummy node
  • add zmq.hpp in 3rdparty dirfectory

  • add test

  • fix some warnings

  • Fix bug on halt of delay node (#272)

    • When DelayNode is halted and ticked again, it always returned FAILURE since the state of DelayNode was not properly reset.

    - This commit fixes unexpected behavior of DelayNode when it is halted. Co-authored-by: Jinwoo Choi <jinwoos.choi@samsung.com>

  • Clear all of blackboard\'s content (#269)

  • Added printTreeRecursively overload with ostream parameter (#264)

    • Added overload to printTreeRecursively
    • Changed include to iosfwd
    • Added test to verify function writes to stream
    • Added call to overload without stream parameter
    • Fixed conversion error
    • Removed overload in favor of default argument
  • Fix typo (#260) Co-authored-by: Francesco Vigni <francesco.vigni@sttech.de>

  • Update README.md

  • abstract_logger.h: fixed a typo (#257)

  • Contributors: Adam Sasine, Affonso, Guilherme, Akash, Billy, Cong Liu, Daisuke Nishimatsu, Davide Faconti, Francesco Vigni, Heben, Jake Keller, Per-Arne Andersen, Ross Weir, Steve Macenski, SubaruArai, Taehyeon, Uilian Ries, Yadu, Yuwei Liang, matthews-jca, swarajpeppermint

3.5.6 (2021-02-03)

3.5.5 (2021-01-27)

  • fix issue #251
  • Contributors: Davide Faconti

3.5.4 (2020-12-10)

  • Update bt_factory.cpp (#245)
  • Use the latest version of zmq.hpp
  • Improved switching BTs with active Groot monitoring (ZMQ logger destruction) (#244)
    • Skip 100ms (max) wait for detached thread
    • add {} to single line if statements
  • Update retry_node.cpp
  • fix
  • fix issue #230
  • Contributors: Davide Faconti, Florian Gram

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged behaviortree_cpp_v3 at answers.ros.org

No version for distro eloquent. Known supported distros are highlighted in the buttons above.
No version for distro dashing. Known supported distros are highlighted in the buttons above.

behaviortree_cpp_v3 package from behaviortree_cpp repo

behaviortree_cpp_v3

Package Summary

Tags No category tags.
Version 3.7.0
License MIT
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/BehaviorTree/BehaviorTree.CPP.git
VCS Type git
VCS Version master
Last Updated 2022-09-27
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

This package provides the Behavior Trees core library.

Additional Links

No additional links.

Maintainers

  • Davide Faconti

Authors

  • Michele Colledanchise
  • Davide Faconti

License MIT Version cmake ros1 ros2 LGTM Grade Discourse topics

BehaviorTree.CPP

This C++ 14 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 in your application.

There are 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.

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

  • You can statically link your custom TreeNodes or convert them into plugins which can be loaded 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.

  • Last but not least: it is well documented!

Documentation

You can learn about the main concepts, the API and the tutorials here: https://www.behaviortree.dev/

To find more details about the conceptual ideas that make this implementation different from others, you can read the final deliverable of the project MOOD2Be.

Forum and Community

If the documentation doesn't answer your questions and/or you want to connect with the other BT.CPP users, visit https://discourse.behaviortree.dev/

Commercial support

Are you using BT.CPP in your commercial product and you need technical support / consulting? You can get in touch at dfaconti@aurynrobotics.com and we will happy to discuss your use case and needs.

Design principles

The main goal of this project is to create a Behavior Tree implementation that uses the principles of Model Driven Development to separate the role of the Component Developer from the Behavior Designer.

In practice, this means that:

  • Custom TreeNodes must be reusable building blocks. You should be able to implement them once and reuse them to build many behaviors.

  • To build a Behavior Tree out of TreeNodes, the Behavior Designer must not need to read nor modify the C++ source code of a given TreeNode.

  • Complex Behaviours must be composable using Subtrees

Many of the features and, sometimes, the apparent limitations of this library, might be a consequence of this design principle.

For instance, having a scoped BlackBoard, visible only in a portion of the tree, is particularly important to avoid "name pollution" and allow the creation of large scale trees.

GUI Editor

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

If you are looking for a more fancy graphical user interface (and I know you do) check Groot out.

Groot screenshot

Watch Groot and BehaviorTree.CPP in action

Click on the following image to see a short video of how the C++ library and the graphic user interface are used to design and monitor a Behavior Tree.

MOOD2Be

How to compile (plain old cmake)

On Ubuntu, you are encourage to install the following dependencies:

 sudo apt-get install libzmq3-dev libboost-dev

Other dependencies are already included in the 3rdparty folder.

To compile and install the library, from the BehaviorTree.CPP folder, execute:

 mkdir build; cd build
 cmake ..
 make
 sudo make install

If you want to use BT.CPp in your application a typical CMakeLists.txt file will look like this:

cmake_minimum_required(VERSION 3.5)

project(hello_BT)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(behaviortree_cpp_v3)

add_executable(${PROJECT_NAME} "hello_BT.cpp")
target_link_libraries(${PROJECT_NAME} BT::behaviortree_cpp_v3)

ROS1 or ROS2 users (Catkin/Ament)

You can easily install the package with the command

  sudo apt-get install ros-$ROS_DISTRO-behaviortree-cpp-v3

If you want to compile it with catkin, you must include this package to your catkin workspace.

Acknowledgement

This library was initially developed at Eurecat - https://eurecat.org/en/ (main author, Davide Faconti) in a joint effort with the Italian Institute of Technology (Michele Colledanchise).

This software is one of the main components of MOOD2Be, which is one of the six Integrated Technical Projects (ITPs) selected from the RobMoSys first open call. Therefore, MOOD2Be has been supported by the European Horizon2020 project RobMoSys. This software is RobMoSys conformant.

RobMoSys Conformant

Further readings

  • Introductory article: Behavior trees for AI: How they work

  • How Behavior Trees Modularize Hybrid Control Systems and Generalize Sequential Behavior Compositions, the Subsumption Architecture, and Decision Trees. Michele Colledanchise and Petter Ogren. IEEE Transaction on Robotics 2017.

  • Behavior Trees in Robotics and AI, published by CRC Press Taylor & Francis, available for purchase (ebook and hardcover) on the CRC Press Store or Amazon.

The Preprint version (free) is available here: https://arxiv.org/abs/1709.00084

License

The MIT License (MIT)

Copyright (c) 2014-2018 Michele Colledanchise

Copyright (c) 2018-2019 Davide Faconti, Eurecat

Copyright (c) 2019-2021 Davide Faconti

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

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

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

CHANGELOG

Changelog for package behaviortree_cpp

3.7.0 (2022-05-23) -----------* add netlify stuff * Event based trigger introduced Added a new mechanism to emit \"state changed\" events that can \"wake up\" a tree. In short, it just provide an interruptible \"sleep\" function. * Fixed bug where including relative paths would fail to find the correct file (#358) * Added unit tests to verify current behavior * Fixed bug where including relative paths would fail to find the correct file * Added gtest environment to access executable path This path lets tests access files relative to the executable for better transportability * Changed file commandto add_custom_target The file command only copies during the cmake configure step. If source files change, file is not ran again * Added pure CMake action to PR checks (#378) * Added CMake CI to PR checks * Renamed action to follow pattern * updated documentation * add the ability to register multiple BTs (#373) * Update ros1.yaml * fix #338 * fix issue #330 * fix issue #360 * Merge branch \'master\' of github.com:BehaviorTree/BehaviorTree.CPP * Update Tutorial 2 Docuemtation (#372) * Update tutorial_09_coroutines.md (#359) Minor fix, renamed Timepoint to TimePoint. * Export dependency on ament_index_cpp (#362) To make dependent packages try to link ament_index_cpp, export the dependency explicitly. * Change order of lock to prevent deadlock. (#368) Resolves #367. * Fix #320 : forbit refrences in Any * Update action_node.h * Contributors: Adam Sasine, Davide Faconti, Fabian Schurig, Griswald Brooks, Hyeongsik Min, Robodrome, imgbot[bot], panwauu

3.6.1 (2022-03-06)

  • remove windows tests
  • fix thread safety
  • fix CI
  • Don\'t restart SequenceStar on halt (#329)
    • Add more SequenceStar tests
    • Fix typo in test name
    • Don\'t reset SequenceStar on halt
  • [docs] add missing node SmashDoor (#342)
  • ROS2 include ros_pkg attribute support (#351)

    • ROS2 include pkg support

    * ros2 build fixed Co-authored-by: Benjamin Linne <benjamin.linne.civ@army.mil>

  • [ImgBot] Optimize images (#334) *Total -- 90.34kb -> 61.77kb (31.63%) /docs/images/Tutorial1.svg -- 10.08kb -> 6.33kb (37.19%) /docs/images/FetchBeerFails.svg -- 9.00kb -> 5.93kb (34.13%) /docs/images/FetchBeer2.svg -- 21.19kb -> 14.41kb (32%) /docs/images/Tutorial2.svg -- 34.19kb -> 23.75kb (30.54%) /docs/images/DecoratorEnterRoom.svg -- 15.88kb -> 11.35kb (28.54%) Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

  • [Docs] BT_basics fix typo (#343)

  • [docs] Clarify sentence (#344) ... will sleep up to 8 hours or less, if he/she is fully rested. was not clear. It can also be understood as If he/she is fully rested, the character will sleep ...

  • [docs] match text to graphics (#340)

  • Docs: BT_basics fix typo (#337)

  • Merge branch \'master\' of github.com:BehaviorTree/BehaviorTree.CPP

  • fix svg

  • Fix CMake ENABLE_COROUTINES flag with Boost < 1.59 (#335) Co-authored-by: Cam Fulton <cfulton@symbotic.com>

  • Add ENABLE_COROUTINES CMake option (#316)

    • Add DISABLE_COROUTINES CMake option

    * Change convention of CMake coroutine flag to ENABLE Co-authored-by: Cam Fulton <cfulton@symbotic.com>

  • [ImgBot] Optimize images (#333) *Total -- 152.97kb -> 114.57kb (25.1%) /docs/images/ReactiveSequence.svg -- 7.58kb -> 4.59kb (39.47%) /docs/images/SequenceNode.svg -- 11.28kb -> 7.12kb (36.87%) /docs/images/SequenceStar.svg -- 11.22kb -> 7.09kb (36.8%) /docs/images/DecoratorEnterRoom.svg -- 20.71kb -> 13.30kb (35.77%) /docs/images/FallbackBasic.svg -- 19.09kb -> 12.64kb (33.79%) /docs/images/FetchBeer.svg -- 24.30kb -> 16.36kb (32.66%) /docs/images/SequenceBasic.svg -- 6.32kb -> 5.49kb (13.04%) /docs/images/Tutorial1.svg -- 6.67kb -> 5.94kb (10.98%) /docs/images/FetchBeerFails.svg -- 6.46kb -> 5.83kb (9.76%) /docs/images/FetchBeer2.svg -- 14.99kb -> 13.76kb (8.18%) /docs/images/Tutorial2.svg -- 24.35kb -> 22.44kb (7.85%) Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

  • doc fix

  • Merge branch \'new_doc\'

  • remove deprecated code

  • updated documentation

  • [Fix] Fix cmake version warning and -Wformat warning (#319) Co-authored-by: Homalozoa <xuhaiwang@xiaomi.com>

  • Update README.md

  • Fix Windows shared lib build (#323)

  • fix shadowed variable in string_view.hpp (#327)

  • Build Sample Nodes By Default to Fix Github Action (#332)

    • Fix github action
    • Change working directory in github action step
    • Build samples by default
  • Added BlackboardCheckBool decorator node (#326)

    • Added tests for BlackboardCheck decorator node
    • Added BlackboardCheckBool decorator node
  • Fixed typo \"Exeption\" -> \"Exception\" (#331)

  • WIP

  • fix #325

  • Contributors: Adam Sasine, Affonso, Guilherme, Alberto Soragna, Davide Faconti, Homalozoa X, Jake Keller, Philippe Couvignou, Tobias Fischer, benjinne, fultoncjb, goekce, imgbot[bot]

3.6.0 (2021-11-10)

  • Build samples independently of examples (#315)
  • Fix dependency in package.xml (#313)
  • Fix doc statement (#309) Fix sentence
  • Fix references to RetryUntilSuccesful (#308)
    • Fix github action
    • Fix references to RetryUntilSuccesful
  • added subclass RetryNodeTypo (#295) Co-authored-by: Subaru Arai <SubaruArai@local>
  • Fix github action (#302)
  • Minor spelling correction (#305) Corrected the_aswer to the_answer
  • Update FallbackNode.md (#306) typo correction.
  • Add signal handler for Windows (#307)
  • fix
  • file renamed and documentation fixed
  • Update documentation for reactive sequence (#286)
  • Update FallbackNode.md (#287) Fix the pseudocode in the documentation of \'Reactive Fallback\' according to its source code.
  • Update fallback documentation to V3 (#288)
    • Update FallbackNode.md description to V3
    • Fix typo
  • Use pedantic for non MSVC builds (#289)
  • Merge branch \'master\' of https://github.com/BehaviorTree/BehaviorTree.CPP
  • updated to latest flatbuffers
  • Update README.md
  • Fix issue #273
  • remove potential crash when an unfinished tree throws an exception
  • remove appveyor
  • Merge branch \'git_actions\'
  • Fixes for compilation on windows. (#248) * Fix for detecting ZeroMQ on windows Naming convention is a bit different for ZeroMQ, specifically on Windows with vcpkg. While ZMQ and ZeroMQ are valid on linux, the ZMQ naming convention only works on linux.

    • Compilation on windows not working with /WX

    * Macro collision on Windows On windows, the macros defined in the abstract logger collides with other in windows.h. Made them lowercase to avoid collision

  • Remove native support for Conan (#280)

  • add github workflow

  • Registered missing dummy nodes for examples (#275)

    • Added CheckTemperature dummy node
    • Added SayHello dummy node
  • add zmq.hpp in 3rdparty dirfectory

  • add test

  • fix some warnings

  • Fix bug on halt of delay node (#272)

    • When DelayNode is halted and ticked again, it always returned FAILURE since the state of DelayNode was not properly reset.

    - This commit fixes unexpected behavior of DelayNode when it is halted. Co-authored-by: Jinwoo Choi <jinwoos.choi@samsung.com>

  • Clear all of blackboard\'s content (#269)

  • Added printTreeRecursively overload with ostream parameter (#264)

    • Added overload to printTreeRecursively
    • Changed include to iosfwd
    • Added test to verify function writes to stream
    • Added call to overload without stream parameter
    • Fixed conversion error
    • Removed overload in favor of default argument
  • Fix typo (#260) Co-authored-by: Francesco Vigni <francesco.vigni@sttech.de>

  • Update README.md

  • abstract_logger.h: fixed a typo (#257)

  • Contributors: Adam Sasine, Affonso, Guilherme, Akash, Billy, Cong Liu, Daisuke Nishimatsu, Davide Faconti, Francesco Vigni, Heben, Jake Keller, Per-Arne Andersen, Ross Weir, Steve Macenski, SubaruArai, Taehyeon, Uilian Ries, Yadu, Yuwei Liang, matthews-jca, swarajpeppermint

3.5.6 (2021-02-03)

3.5.5 (2021-01-27)

  • fix issue #251
  • Contributors: Davide Faconti

3.5.4 (2020-12-10)

  • Update bt_factory.cpp (#245)
  • Use the latest version of zmq.hpp
  • Improved switching BTs with active Groot monitoring (ZMQ logger destruction) (#244)
    • Skip 100ms (max) wait for detached thread
    • add {} to single line if statements
  • Update retry_node.cpp
  • fix
  • fix issue #230
  • Contributors: Davide Faconti, Florian Gram

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged behaviortree_cpp_v3 at answers.ros.org

No version for distro jade. Known supported distros are highlighted in the buttons above.

behaviortree_cpp_v3 package from behaviortree_cpp repo

behaviortree_cpp_v3

Package Summary

Tags No category tags.
Version 3.7.0
License MIT
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/BehaviorTree/BehaviorTree.CPP.git
VCS Type git
VCS Version master
Last Updated 2022-09-27
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

This package provides the Behavior Trees core library.

Additional Links

No additional links.

Maintainers

  • Davide Faconti

Authors

  • Michele Colledanchise
  • Davide Faconti

License MIT Version cmake ros1 ros2 LGTM Grade Discourse topics

BehaviorTree.CPP

This C++ 14 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 in your application.

There are 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.

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

  • You can statically link your custom TreeNodes or convert them into plugins which can be loaded 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.

  • Last but not least: it is well documented!

Documentation

You can learn about the main concepts, the API and the tutorials here: https://www.behaviortree.dev/

To find more details about the conceptual ideas that make this implementation different from others, you can read the final deliverable of the project MOOD2Be.

Forum and Community

If the documentation doesn't answer your questions and/or you want to connect with the other BT.CPP users, visit https://discourse.behaviortree.dev/

Commercial support

Are you using BT.CPP in your commercial product and you need technical support / consulting? You can get in touch at dfaconti@aurynrobotics.com and we will happy to discuss your use case and needs.

Design principles

The main goal of this project is to create a Behavior Tree implementation that uses the principles of Model Driven Development to separate the role of the Component Developer from the Behavior Designer.

In practice, this means that:

  • Custom TreeNodes must be reusable building blocks. You should be able to implement them once and reuse them to build many behaviors.

  • To build a Behavior Tree out of TreeNodes, the Behavior Designer must not need to read nor modify the C++ source code of a given TreeNode.

  • Complex Behaviours must be composable using Subtrees

Many of the features and, sometimes, the apparent limitations of this library, might be a consequence of this design principle.

For instance, having a scoped BlackBoard, visible only in a portion of the tree, is particularly important to avoid "name pollution" and allow the creation of large scale trees.

GUI Editor

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

If you are looking for a more fancy graphical user interface (and I know you do) check Groot out.

Groot screenshot

Watch Groot and BehaviorTree.CPP in action

Click on the following image to see a short video of how the C++ library and the graphic user interface are used to design and monitor a Behavior Tree.

MOOD2Be

How to compile (plain old cmake)

On Ubuntu, you are encourage to install the following dependencies:

 sudo apt-get install libzmq3-dev libboost-dev

Other dependencies are already included in the 3rdparty folder.

To compile and install the library, from the BehaviorTree.CPP folder, execute:

 mkdir build; cd build
 cmake ..
 make
 sudo make install

If you want to use BT.CPp in your application a typical CMakeLists.txt file will look like this:

cmake_minimum_required(VERSION 3.5)

project(hello_BT)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(behaviortree_cpp_v3)

add_executable(${PROJECT_NAME} "hello_BT.cpp")
target_link_libraries(${PROJECT_NAME} BT::behaviortree_cpp_v3)

ROS1 or ROS2 users (Catkin/Ament)

You can easily install the package with the command

  sudo apt-get install ros-$ROS_DISTRO-behaviortree-cpp-v3

If you want to compile it with catkin, you must include this package to your catkin workspace.

Acknowledgement

This library was initially developed at Eurecat - https://eurecat.org/en/ (main author, Davide Faconti) in a joint effort with the Italian Institute of Technology (Michele Colledanchise).

This software is one of the main components of MOOD2Be, which is one of the six Integrated Technical Projects (ITPs) selected from the RobMoSys first open call. Therefore, MOOD2Be has been supported by the European Horizon2020 project RobMoSys. This software is RobMoSys conformant.

RobMoSys Conformant

Further readings

  • Introductory article: Behavior trees for AI: How they work

  • How Behavior Trees Modularize Hybrid Control Systems and Generalize Sequential Behavior Compositions, the Subsumption Architecture, and Decision Trees. Michele Colledanchise and Petter Ogren. IEEE Transaction on Robotics 2017.

  • Behavior Trees in Robotics and AI, published by CRC Press Taylor & Francis, available for purchase (ebook and hardcover) on the CRC Press Store or Amazon.

The Preprint version (free) is available here: https://arxiv.org/abs/1709.00084

License

The MIT License (MIT)

Copyright (c) 2014-2018 Michele Colledanchise

Copyright (c) 2018-2019 Davide Faconti, Eurecat

Copyright (c) 2019-2021 Davide Faconti

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

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

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

CHANGELOG

Changelog for package behaviortree_cpp

3.7.0 (2022-05-23) -----------* add netlify stuff * Event based trigger introduced Added a new mechanism to emit \"state changed\" events that can \"wake up\" a tree. In short, it just provide an interruptible \"sleep\" function. * Fixed bug where including relative paths would fail to find the correct file (#358) * Added unit tests to verify current behavior * Fixed bug where including relative paths would fail to find the correct file * Added gtest environment to access executable path This path lets tests access files relative to the executable for better transportability * Changed file commandto add_custom_target The file command only copies during the cmake configure step. If source files change, file is not ran again * Added pure CMake action to PR checks (#378) * Added CMake CI to PR checks * Renamed action to follow pattern * updated documentation * add the ability to register multiple BTs (#373) * Update ros1.yaml * fix #338 * fix issue #330 * fix issue #360 * Merge branch \'master\' of github.com:BehaviorTree/BehaviorTree.CPP * Update Tutorial 2 Docuemtation (#372) * Update tutorial_09_coroutines.md (#359) Minor fix, renamed Timepoint to TimePoint. * Export dependency on ament_index_cpp (#362) To make dependent packages try to link ament_index_cpp, export the dependency explicitly. * Change order of lock to prevent deadlock. (#368) Resolves #367. * Fix #320 : forbit refrences in Any * Update action_node.h * Contributors: Adam Sasine, Davide Faconti, Fabian Schurig, Griswald Brooks, Hyeongsik Min, Robodrome, imgbot[bot], panwauu

3.6.1 (2022-03-06)

  • remove windows tests
  • fix thread safety
  • fix CI
  • Don\'t restart SequenceStar on halt (#329)
    • Add more SequenceStar tests
    • Fix typo in test name
    • Don\'t reset SequenceStar on halt
  • [docs] add missing node SmashDoor (#342)
  • ROS2 include ros_pkg attribute support (#351)

    • ROS2 include pkg support

    * ros2 build fixed Co-authored-by: Benjamin Linne <benjamin.linne.civ@army.mil>

  • [ImgBot] Optimize images (#334) *Total -- 90.34kb -> 61.77kb (31.63%) /docs/images/Tutorial1.svg -- 10.08kb -> 6.33kb (37.19%) /docs/images/FetchBeerFails.svg -- 9.00kb -> 5.93kb (34.13%) /docs/images/FetchBeer2.svg -- 21.19kb -> 14.41kb (32%) /docs/images/Tutorial2.svg -- 34.19kb -> 23.75kb (30.54%) /docs/images/DecoratorEnterRoom.svg -- 15.88kb -> 11.35kb (28.54%) Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

  • [Docs] BT_basics fix typo (#343)

  • [docs] Clarify sentence (#344) ... will sleep up to 8 hours or less, if he/she is fully rested. was not clear. It can also be understood as If he/she is fully rested, the character will sleep ...

  • [docs] match text to graphics (#340)

  • Docs: BT_basics fix typo (#337)

  • Merge branch \'master\' of github.com:BehaviorTree/BehaviorTree.CPP

  • fix svg

  • Fix CMake ENABLE_COROUTINES flag with Boost < 1.59 (#335) Co-authored-by: Cam Fulton <cfulton@symbotic.com>

  • Add ENABLE_COROUTINES CMake option (#316)

    • Add DISABLE_COROUTINES CMake option

    * Change convention of CMake coroutine flag to ENABLE Co-authored-by: Cam Fulton <cfulton@symbotic.com>

  • [ImgBot] Optimize images (#333) *Total -- 152.97kb -> 114.57kb (25.1%) /docs/images/ReactiveSequence.svg -- 7.58kb -> 4.59kb (39.47%) /docs/images/SequenceNode.svg -- 11.28kb -> 7.12kb (36.87%) /docs/images/SequenceStar.svg -- 11.22kb -> 7.09kb (36.8%) /docs/images/DecoratorEnterRoom.svg -- 20.71kb -> 13.30kb (35.77%) /docs/images/FallbackBasic.svg -- 19.09kb -> 12.64kb (33.79%) /docs/images/FetchBeer.svg -- 24.30kb -> 16.36kb (32.66%) /docs/images/SequenceBasic.svg -- 6.32kb -> 5.49kb (13.04%) /docs/images/Tutorial1.svg -- 6.67kb -> 5.94kb (10.98%) /docs/images/FetchBeerFails.svg -- 6.46kb -> 5.83kb (9.76%) /docs/images/FetchBeer2.svg -- 14.99kb -> 13.76kb (8.18%) /docs/images/Tutorial2.svg -- 24.35kb -> 22.44kb (7.85%) Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

  • doc fix

  • Merge branch \'new_doc\'

  • remove deprecated code

  • updated documentation

  • [Fix] Fix cmake version warning and -Wformat warning (#319) Co-authored-by: Homalozoa <xuhaiwang@xiaomi.com>

  • Update README.md

  • Fix Windows shared lib build (#323)

  • fix shadowed variable in string_view.hpp (#327)

  • Build Sample Nodes By Default to Fix Github Action (#332)

    • Fix github action
    • Change working directory in github action step
    • Build samples by default
  • Added BlackboardCheckBool decorator node (#326)

    • Added tests for BlackboardCheck decorator node
    • Added BlackboardCheckBool decorator node
  • Fixed typo \"Exeption\" -> \"Exception\" (#331)

  • WIP

  • fix #325

  • Contributors: Adam Sasine, Affonso, Guilherme, Alberto Soragna, Davide Faconti, Homalozoa X, Jake Keller, Philippe Couvignou, Tobias Fischer, benjinne, fultoncjb, goekce, imgbot[bot]

3.6.0 (2021-11-10)

  • Build samples independently of examples (#315)
  • Fix dependency in package.xml (#313)
  • Fix doc statement (#309) Fix sentence
  • Fix references to RetryUntilSuccesful (#308)
    • Fix github action
    • Fix references to RetryUntilSuccesful
  • added subclass RetryNodeTypo (#295) Co-authored-by: Subaru Arai <SubaruArai@local>
  • Fix github action (#302)
  • Minor spelling correction (#305) Corrected the_aswer to the_answer
  • Update FallbackNode.md (#306) typo correction.
  • Add signal handler for Windows (#307)
  • fix
  • file renamed and documentation fixed
  • Update documentation for reactive sequence (#286)
  • Update FallbackNode.md (#287) Fix the pseudocode in the documentation of \'Reactive Fallback\' according to its source code.
  • Update fallback documentation to V3 (#288)
    • Update FallbackNode.md description to V3
    • Fix typo
  • Use pedantic for non MSVC builds (#289)
  • Merge branch \'master\' of https://github.com/BehaviorTree/BehaviorTree.CPP
  • updated to latest flatbuffers
  • Update README.md
  • Fix issue #273
  • remove potential crash when an unfinished tree throws an exception
  • remove appveyor
  • Merge branch \'git_actions\'
  • Fixes for compilation on windows. (#248) * Fix for detecting ZeroMQ on windows Naming convention is a bit different for ZeroMQ, specifically on Windows with vcpkg. While ZMQ and ZeroMQ are valid on linux, the ZMQ naming convention only works on linux.

    • Compilation on windows not working with /WX

    * Macro collision on Windows On windows, the macros defined in the abstract logger collides with other in windows.h. Made them lowercase to avoid collision

  • Remove native support for Conan (#280)

  • add github workflow

  • Registered missing dummy nodes for examples (#275)

    • Added CheckTemperature dummy node
    • Added SayHello dummy node
  • add zmq.hpp in 3rdparty dirfectory

  • add test

  • fix some warnings

  • Fix bug on halt of delay node (#272)

    • When DelayNode is halted and ticked again, it always returned FAILURE since the state of DelayNode was not properly reset.

    - This commit fixes unexpected behavior of DelayNode when it is halted. Co-authored-by: Jinwoo Choi <jinwoos.choi@samsung.com>

  • Clear all of blackboard\'s content (#269)

  • Added printTreeRecursively overload with ostream parameter (#264)

    • Added overload to printTreeRecursively
    • Changed include to iosfwd
    • Added test to verify function writes to stream
    • Added call to overload without stream parameter
    • Fixed conversion error
    • Removed overload in favor of default argument
  • Fix typo (#260) Co-authored-by: Francesco Vigni <francesco.vigni@sttech.de>

  • Update README.md

  • abstract_logger.h: fixed a typo (#257)

  • Contributors: Adam Sasine, Affonso, Guilherme, Akash, Billy, Cong Liu, Daisuke Nishimatsu, Davide Faconti, Francesco Vigni, Heben, Jake Keller, Per-Arne Andersen, Ross Weir, Steve Macenski, SubaruArai, Taehyeon, Uilian Ries, Yadu, Yuwei Liang, matthews-jca, swarajpeppermint

3.5.6 (2021-02-03)

3.5.5 (2021-01-27)

  • fix issue #251
  • Contributors: Davide Faconti

3.5.4 (2020-12-10)

  • Update bt_factory.cpp (#245)
  • Use the latest version of zmq.hpp
  • Improved switching BTs with active Groot monitoring (ZMQ logger destruction) (#244)
    • Skip 100ms (max) wait for detached thread
    • add {} to single line if statements
  • Update retry_node.cpp
  • fix
  • fix issue #230
  • Contributors: Davide Faconti, Florian Gram

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged behaviortree_cpp_v3 at answers.ros.org

No version for distro hydro. Known supported distros are highlighted in the buttons above.

behaviortree_cpp_v3 package from behaviortree_cpp repo

behaviortree_cpp_v3

Package Summary

Tags No category tags.
Version 3.7.0
License MIT
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/BehaviorTree/BehaviorTree.CPP.git
VCS Type git
VCS Version master
Last Updated 2022-09-27
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

This package provides the Behavior Trees core library.

Additional Links

No additional links.

Maintainers

  • Davide Faconti

Authors

  • Michele Colledanchise
  • Davide Faconti

License MIT Version cmake ros1 ros2 LGTM Grade Discourse topics

BehaviorTree.CPP

This C++ 14 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 in your application.

There are 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.

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

  • You can statically link your custom TreeNodes or convert them into plugins which can be loaded 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.

  • Last but not least: it is well documented!

Documentation

You can learn about the main concepts, the API and the tutorials here: https://www.behaviortree.dev/

To find more details about the conceptual ideas that make this implementation different from others, you can read the final deliverable of the project MOOD2Be.

Forum and Community

If the documentation doesn't answer your questions and/or you want to connect with the other BT.CPP users, visit https://discourse.behaviortree.dev/

Commercial support

Are you using BT.CPP in your commercial product and you need technical support / consulting? You can get in touch at dfaconti@aurynrobotics.com and we will happy to discuss your use case and needs.

Design principles

The main goal of this project is to create a Behavior Tree implementation that uses the principles of Model Driven Development to separate the role of the Component Developer from the Behavior Designer.

In practice, this means that:

  • Custom TreeNodes must be reusable building blocks. You should be able to implement them once and reuse them to build many behaviors.

  • To build a Behavior Tree out of TreeNodes, the Behavior Designer must not need to read nor modify the C++ source code of a given TreeNode.

  • Complex Behaviours must be composable using Subtrees

Many of the features and, sometimes, the apparent limitations of this library, might be a consequence of this design principle.

For instance, having a scoped BlackBoard, visible only in a portion of the tree, is particularly important to avoid "name pollution" and allow the creation of large scale trees.

GUI Editor

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

If you are looking for a more fancy graphical user interface (and I know you do) check Groot out.

Groot screenshot

Watch Groot and BehaviorTree.CPP in action

Click on the following image to see a short video of how the C++ library and the graphic user interface are used to design and monitor a Behavior Tree.

MOOD2Be

How to compile (plain old cmake)

On Ubuntu, you are encourage to install the following dependencies:

 sudo apt-get install libzmq3-dev libboost-dev

Other dependencies are already included in the 3rdparty folder.

To compile and install the library, from the BehaviorTree.CPP folder, execute:

 mkdir build; cd build
 cmake ..
 make
 sudo make install

If you want to use BT.CPp in your application a typical CMakeLists.txt file will look like this:

cmake_minimum_required(VERSION 3.5)

project(hello_BT)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(behaviortree_cpp_v3)

add_executable(${PROJECT_NAME} "hello_BT.cpp")
target_link_libraries(${PROJECT_NAME} BT::behaviortree_cpp_v3)

ROS1 or ROS2 users (Catkin/Ament)

You can easily install the package with the command

  sudo apt-get install ros-$ROS_DISTRO-behaviortree-cpp-v3

If you want to compile it with catkin, you must include this package to your catkin workspace.

Acknowledgement

This library was initially developed at Eurecat - https://eurecat.org/en/ (main author, Davide Faconti) in a joint effort with the Italian Institute of Technology (Michele Colledanchise).

This software is one of the main components of MOOD2Be, which is one of the six Integrated Technical Projects (ITPs) selected from the RobMoSys first open call. Therefore, MOOD2Be has been supported by the European Horizon2020 project RobMoSys. This software is RobMoSys conformant.

RobMoSys Conformant

Further readings

  • Introductory article: Behavior trees for AI: How they work

  • How Behavior Trees Modularize Hybrid Control Systems and Generalize Sequential Behavior Compositions, the Subsumption Architecture, and Decision Trees. Michele Colledanchise and Petter Ogren. IEEE Transaction on Robotics 2017.

  • Behavior Trees in Robotics and AI, published by CRC Press Taylor & Francis, available for purchase (ebook and hardcover) on the CRC Press Store or Amazon.

The Preprint version (free) is available here: https://arxiv.org/abs/1709.00084

License

The MIT License (MIT)

Copyright (c) 2014-2018 Michele Colledanchise

Copyright (c) 2018-2019 Davide Faconti, Eurecat

Copyright (c) 2019-2021 Davide Faconti

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

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

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

CHANGELOG

Changelog for package behaviortree_cpp

3.7.0 (2022-05-23) -----------* add netlify stuff * Event based trigger introduced Added a new mechanism to emit \"state changed\" events that can \"wake up\" a tree. In short, it just provide an interruptible \"sleep\" function. * Fixed bug where including relative paths would fail to find the correct file (#358) * Added unit tests to verify current behavior * Fixed bug where including relative paths would fail to find the correct file * Added gtest environment to access executable path This path lets tests access files relative to the executable for better transportability * Changed file commandto add_custom_target The file command only copies during the cmake configure step. If source files change, file is not ran again * Added pure CMake action to PR checks (#378) * Added CMake CI to PR checks * Renamed action to follow pattern * updated documentation * add the ability to register multiple BTs (#373) * Update ros1.yaml * fix #338 * fix issue #330 * fix issue #360 * Merge branch \'master\' of github.com:BehaviorTree/BehaviorTree.CPP * Update Tutorial 2 Docuemtation (#372) * Update tutorial_09_coroutines.md (#359) Minor fix, renamed Timepoint to TimePoint. * Export dependency on ament_index_cpp (#362) To make dependent packages try to link ament_index_cpp, export the dependency explicitly. * Change order of lock to prevent deadlock. (#368) Resolves #367. * Fix #320 : forbit refrences in Any * Update action_node.h * Contributors: Adam Sasine, Davide Faconti, Fabian Schurig, Griswald Brooks, Hyeongsik Min, Robodrome, imgbot[bot], panwauu

3.6.1 (2022-03-06)

  • remove windows tests
  • fix thread safety
  • fix CI
  • Don\'t restart SequenceStar on halt (#329)
    • Add more SequenceStar tests
    • Fix typo in test name
    • Don\'t reset SequenceStar on halt
  • [docs] add missing node SmashDoor (#342)
  • ROS2 include ros_pkg attribute support (#351)

    • ROS2 include pkg support

    * ros2 build fixed Co-authored-by: Benjamin Linne <benjamin.linne.civ@army.mil>

  • [ImgBot] Optimize images (#334) *Total -- 90.34kb -> 61.77kb (31.63%) /docs/images/Tutorial1.svg -- 10.08kb -> 6.33kb (37.19%) /docs/images/FetchBeerFails.svg -- 9.00kb -> 5.93kb (34.13%) /docs/images/FetchBeer2.svg -- 21.19kb -> 14.41kb (32%) /docs/images/Tutorial2.svg -- 34.19kb -> 23.75kb (30.54%) /docs/images/DecoratorEnterRoom.svg -- 15.88kb -> 11.35kb (28.54%) Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

  • [Docs] BT_basics fix typo (#343)

  • [docs] Clarify sentence (#344) ... will sleep up to 8 hours or less, if he/she is fully rested. was not clear. It can also be understood as If he/she is fully rested, the character will sleep ...

  • [docs] match text to graphics (#340)

  • Docs: BT_basics fix typo (#337)

  • Merge branch \'master\' of github.com:BehaviorTree/BehaviorTree.CPP

  • fix svg

  • Fix CMake ENABLE_COROUTINES flag with Boost < 1.59 (#335) Co-authored-by: Cam Fulton <cfulton@symbotic.com>

  • Add ENABLE_COROUTINES CMake option (#316)

    • Add DISABLE_COROUTINES CMake option

    * Change convention of CMake coroutine flag to ENABLE Co-authored-by: Cam Fulton <cfulton@symbotic.com>

  • [ImgBot] Optimize images (#333) *Total -- 152.97kb -> 114.57kb (25.1%) /docs/images/ReactiveSequence.svg -- 7.58kb -> 4.59kb (39.47%) /docs/images/SequenceNode.svg -- 11.28kb -> 7.12kb (36.87%) /docs/images/SequenceStar.svg -- 11.22kb -> 7.09kb (36.8%) /docs/images/DecoratorEnterRoom.svg -- 20.71kb -> 13.30kb (35.77%) /docs/images/FallbackBasic.svg -- 19.09kb -> 12.64kb (33.79%) /docs/images/FetchBeer.svg -- 24.30kb -> 16.36kb (32.66%) /docs/images/SequenceBasic.svg -- 6.32kb -> 5.49kb (13.04%) /docs/images/Tutorial1.svg -- 6.67kb -> 5.94kb (10.98%) /docs/images/FetchBeerFails.svg -- 6.46kb -> 5.83kb (9.76%) /docs/images/FetchBeer2.svg -- 14.99kb -> 13.76kb (8.18%) /docs/images/Tutorial2.svg -- 24.35kb -> 22.44kb (7.85%) Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>

  • doc fix

  • Merge branch \'new_doc\'

  • remove deprecated code

  • updated documentation

  • [Fix] Fix cmake version warning and -Wformat warning (#319) Co-authored-by: Homalozoa <xuhaiwang@xiaomi.com>

  • Update README.md

  • Fix Windows shared lib build (#323)

  • fix shadowed variable in string_view.hpp (#327)

  • Build Sample Nodes By Default to Fix Github Action (#332)

    • Fix github action
    • Change working directory in github action step
    • Build samples by default
  • Added BlackboardCheckBool decorator node (#326)

    • Added tests for BlackboardCheck decorator node
    • Added BlackboardCheckBool decorator node
  • Fixed typo \"Exeption\" -> \"Exception\" (#331)

  • WIP

  • fix #325

  • Contributors: Adam Sasine, Affonso, Guilherme, Alberto Soragna, Davide Faconti, Homalozoa X, Jake Keller, Philippe Couvignou, Tobias Fischer, benjinne, fultoncjb, goekce, imgbot[bot]

3.6.0 (2021-11-10)

  • Build samples independently of examples (#315)
  • Fix dependency in package.xml (#313)
  • Fix doc statement (#309) Fix sentence
  • Fix references to RetryUntilSuccesful (#308)
    • Fix github action
    • Fix references to RetryUntilSuccesful
  • added subclass RetryNodeTypo (#295) Co-authored-by: Subaru Arai <SubaruArai@local>
  • Fix github action (#302)
  • Minor spelling correction (#305) Corrected the_aswer to the_answer
  • Update FallbackNode.md (#306) typo correction.
  • Add signal handler for Windows (#307)
  • fix
  • file renamed and documentation fixed
  • Update documentation for reactive sequence (#286)
  • Update FallbackNode.md (#287) Fix the pseudocode in the documentation of \'Reactive Fallback\' according to its source code.
  • Update fallback documentation to V3 (#288)
    • Update FallbackNode.md description to V3
    • Fix typo
  • Use pedantic for non MSVC builds (#289)
  • Merge branch \'master\' of https://github.com/BehaviorTree/BehaviorTree.CPP
  • updated to latest flatbuffers
  • Update README.md
  • Fix issue #273
  • remove potential crash when an unfinished tree throws an exception
  • remove appveyor
  • Merge branch \'git_actions\'
  • Fixes for compilation on windows. (#248) * Fix for detecting ZeroMQ on windows Naming convention is a bit different for ZeroMQ, specifically on Windows with vcpkg. While ZMQ and ZeroMQ are valid on linux, the ZMQ naming convention only works on linux.

    • Compilation on windows not working with /WX

    * Macro collision on Windows On windows, the macros defined in the abstract logger collides with other in windows.h. Made them lowercase to avoid collision

  • Remove native support for Conan (#280)

  • add github workflow

  • Registered missing dummy nodes for examples (#275)

    • Added CheckTemperature dummy node
    • Added SayHello dummy node
  • add zmq.hpp in 3rdparty dirfectory

  • add test

  • fix some warnings

  • Fix bug on halt of delay node (#272)

    • When DelayNode is halted and ticked again, it always returned FAILURE since the state of DelayNode was not properly reset.

    - This commit fixes unexpected behavior of DelayNode when it is halted. Co-authored-by: Jinwoo Choi <jinwoos.choi@samsung.com>

  • Clear all of blackboard\'s content (#269)

  • Added printTreeRecursively overload with ostream parameter (#264)

    • Added overload to printTreeRecursively
    • Changed include to iosfwd
    • Added test to verify function writes to stream
    • Added call to overload without stream parameter
    • Fixed conversion error
    • Removed overload in favor of default argument
  • Fix typo (#260) Co-authored-by: Francesco Vigni <francesco.vigni@sttech.de>

  • Update README.md

  • abstract_logger.h: fixed a typo (#257)

  • Contributors: Adam Sasine, Affonso, Guilherme, Akash, Billy, Cong Liu, Daisuke Nishimatsu, Davide Faconti, Francesco Vigni, Heben, Jake Keller, Per-Arne Andersen, Ross Weir, Steve Macenski, SubaruArai, Taehyeon, Uilian Ries, Yadu, Yuwei Liang, matthews-jca, swarajpeppermint

3.5.6 (2021-02-03)

3.5.5 (2021-01-27)

  • fix issue #251
  • Contributors: Davide Faconti

3.5.4 (2020-12-10)

  • Update bt_factory.cpp (#245)
  • Use the latest version of zmq.hpp
  • Improved switching BTs with active Groot monitoring (ZMQ logger destruction) (#244)
    • Skip 100ms (max) wait for detached thread
    • add {} to single line if statements
  • Update retry_node.cpp
  • fix
  • fix issue #230
  • Contributors: Davide Faconti, Florian Gram

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged behaviortree_cpp_v3 at answers.ros.org