Embodied AI Glossary中文

BehaviorTree.CPP

BehaviorTree.CPP(C++ 行为树库)BT.CPPAdvanced

The most widely used C++ behavior-tree library in robotics, describing task logic in XML.

BehaviorTree.CPP is an open-source C++ behavior-tree library, primarily authored by Davide Faconti. A behavior tree is a tree structure for organizing a robot's task logic: leaf nodes execute actions or check conditions, while internal control nodes — sequence, selector, parallel, and so on — decide what to try next and what to fall back on after a failure. Compared with a finite state machine, a behavior tree is easier to break apart, reuse, and extend. BT.CPP lets developers write each action node in C++ and then assemble them into a tree using an XML file, loaded and run without recompiling — so the task flow can be adjusted without touching code — and its companion graphical editor, Groot / Groot2, lets you build the tree by dragging nodes and monitor its execution state live. ROS 2's navigation framework, Nav2, uses it to orchestrate navigation behavior.

ExampleNav2's default navigation behavior tree: compute a path, then follow it; if that fails partway through, it tries recovery actions in sequence — clearing the costmap, rotating in place, backing up.

Also called
BT.CPP, Groot behavior-tree editor
Related
Behavior Tree · Finite State Machine · ROS 2 Navigation Stack (Nav2) · Groot2 (BehaviorTree.CPP IDE) · Task Planning · Robot Operating System 2
Sources
BehaviorTree.CPP 官方文档 (Chinese)
BehaviorTree/BehaviorTree.CPP (GitHub)

See it in the full glossary →