Self-driving robot dragons
Robocon is a competition run by Hills Road Sixth Form College in Cambridge. Teams of secondary school students build autonomous robot dragons which rampage around the area stealing sheep and gems and taking them back to their lair. The more things your robot dragon steals the better. As soon as we heard there were Robots and Dragons we sponsored one of the teams: the Little Devils.
The Little Devils are five primary school girls who entered a competition for secondary students because the rules didn’t forbid it, and somehow everyone forgot to tell them it was too hard for them. Which is just as well: it wasn’t.
The contest
The goal of the contest is to build a robot and program it to complete a set of challenges autonomously (without human input) within a specially designed arena. Each team gets a quarter of the arena as their home area. At the back of the area is their lair. The arena contains sheep and gems (cardboard cubes) and points are awarded for each sheep returned to the team’s home area, with extra points for placing a sheep or gem on top of the lair. This involves picking the cube up and placing it on a 15cm high shelf.
2D barcodes are displayed around the arena, on the lairs, and on sheep and gems.
Each team is supplied with a ‘brain’ as a starting point for building their robot. This is a Raspberry Pi Zero with an attached camera. This comes with OpenCV and some libraries that tell you every time the camera sees a 2D barcode, along with an estimate of how far away the barcode is and what angle it’s at. The brain also has motor controllers, and general purpose IO.

The battle arena for the Robot Dragons, with machine readable codes on all the sheep (cubes) and gems (coloured cubes).
Collecting sheep and gems is made even trickier by the fact that once you get close to one, the camera can’t focus on it, so the robot has to guess exactly where to stop in order to pick it up. Once picked up, the robot can then search for the marker for its lair and drive towards it to drop the item off. If they taught trigonometry in primary school they could write more sophisticated software that would work out how to travel based on any marker they can see. We’re already looking forward to next year.
This year’s competition took place on 9th and 10th April, and we were pleased to see a variety of robot designs and programming approaches. Some teams tried to round up as many sheep into their space as possible. The Little Devils’ approach to collecting sheep and gems was a vacuum grabber which would try to pick up the cubes and then drive them back to their lair to get the bonus points.
The Robot
One of the most important skills in professional programming is the rubber duck technique. This robot has a Redundant Array of Independent Ducks such that programming can continue at full speed even if a duck is lost in the battle. The ducks were a late addition, and resulted in some last-minute code changes; in testing the Dragon wasn’t laden with ducks and moved faster, so some constants in the code had to be tweaked in order to drive the motors harder to cope with the additional weight from the ducks.
The robot has a software-controlled robot arm to pick up the sheep and gems. There’s a vacuum pump that switches on when the robot thinks it has a gem. Once the pump is on, it lifts up the arm high in order to clear the camera’s view. There are two powered wheels; selectively driving one or both allows the robot to turn or travel forwards or backwards. All of the software was written by the team members with the robot manufacturing done under adult supervision.
The result
We’re really pleased to report that the Little Devils took the third place trophy. We are somewhat concerned that this appears to be the plot for an origin story where a set of super villains destroy humanity with their robot army. Perhaps we should have put “you must not take over the world” in the sponsorship agreement.