Z0 · Motivation
Why one robot isn't enough
Cleaning, inspection, mapping and agriculture all come down to the same job: visit every part of an area. One robot does it slowly. Three robots can do it in roughly a third of the time, but only if they don't waste effort sweeping the same ground or get in each other's way.
Fleets also need to move together. Escorting, carrying a load between robots or patrolling in a pattern means holding a fixed shape while moving.
The project builds both behaviours on the same three robots:
- Collaborative coverage. A central coordinator divides the map into zones and hands them out while the mission runs, so the fleet covers the whole area without duplicated work.
- Leader-follower formation. Two followers track the leader's pose through TF2 and hold their slots in a V, steering with their own velocity commands.
Everything runs in simulation, built so the same launch files can run on real robots.
Z1 · Components
The stack
| Layer | Tool | Role |
| Middleware | Ubuntu 24.04, ROS 2 Jazzy | Communication between every node |
| Simulator | Gazebo Harmonic | Arena, physics, lidar and wheel odometry |
| Navigation | Nav2, one stack per robot | Localization, path planning and path following |
| Coordination | Custom fleet nodes | Zone planning and assignment, formation control, fleet health |
| Avoidance | Custom Nav2 costmap layer | Makes each robot treat the others as obstacles |
| Robots | TurtleBot3 Waffle ×3 | Differential-drive base with a 360° lidar |
Nav2 already knows how to drive one robot from A to B. What it doesn't know is that there are two other robots, where they're going, or what work is left. The coordination layer adds that knowledge.
Z2 · Simulation
One world, three robots
The arena is a 10 × 8 m room with crates, pillars, a bench and a dividing wall. A single description file generates both the Gazebo world and the matching occupancy map, so the map the robots plan on always matches the world they drive in.
Each robot gets its own namespace (/robot1, /robot2, /robot3). Its sensors, velocity commands and complete Nav2 stack live under that namespace, so the three never hear each other's topics. Positions go the other way: all three share one transform tree, with every frame prefixed by its robot's name. Any node can then ask where robot2 is relative to robot1, which formation control depends on.
Z3 · Architecture
How it fits together
The coordinator sits above three independent navigation stacks. It never steers a wheel itself. It decides where each robot should go next and lets that robot's Nav2 work out how to get there.
Fleet coordinatorzones · assignment · coverage bookkeeping · formation
navigation goals, one robot at a time
/robot1 Nav2localize · plan · follow
/robot2 Nav2localize · plan · follow
/robot3 Nav2localize · plan · follow
velocity commands
Gazebothree robots · lidar · odometry
poses on the shared transform tree, back to the coordinator
The split keeps each part simple. Nav2 handles obstacles, localization and path following for its own robot. The coordinator only has to reason about the fleet as a whole.
Z4 · Coverage
Dividing the map
The coordinator turns the map into a grid of cells, each about the width of one sweep. It then splits the free space into six zones of equal area. There are deliberately more zones than robots, so the plan can change while the mission runs.
Inside each zone it lays out back-and-forth lanes, the pattern a lawnmower follows. The work is handed out in three steps:
- A fair start. The first three zones are matched to the three robots so the total travel to reach them is as small as possible.
- Pull, don't push. When a robot finishes its zone, it takes the nearest zone nobody owns yet.
- Sharing the last of the work. When no free zones remain, an idle robot takes half of the remaining lanes from the robot with the most work left.
Every zone has exactly one owner at a time, and the coordinator keeps a live record of which cells have been covered. A robot skips any lane another robot has already swept. If a robot stops responding, its unfinished work goes back into the pool for the others.
The finished map shows the dynamic assignment at work. robot1 (red) started in the north-west zone and later took the north-east one. robot2 (green) finished its first zone and moved on to the south-east, and robot3 (blue) took over the remaining south-centre zone.
Assigning zones as the mission runs beats a fixed plan. A robot held up by an obstacle doesn't hold up the fleet, because the others take the remaining work.
Z6 · Safety
Keeping apart
Nav2 avoids obstacles it can see on its lidar. A TurtleBot3's lidar is mounted on top of the robot, though, and its scan plane passes just over the body of another TurtleBot3. The robots can't see each other.
To fix that, the project adds a custom Nav2 costmap layer, written in C++. Each robot's costmap receives the live positions of the other two and marks them as solid obstacles. Nav2's standard inflation layer then adds a safety margin around them. Planners route around other robots just as they route around a pillar, and the marks move with the robots every update.
Sensors only see what's in their field of view. When the fleet already knows where its robots are, sharing that knowledge is more reliable than hoping each sensor sees the others.
Z7 · Results
The results
An end-to-end runner starts both missions, records every pose and takes a snapshot at each stage. It only reports success if every check passes. The final run:
100%area covered
146/146 cells in 269 s
2.5 cmmean formation error
13.7 cm worst case
0failed navigation goals
across both missions