Hey ROS community!
I’m excited to share a fun and educational project I’ve been working on using ROS2, BehaviorTree.CPP, and Groot to control a smart turtle in the classic turtlesim simulation!
Project Overview
This project uses a Behavior Tree (BT) to manage the robot’s decision-making based on its battery level .
If the battery is high → the turtle navigates to its assigned goals.
If the battery is low → it automatically moves to a charging station, recharges, and then resumes its mission.
Key Features:
- Battery level monitoring and automatic charging behavior
- Goal-based movement with adjustable speed and duration
- Pen color changes depending on the turtle’s current goal
- Dynamic background color updates based on robot state
- Behavior Tree visualization, execution, and debugging using Groot
Why Behavior Trees?
Instead of relying on deeply nested code, Behavior Trees structure robot logic in a visual and modular way. They simplify complex decisions and transitions between tasks — making development and debugging much easier, especially in ROS2.
