Start leveraging the advantages of Behavior Trees 🌳 fully integrated with ROS 2 🤖
AutoAPMS is a heavily extensible development framework for behavior-based ROS 2 applications. It provides a highly modular integration of behavior trees, implements a powerful execution engine and offers convenient CLI tooling for deploying behaviors with ease.
The intention of this project is to make it significantly more user-friendly and less error prone to develop autonomous robotics with behavior trees. The core packages are written in C++ and a supplementary Python API exposes high-level features for scripting.
Note
Currently we support Linux only!.
This project adopts the behavior tree implementation provided by BehaviorTree.CPP and embeds it into the ROS 2 ecosystem so that developers have a much easier time writing custom behaviors and distributing them among robots.
Here are some of the most prominent features offered by this repository:
-
Convenient resource management using
ament_cmakeandament_index -
Inherently extensible due to plugin-based design
-
Flexible and highly configurable behavior execution engine
-
Powerful C++ behavior tree builder API (a supplement to BehaviorTree.CPP)
-
High-level node manifests for registering node plugins without writing a single line of code
-
Support for custom behavior definitions and tree builder algorithms
-
ros2 behaviorcommand extending the ROS2 CLI for behavior management -
Abstractions for PX4 Autopilot available with auto-apms-px4
-
Comprehensive user guide and API documentation
The following installation guide helps you getting started with AutoAPMS.
-
Create a ROS 2 workspace and clone this repository
mkdir ros2_ws && cd ros2_ws (mkdir src && cd src && git clone https://github.com/autoapms/auto-apms.git)
-
Install all required dependencies. We assume that you already installed ROS 2 on your system
rosdep init # Skip this if rosdep has already been initialized rosdep update rosdep install --from-paths src --ignore-src -y -
Build and install all packages required for
auto_apms_examplescolcon build --packages-up-to auto_apms_examples --symlink-install
-
Run your first behavior using
ros2 behavior. This is an extension of the ROS 2 CLI introduced by theauto_apms_ros2behaviorpackagesource install/setup.bash ros2 behavior run auto_apms_examples::demo::HelloWorld --blackboard name:=Turtle
Check out the demo using pyrobosim
We provide a guide for running a cool visual demonstration on complex behaviors created with AutoAPMS in the auto_apms_simulation repository. The simulation shows multiple "robots" moving in a magical hall adjusting their behavior dynamically according to the following policy: Approach the goal as long as the hallway is not occupied - if it is, retreat. Piertotum Locomotor!
demo.mp4
Make sure to visit the User Guide for tutorials and best practices when writing software using AutoAPMS.
We also offer an extensive API Documentation which is created using Doxygen >= 1.10. To generate the documentation run the following from the repository's root:
doxygen doc/DoxyfileThis repository builds on:
- BehaviorTree.CPP by Davide Faconti
- pyrobosim by Sebastian Castro
Special thanks to the maintainers of these projects. It was their contributions to the robotic community that made AutoAPMS possible in the first place! 🚀

