TL;DR
- Simulated N drones in Gazebo and coordinated formations via ROS 2 publish/subscribe.
- A Python interface node sends formation type + scale (and drone count) to a C++ controller node.
- The controller computes per-drone target positions, publishes them, and evaluates how many drones are in place.
- Each C++ drone node updates its state in Gazebo and publishes its current position back to the controller for closed-loop feedback.
Demo
System Architecture
The system is structured as a small ROS 2 network with a UI/interface node, a central controller, and one node per drone.
Message Flow (Publish / Subscribe)
- Interface → Controller: formation type + scale
- Controller → Drones: per-drone target position setpoints
- Drones → Controller: current positions
- Controller → Interface: % of drones in the correct place (action feedback)
- Interface: reports goal completion when 100% reached
Results & Learnings
- Reliable formation control for different swarm sizes (N is configurable).
- Clear separation of concerns: Python for UI/commands, C++ for controller + drone runtime logic.
- Practiced core ROS 2 patterns in a realistic loop: topic design, pub/sub orchestration, and multi-node debugging.
- The end result is visually satisfying — the circle/line formations look great in simulation.