Inspiration

Some jobs are too big, too dangerous, or too spread out for one robot: clearing rubble after a disaster, moving material on a construction site, picking up litter across a park. Ants solve problems like these every day. No single ant is capable on its own, but the colony is, because each one takes a small part of the work and they all share the space without colliding. We wanted to build that idea with real hardware: a team of different robots that divide one job between them.

What it does

Ant Colony is a multiagent robot swarm. One coordinator watches the whole floor through overhead cameras and gives each robot the job it is built for:

  • The dozer finds the debris farthest from the bin, drives behind it, and pushes it to a staging spot.
  • The arm carts pick up the staged debris, carry it to the bin, and drop it in.
  • The coordinator assigns tasks, plans paths that keep robots apart, lets only one robot at the bin at a time, and moves idle robots out of the way.

When a grab fails, the cart tries again, up to five times, before giving up and returning home. Our demo task is floor litter cleanup, but the coordination layer does not depend on the task. The same system could stage rubble or move building materials.

How we built it

Hardware. Two Hiwonder MasterPi arm carts (Raspberry Pi 5, mecanum wheels, 4 DOF arm with a wrist camera) and a Freenove 4WD car converted into a dozer with a 3D printed blade. Each robot runs a small agent with a watchdog, skills (grab, drop, carry, seek, dock), and telemetry.

Localization. A Sony A7 IV mounted above the arena tracks an AprilTag on every robot and sets up one shared floor coordinate frame from four corner tags. We added support for extra cameras, such as an Insta360 GO 3S. Each camera locates itself against the same corner tags and learns its lens model from the main camera, and the tracker fuses tag poses from every camera that sees them. If the main camera drops out, the extra cameras keep the robots localized.

Perception. We fine tuned a YOLO26 nano detector on photos of our debris objects, with carpet-only negative images so the floor texture is not reported as debris. For the last 30 cm of each grab, the cart's own camera takes over. A vision language model (Qwen2.5-VL 3B, served with llama.cpp on a laptop on our local network) finds the object, guides the approach, and directs the grasp.

Coordination. A Python coordinator runs grid A* path planning, a state machine for each robot, task allocation, and traffic rules. All messages are small JSON packets over UDP. A live dashboard shows every robot, object, and path. We also wrote a simulator that plays the cameras and the robots, so we could test the coordination logic before the hardware was ready.

Challenges we ran into

  • Occlusion. The overhead camera looks at the arena at an angle, so a robot's arm column hides its own tag whenever the robot faces the camera, and tall robots cast "shadows" that the tracker reported as objects. We made the coordinator ignore detections in each robot's shadow, have robots back toward the camera, and turn in place to find their tag when it is lost.
  • VLM latency. Running the VLM on the Pi took 20 to 28 s per photo. Moving it to a laptop on our own network and reducing the image tokens brought that to about 2.5 s.
  • Hardware surprises. One cart had its wheel ports wired by axle instead of by side, so "turn" drove it forward. Calibration tools that measure each move from the camera found and fixed

Built With

Share this project:

Updates

Submission history