enforcer jack

TEAM 13
6.270 2008

home people robot results
robot



We designed and built our robot with the goal of reliability, incorporating redundant bracing for stability and strength, and structuring the control code to include several layers of error handling. In addition, our strategy employed all possible scoring mechanics, ensuring that our robot would always score at least a few points. Ultimately, this strategy was successful until the final best-of-three match, when we faced a team that could reliably deliver six balls into the two-point bin.

strategy
Our robot travels around the outside perimeter of the playing field, employing line following to drive to the two-point bin, then the one-point bin, and finally the four-point bin. While traversing the playing field, the robot continuously monitors a bump sensor on the front of the robot, and traps the skunk when the sensor is activated. Given a target score N, our robot drops LSB(N) balls in the one-point bin, LSB(N>>1) balls in the two-point bin, and floor(N/4) balls in the four-point bin. If the robot is unable to reach the two-point bin in a reasonable amount of time, or if it detects a robot ahead (with its distance sensors, mounted in front and back), the robot will drive into the center of the playing field to get around the obstruction, and reorient and align itself using the distance sensors and gyro. The robot uses a similar strategy to avoid obstacles traveling from the one-point bin to the four-point bin.

design
Our robot features a differential drive system, with motor velocities updated via a PID controller based on shaft encoders. It is balanced by four casters, two at the front of the robot and two at the back. The Happyboard and battery are mounted in the center of the robot, and because of the snug fit provided by convenient Lego spacing, neither is affixed with tape or hot glue. A claw is mounted on the front of the robot for the purpose of trapping the skunk, and the servo which controls it is mounted on top of the front right caster. A ramp for dispensing balls is mounted over the Happyboard.

A line of 5 IR LED/Photodiode pairs is mounted on the bottom of the robot, slightly in front of the axle, for the purpose of line following. Two more IR pairs are mounted behind this line, for the sole purpose of determining the starting position. In the front and back of the robot, a distance sensor is mounted over a caster to aid detection of the other robot and alignment with the goals. Bump sensors are mounted around the base of the robot to detect obstacles.
Front view of the robotBack view of the robot


code
We transformed our strategy into C code by developing a library of motion abstractions, and incrementally adding layers of error handling. We wrote motion commands including Forward, Backward, FollowLine, and Turn, all utilizing tuned PID controllers to ensure reliable operation. Each such function is also passed a stop condition and timeout to guarantee the robot will never get "stuck," grinding into a wall for the whole match because of an unforeseen set of conditions. We ran an SVN repository to manage rapid changes to the code in the last few days leading up to the competition, automating the merge process.