6.270 : Attack of the Drones
Team #11 (eleventy-fun)
The basics of our strategy were:
- Orient
- Using the IR beacon, take a
reading and determine if you are sitting over white or black.
Store this reading.
- Turn 90 degrees and repeat the reading. Store this reading
also.
- Turn to 180 degrees from the starting orientation and repeat
the IR reading. Store this one too.
- Turn to 270 degrees from the starting orientation and take
one more IR reading. Take these four and match them to a
pre-stored pattern, which should give both orientation and color
(black/white)
- Turn to face south/north, and drive forward to score the
first four balls.
- Based on whether we are white or black, choose a color
(white = green, black = red). Pick up the eight closest
balls of our color and drive to that color goal.
- If our color is losing, or if the other team is near the
other-colored goal, vote with those eight balls.
- Pick up the next eight balls of our color and score them in the
top-left/bottom-right scoring area.
- Remove the "easy" balls in the other team's scoring area and
push them into our top-right/bottom-left scoring area.
Anatomy of the Whirling Dervish
The 6.270 competition rules require that all structural components
of the robot be made of Lego. This would be practically impossible if
not for the buckets and buckets (well, boxes and boxes) of spiffy
Technics legos. These allow for robust, reinforced designs which don't
break apart when stressed.
The basic structure of the robot is a large, open-front box into
which balls can roll (through the one-way gate). The concept is
relatively straightforward, and was used by several teams.
Our largest mistake was not making the entrance to the ball area
large enough---by placing the wheels on the outside of the ball area,
we limited the gate to
approximately 4" in width, which made picking up balls spread 8"
apart more difficult than if we had built in a
wider aspect.
There are four servos and two motors driving various parts of the
robot.
- The two motors create a Differential Drive System
independently drive the left and right wheels, allowing the robot
to spin quickly in place. The 500 RPM motor is geared down 70:1,
which is on the fast end of the potential robot drivetrains.
- The casters are powered by servos, which allow them to turn in
a range of 180 degrees. In general, they are turned either directly
forward (for driving straight) or to approximately 55 degrees (as
pictured) to allow spinning in place.
- The ball pusher is also powered by a servo, which is geared
down and back up, and then to a linear converter. This allows the
pusher to be pushed forward and back approximately 4 inches.
- The reversible one-way ballgate operates as a one way ballgate
to allow balls in, but the restraint bar can be moved by a servo.
This allows the gate to be "opened" so that balls can go in and out
freely, or be "locked" so that balls can get out but not in.
HandyBoard
The largest component of the electronics is, of course, the
Handyboard---a microcontroller with sensor ports, motor drivers,
servo drivers and a 31 character display.
In addition to the normal HandyBoard, we built and used the expansion
board, which allows it to control more than one servo (essential to
our design).
IR Beacon
The IR beacon uses an infrared LED (light emitting diode) and an IR
receiver to
calibrated to differentiate between black and white sections of the
table.
In order to prevent trouble due to differing light levels, we set the
IR beacon reading thresholds for black and white in our 60 second
calibration at the beginning of each match
Analog Devices Gyroscope
We used the Analog Devices gyroscope, mounted directly into port 6 on
the Handyboard, to determine our relative angle. The most
interesting part of the gyroscope is it's control
code.
RF receiver
The RF receiver allows the robot to receive the start_machine
command (which officially begins the competition and spawns a thread
to turn the robot off after 60 seconds) as well as to query the
OverMind Computer for its own position, the position of it's
opponent, the current red and green score and the current winner of
the vote.
The code is all written in IC, a C variant which runs well on the
Handyboards and allows interactive testing when the board is
connected to a computer.
Throughout the course, we built up a library of functions which were
used over and over, with some modifications, for each of the
assignments and for the final competition. In its final form, this
is robotlib.c. This includes:
- Global Variable definitions
- Gyro control code, mostly modified slightly off of the code
provided to the 6.270 students by Howard
Samuel (of Analog Devices).
- Motion functions, ranging from the open-loop "spin" function
(which powers the motors in opposite directions at a given speed)
to the very complex "navigateTo", which (ideally) navigates to any
given (x,y) position on the board, closing the feedback loop around
both the gyro and the RF system, and avoiding the center barrier.
- Orientation-determining functions, (determine_facing,
turn_to_face, and determine_teamnumber) which use the IR beacon and
knowledge of the color pattern to determine team color and original
orientation (failures in this code were the cause of the "Droid Racing Association World
Spinning Champion" title awarded to Bob for his performance in the
Qualifying Rounds)
- Math functions, which calculate the angle between two sets of
(x,y) coordinates, or the distance between them
- Various small and/or silly functions, which do small things like
play a scale or determine the sign of a floating point number.
Once all these library functions were working, implementing our
strategy was the matter of a few minutes. Unfortunately, the
navigateTo function was relatively untested and unreliable at
impounding, so the code used in competition was likewise unreliable.
In retrospect, we should have chosen to use gyro-enhanced dead
reckoning, rather than relying on the RF to keep our position
relatively up-to-date.
Back to the main Team #11 page
eleventy-fun at mit dot edu
Last modified: Thu Jan 27 02:40:32 EST 2005