Cap'n Crunch was a robotic participant in the IAP 2003 6.270 Autonomous Robotics Competition. He was a mighty beast, but despite the best efforts of the team, he remained untamed by code and unstopped by the lip of the table. The Cap'n zipped through the tournament with an impressive 0-2 record.
Cap'n Crunch was built over one long, grueling January by Vikash Gilja, Jimmy Noonan, and Dan Ramage.
Early in the design phase, we decided to make our robot fast -- really fast. Our strategy was:
Every team gets to pick the arrangment of the balls in the far corner, so we knew we didn't have to sort through them. However, we needed to get there first (speeeed). Once we had the ball, we could scatter the remaining balls to confuse the other robot, and then find the cup at our leisure.
Cap'n Crunch was the physical incarnation of speed. The Cap'n was one of the fastest robots on the board. This was thanks to:
The six motors allowed the Cap'n to make it up the slopes present on this year's game board at such a low gear ratio. They also meant that if the Cap'n was moving, he was probably blasting by the other robot fast enough to leave small chunks of space-time injured and pulsing.
Six drive motors also meant that all of the non-driving tasks would have to be carried out by three servos. The servos were allocated as follows:
All of these mechanisms pretty much worked. The robot was as fast as a speedboat and twice as land-worthy. Its grabber also worked like a charm. The blue plow-plates helped by knocking incoming balls into the arm's "radius of death." The arm would then smack to the ground, rolling the ball up the ramp. The ramp would lift once it had the ball securely (as informed by the ramp bump sensor). The ball could be ejected off the lifted ramp into the cup by hyper-extending the claw-arm.
Cap'n Crunch used a complex, multi-threaded, finite-state-machine-based control model to handle the intricacies of slamming into walls. The code was highly optimized, but still had trouble fitting in the Handy Board's 16K of memory. (The final code was 15829 bytes, even after hacking up the 4K of provided system code. Lets just say our robot is no longer able to beep.)
Most of that code was written to counteract the tendency of the Cap'n to go berserk. The Crunch moved too quickly to line-follow well on the board, but he was a case study for shaft encoding. Three shaft-encoding drive controllers were incorporated into the Cap'n:
The first and second worked remarkably well, while the third was a bit too weak to be used in competition.
The Cap'n also had control code to line follow, wall follow, find balls with its 5 distance sensors, detect impacts, watch for color changes on the floor, and drive relative to an abstract coordinate system.
Somewhere along the line, we forgot to actually write good, well-tested code to run our robot through its rounds on the competition table. Everything we did do was abstract and good, but there were many hiccups which could throw our robot off course. One more week of testing, and the robot would have been able to intelligently deal with such situations.
We never seemed to get our initial hail-mary shot calibrated correctly. During the qualifying round, we managed to zip straight across the board and hit the far wall before the other robot finished turning 90 degrees in place. Needless to say we both won a loss that round.
During the actual competition, we misfired again. This time, the Cap'n ended up slamming into the balls on our side, butt first. It's kinda funny how hundreds of hours of work can culminate in 1.5 seconds of driving in the wrong direction.
6.270 is a double-elimination tournament, so that was the end. We and the Cap'n didn't make it happen.