Smart Turtle Powered by Behavior Trees, ROS2 & Groot! 🐢

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!

:light_bulb: Project Overview

This project uses a Behavior Tree (BT) to manage the robot’s decision-making based on its battery level .

  • :battery: If the battery is high → the turtle navigates to its assigned goals.
  • :high_voltage: If the battery is low → it automatically moves to a charging station, recharges, and then resumes its mission.

:hammer_and_wrench: 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

:seedling: 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.

this is Github rebo



simplescreenrecorder-2025-04-29_15.06.52

8 Likes

Looks awesome. Is there a link that you can share?

1 Like

Thank you for your interest and enthusiasm!
Please find the link here: Github rebo

2 Likes