6.270 is a hands-on, learn-by-doing class open only to MIT students, in which participants design and build a robot that will play in a competition at the end of January. The goal for the students is to design a machine that will be able to navigate its way around the playing surface, recognize other opponents, and manipulate game objects. Our team participated in 6.270 in IAP 2012 and we won 3
rd place!
Watch 6.270 2012 Competition
IAP 2012 Competition
(Pictures courtesy of 6.270 organizers and Steven Jorgensen respectively)
- 2 minute round - first 10 seconds Exploration only (30 points for each territory explored in the first 10 seconds).
- Capture territory by spinning gearbox (100 points)
- Must capture territory to mine resources
- Mine resources (ping pong balls) by pulling lever (40 points/ball)
- Max 5 resources per minute in each territory
- Deposit resources in center (40 points/ball)
(from left to right: Erik Johnson, Abdul Alfozan, Emad William)
The three of us are undergraduate students at MIT, class of 2015. Erik is planning to major in either Course 2 (Mechanical Engineering) or Course 6-1 (Electrical Engineering). Abdul and Emad are planning to major in Course 6 (Computer Science).
Robust Design
We used four motors for movement because we wanted to make our robot fast and powerful; time is an important factor for winning the competition. That's why we wanted to make our robot as robust as possible; we did not want it to fall apart if it crashes into a wall. We made a crash test by setting the motors to their maximum speed and letting the robot hit a wall. We kept modifying the design untill it was solid enough to hit the walls at maximum speed unaffected.
Encoder
An encoder was mounted to the bottom of the robot using a rubber band to avoid slipping. It was initially used to measure distance, then we used it to know when the robot stops moving by colliding into a wall or with the other robot.
Container Gate
The gate of the container should be opened to dump the collected balls in the defined part of the inner hexagon. When the gate opens, an extension will fall off the container to make sure the balls reach their destination, especially if the robot wass not very aligned with the wall.
7
Front of the Robot
The wheels on the front are used to capture regions (by scrolling a gearbox). We wanted our robot to be able to capture regions fast. At the same time, we wanted it to have enough torque to scroll the gearbox even if it was pushing against it. Hence, we powered the wheels with two DC motors using 2 worm gears: one behind each wheel.
Rear of the Robot
The lever in the robot pushes down another lever on the wall that releases a ping-pong ball into the container
Navigation (navigation.c)
gotoLocation() drives the robot to a certian point by moving straight to it. Before moving, the robot rotates to face the goal point. However, this is ignored for small angles. If the rotation angle is greater than 90 degrees, the robot will switch its direction to minize the angle needed for rotation. While moving, the robot keeps receiving location updates from the VPS (Vision-Positioning System). New updates help the robot fix any drifting due to sliding, sensor errors or other factors.
gotoLocationSmart() directs the robot when there are barriers in the simple straight-line path. The field has a hexagon-shaped wall at the center that the robot can collide with. This function creates a virtual circle which contains the hexagon that the robot should not pass through. If the robot wants to go to a point on the other side of the circle, it must go first to the intersection of the two tangents to the circle originating from the current location and the goal location. The function also chooses a path in which our robot would not encounter the opponent robot. Another function, alternativePoint(), is used to do the math for that.
Strategy (gameplay.c)
getRegion(onlyDistance) returns the index of the region that is closet to the current point (or any other point passed to the function), if onlyDistance = 1. Otherwise, if onlyDistance = 0, the function computes the optimal region to go to. The function takes into consideration the distance from the current location, the remaining balls in each mine, the location of the other robot, along with other factors.
explore() makes the robot go around the field passing through all the regions because we are rewarded 30 points for every region explored during the first 10 seconds. The function terminates automatically after 9 seconds.
dominateRegion() go to a region using gotoLocationSmart(), captures the region by scrolling the gears in the gearbox (100 points), then mine it by pulling down a lever on the wall. The mines then releases ping pong balls into the container on top of our robot. (40 points/ball)
dumbBalls() is automatically called when there is less than 20 seconds left to the end of the match. It drives the robot to the nearest region where it can dump the balls, in a path that avoids the other robot. When it reaches its destination, the gates are opened to release the balls.