Implementing ROS 2 Applications Using BehaviorTree.CPP
Implementing robot autonomy is a complex task. Beyond executing individual tasks such as navigation, manipulation, and sensing (e.g., image processing and mapping), coordinating these tasks presents an additional challenge. For example, programming a warehouse robot to retrieve and deliver items requires carefully sequencing actions and making decisions based on the outcome of previous tasks. Traditionally, this is done using finite state machines (FSMs), but a newer approach in robotics is the use of behavior trees (BTs). An interesting scientific paper introducing BTs in the robotics environment can also be found at this link [1].
In this chapter, we will introduce the basic concepts of BTs and explain how to implement them using the BehaviorTree.CPP
library, a flexible C++ tool that integrates easily with ROS 2 to handle robotic program flow based on the BT framework. We will see how to create both basic and complex structures...