Activity #5
Line Follower
ENVIRONMENT :
A flat surface with a line or "track" of uniform color and surroundings which
are relatively distinct and at the opposite end of the brightness spectrum from
the track (dark-on-light or light-on-dark). The width of the track will be
~ 1 inch. The track will only make "curved" turns (no true right angles to
worry about).
GOAL :
Follow the track.
DETAILS :
Many simple robots are designed to navigate their environment by following a
path on the floor -- ever seen a mail delivery robot? By keeping a sensor
relatively centered over a "track" the robot is able to effectively navigate its
environment.
For this program, you will be creating a line following robot that meets the
following:
- To get you started, I will provide each team with a paper test track which
is a black oval on a white background. You may use this to make an
initial development of your code.
- You may produce either a one sensor (on the line) or a two sensor
(straddling the line) version of the line follower.
- Your robot may assume that it is placed on the track to begin with and that
it is placed "relatively parallel" to the direction of the track (that is, it
won't be placed so that it immediately moves off the track). It should
then proceed around the environment following the track.
- Do not hard code assumptions about the shape of the track. For example,
your finished robot should be able to navigate the test pad track in either
direction.
- Do not hard code assumptions about whether you are following a black track
on a white background or a white track on a black background. Instead,
your code can EITHER allow you to "sample" the line and background colors at
start up (and then wait for a button push to start running) or it can simply
assume that severe color shifts either direction mean you have left the line.
TESTING:
On March 11th we will have a small competition to see who has built the
"best" line following robot (in fact, I am considering doing this over in the
lounge area of ITTC to allow for a little more room and so we can invite your
classmates and other professors).
To do this, we will use the general rules provided by the
Chicago Robotics club and it's "Basic
Line Following" competition.
In short:
- I will build a track made up of 12x12 inch vinyl floor tiles placed
together. I will probably aim for a 4 foot by 5 foot track plus or minus
one foot in each dimension.
- I will declare a starting/finishing line
- Each team will have three attempts to run three laps around the track
- Your score for each attempt is the total time in seconds plus the total
number of penalty points.
- Your lowest score (fastest time with fewest penalties) will be what your
team scores for the event.
- Pride and bragging rights to the team with the best score.