The Mailman


In January of 2014 I competed in the MASLAB robotics competition here at MIT. It is a month long event of building a robot from scratch that culminates in a single-elimination final competition. This year there were 17 teams competing, which range from about 3-5 members. My team of three can be seen above on the right half of the photo (Grant on the far right, John next to him, and myself next John). We are all EECS majors. To make a very long, tiring, and stressful story short, we ended up coming in 1st place in the final competition.

For reference, we were team 12, a.k.a “The Mailmen”, and our robot was “The Mailman”. Why? Because we deliver.


If videos are your thing and you just want to skip to some robot action then you can see the final competition below. The whole competition was recorded and is really long. I uploaded videos of just the rounds our robot was in so you don’t have to watch the whole thing.

Our First Round

Our Second Round

Last Round and Awards

Entire Competition (Long)

Competition Rules

The full rules and details can be found on the website here, but I am going to give a quick run down of everything you really need to know.

The basic back story of the competition is that our robot is in some nuclear facility and it has a job to perform. That job is to put active energy cells (green balls) into reactors (goals) and remove empty energy cells (red balls) from the facility (by dumping them over a yellow wall).

There are six basic field elements (seen below, though the coloring is not exactly accurate). There are walls lined with blue tape. These walls are just walls - nothing special. There are walls lined with yellow tape. These walls are were you can dump red balls over to the opponents side of the field, which is good for you and bad for them. There are “reactors” (goals) lined with teal colored tape. You want to score green balls in the top and bottom of these reactors. Scoring in the top is worth more than scoring in the bottom. You also get bonus points if you score in both the top and the bottom. Lastly there is an “energy silo” that is lined with purple tape. Here you can collect more balls if your robot has some kind of gripper. This is the only way to get more balls (excluding red balls being dumped on your field by the opponent) than what you start with on the field.

You can also see the point system below.

Robot Hardware

Based on the competition, let me give you an idea of all the of capabilities that a robot needs to have to perform all of the tasks.

  • Ball pickup mechanism to collect balls from the ground
  • Lifting mechanism to raise the ball up about a foot in order to score in the top of the reactors
  • Sorting mechanism to sort between red and green balls
  • Dispensing mechanism for scoring in both the top and bottom of the reactors and for scoring over the interface wall
  • Gripper or claw to extract balls from the energy silo

Ball Pickup

We went with the conventional mechanism - a rubber band roller. It is basically foolproof. The rubber bands do a wonderful job at gripping the ball and then flexing around it. Part of the magic also comes from the wire ramp that guides the ball from off the floor to a few inches above the ground and into our lift mechanism. You can see the roller that I designed and 3D printed below.

Ball Lift

This mechanism raises the ball from the bottom platform of our robot to the top. We used an Archimedes’ screw for this, which Grant cut, drilled, and welded together. The screw rotates in a chamber, which you can see in the photo below with the front piece removed.

Ball Sorting

Red balls must be sorted from green balls. This is done using two Pacman shaped disks and servos. This design is meant to prevent clogging. The first disk sorts green balls into one channel and red balls into another channel. The second disk is what dispenses them for scoring. The first disk has a photo-emitter and detector pair for detecting when a ball needs to be sorted. The webcam does the actual color detection upon pickup. So when a ball reaches the sorter, the program just looks up the color of the last ball that was picked up.

Ball Dispensing (scoring)

Like I said above, the second Pacman disk is used to dispense the balls. That is not the complete story though. As you remember from competition rules, you can score green balls in the top and bottom of the reactors. Not only can you do that, but you want to do that because you get more points if you do. So on top of dispensing balls out of the top of our robot, our dispenser can also dispense balls down a hole and into a funnel that guides the ball into the lower port of the reactor. This allows the robot to do its “double tap” maneuver, which is where it scores one green ball in the top of the reactor, then backs up and scores another in the lower part of the reactor - giving us a lot of points. Red balls are also dispensed out of this hole and over the interface walls (onto the opponents field).


Our robot has a “claw” mechanism in the front for removing balls from the energy silo. Besides having the opponent dump balls onto your side of the field (and in theory they should only be dumping red balls on your side), this is the only way to get more balls than what you start with on your field. The claw is one of the more ‘hacky’ mechanisms on our robot. To make it work properly a piece of cardboard was taped to the front of it. It operates by sliding this piece of cardboard behind the ball that rests in the energy silo and then the robot drives in reverse to pull the ball out. The robot will then drive forward with the roller on in an attempt to pick up the ball.

Code and Strategy

The software for the robot was written in Java and ran on a Windows 8 tablet. Even though I would like to, the software is a really long story that I simply do not have time to write at length about. However, I can give you some idea of what is going on. First off realize that our only sensor is a webcam (and technically that photo-gate for ball sorting), so we relied heavily on computer vision. So the webcam and computer vision code detected all of the field objects and calculated the distance and angles to those objects. That information would be fed into some high level strategy that would do things like prioritize scoring over collecting balls. The high level strategy would then pass things off to sub-states that would execute the actual maneuvers. For example the scoring routine had sub-states like centering the reactor in the frame of the webcam, then doing a manhattan distance routine to actually get in front of and perpendicular to the reactor, then a PD controller for driving to the reactor, then some more steps for dispensing balls.

Lastly, you can read more about the robot and code in our informal paper we had to write at the end of the competition.