百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
B

BehaviorTree.CPP

> 编程语言
开源

C++ 中的行为树库。附带电池。

4.1K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

C++ 中的行为树库。附带电池。

# BehaviorTree.CPP 4.9

This __C++ 17__ library provides a framework to create BehaviorTrees. It was designed to be flexible, easy to use, reactive and fast. Even if our main use-case is __robotics__, you can use this library to build __AI for games__, or to replace Finite State Machines. There are a few features that make __BehaviorTree.CPP__ unique, when compared to other implementations: - It makes __asynchronous Actions__, i.e. non-blocking, a first-class citizen. - You can build __reactive__ behaviors that execute multiple Actions concurrently (orthogonality). - Trees are defined using a Domain Specific __scripting language__ (based on XML), and can be loaded at run-time; in other words, even if written in C++, the morphology of the Trees is _not_ hard-coded. - You can statically link your custom TreeNodes or convert them into __plugins__ and load them at run-time. - It provides a type-safe and flexible mechanism to do __Dataflow__ between Nodes of the Tree. - It includes a __logging/profiling__ infrastructure that allows the user to visualize, record, replay, and analyze state transitions. ## Documentation - **Tutorials and general documentation**: https://www.behaviortree.dev/ - **Auto-generated Doxygen**: https://behaviortree.github.io/BehaviorTree.CPP/ - **Community support and forum**: https://github.com/BehaviorTree/BehaviorTree.CPP/discussions # GUI Editor Editing a BehaviorTree is as simple as editing an XML file in your favorite text editor. If you are looking for a fancier graphical user interface (and I know you do) check [Groot2](https://www.behaviortree.dev/groot) out. # How to compile **BT.CPP** requires a compiler that supports C++17. Three build systems are supported: - **colcon (ament)**, if you use ROS2 - **conan** otherwise (Linux/Windows). - **straight cmake** if you want to be personally responsible for dependencies :) Compiling with [conan](https://conan.io/): > [!NOTE] > Conan builds require CMake 3.23 or newer. Assuming that you are in the **root** directory of `BehaviorTree.CPP`: ``` conan install . -s build_type=Release --build=missing cmake --preset conan-release cmake --build --preset conan-release ``` If you have dependencies such as ZeroMQ and SQlite already installed and you don't want to use conan, simply type: ``` mkdir build_release cmake -S . -B build_release cmake --build build_release --parallel ``` If you want to build in a [pixi](https://pixi.sh/) project (conda virtual environment). ``` pixi run build ``` If you want to use BT.CPP in your application, please refer to the example here: https://github.com/BehaviorTree/btcpp_sample . ## Installing BehaviorTree.CPP (vcpkg) Alternatively, you can build and install behaviortree-cpp using [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager: git clone https://github.com/Microsoft/vcpkg.git cd vcpkg ./bootstrap-vcpkg.sh ./vcpkg integrate install ./vcpkg install behaviortree-cpp The behaviortree-cpp port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository. # Commercial support Are you using BT.CPP in your commercial product, and do you need technical support / consulting? You can contact the primary author, **[email protected]**, to discuss your use case and needs. ## Previous version Version 3.8 of the software can be found in the branch [v3.8](https://github.com/BehaviorTree/BehaviorTree.CPP/tree/v3.8). That branch might receive bug fixes, but the new features will be implemented only in the master branch. # Star History # Contributors # License The MIT License (MIT) Copyright (c) 2019-2026 Davide Faconti Copyright (c) 2018-2019 Davide Faconti, Eurecat Copyright (c) 2014-2018 Michele Colledanchise Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

GitHub Issues· 0 开放

在 GitHub 查看全部

暂无开放 Issues,或尚未同步最近议题。

核心特点

  • •It makes __asynchronous Actions__, i.e. non-blocking, a first-class citizen.
  • •You can build __reactive__ behaviors that execute multiple Actions concurrently (orthogonality).
  • •You can statically link your custom TreeNodes or convert them into __plugins__
  • •It provides a type-safe and flexible mechanism to do __Dataflow__ between
  • •It includes a __logging/profiling__ infrastructure that allows the user
  • •Tutorials and general documentation: https://www.behaviortree.dev/
  • •Auto-generated Doxygen: https://behaviortree.github.io/BehaviorTree.CPP/
  • •Community support and forum: https://github.com/BehaviorTree/BehaviorTree.CPP/discussions
  • •colcon (ament), if you use ROS2
  • •conan otherwise (Linux/Windows).

> 标签

C++aibehaviortreecoordinationgames

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言