Robotic
Autonomy Activities
Submitted
by: Dave Lavery, NASA Headquarters, Robotics Education Project
Subjects:
Robotics, science, math
Grades: High
School
Materials Required:
Described below are a series
of exercises intended to explore and understand basic principles of autonomous
robotics and the capabilities of the EduRobotics kits (note: these exercises
can also be conducted with many other autonomous robotics kits, such as
those for the BotBall competition, LEGO Mindstorms, Handyboard robots,
etc.).
The EduRobotics kits can be
obtained through Innovation First Corporation http://www.innovationfirst.com/.
The exercises are designed so they can also be completed with the BotBall
kits obtained from KIPR at http://www.kipr.org/ or with the LEGO Mindstorms
kits, available through http://www.mindstorms.com/.
Objectives:
For each exercise, it is intended
that teams will build a robot from the components found in the EduRobotics
kits, and selected additional sensors and electronic components available
from common sources (i.e. DigiKey, Radio Shack, etc.) and/or leftover
parts from the 2001 FIRST robotics kit. The robots are then programmed
to complete the exercise while operating in a fully autonomous mode (i.e.
teams will not use the operator interface to control the robot during
the exercise).
Each of these exercises can
be conducted on a simple tabletop play field. It is suggested that this
play field be constructed of a single 4x8-foot sheet of plywood, painted
neutral gray, with a rim of 2”x4” wood boards standing on
edge attached to the perimeter of the plywood. The basic intent behind
the exercises is to see if the team can complete them, and what they can
learn about programming autonomous robots as a result. If multiple teams
participate in the effort, a logical extension of the exercises would
be to have mini-competitions to compare different approaches to the solutions
and see which ones perform faster and/or better.
The exercises are presented
in increasing order of complexity and required level of effort. Many of
the exercises will build on the techniques and capabilities developed
in previous exercises, so it is suggested that they be competed in approximately
the order presented.
Procedures:
Exercise 1: Line Following
Use black tape (electrical tape or similar material) to mark out a crooked
path on the play field. The path should be composed of short (approximately
6-12 inches), straight, line segments, with 45 degree “corners”
between each segment. Program the robot to use one, two, or three optical
sensors (these can be the optical sensors from the 2001 FIRST kit, or
simple photoresistors, or other optical detectors) to detect and track
the path, and follow it from one end to the other. Note that some sensors
will require that they be properly shielded from ambient light in the
room to provide reliable performance (common ways to do this are to wrap
the sensors with shields of electrical tape, place them in tubes of heat-shrink
tubing, etc.). How fast can the robot trace the path? What different strategies
must be used as the number optical sensors changes? What happens if the
angle between line segments is changed from 45 degrees to 90 degrees?
Is the approach used robust enough to handle sharp turns?
Exercise 2: Wall Following
Use the microswitches included in the kit as contact “bump sensors,”
positioned on the robot so they can contact the 2x4 rim of the play field.
Program the robot so it can start in one corner and follow the rim of
the play field all the way around, by detecting when the bump sensors
hit the wall. Program the robot so it can “find” the wall
if it does not start in contact with the wall. Add a short segment of
2”x4” board about half way along the long dimension of the
play field, perpendicular to the long wall. Is the robot able to trace
the modified wall without losing contact? If it does lose contact, can
it find the wall again and continue on? Is the robot designed to always
proceed around the field in a clockwise direction, or counter-clockwise,
or can it do both?
Exercise 3: Detecting Terrain Changes
Construct a small platform in the middle of the playfield, large enough
to support the robot (two shoeboxes placed side-by-side and taped together
are ideal for this). Construct a ramp from the play field surface to the
top of the platform, with a 15-20 degree slope (this can be made of stiff
cardboard, light plywood, or sheet metal – any material strong enough
to support the robot). Interface the yaw rate sensor provided in the 2001
FIRST kit (or any other single-axis rate gyro) to the robot controller.
Program the robot so it can drive up the ramp (detecting the change in
slope from level to incline) and stop on the platform at the top of the
ramp (detecting the slope from incline to level) before driving off the
far edge of the platform. Can you add a second gyro, aligned on a different
axis to identify turns-in-place, and have the robot turn 180 degrees at
the top of the platform and drive back down the ramp? How fast can the
robot drive up the ramp and detect arrival at the platform at the top
without falling off the far side? Can you identify any lag time between
when the sensor detects a change in rotation and when the robot actually
starts to slow down in response to the sensor? Does this lag time limit
the theoretical maximum speed of the robot up the ramp?
Exercise 4: Homing On A Beacon
Place a shop “drop lamp” or bright light at the far end of
the play field. This will be the “beacon” for the robot. Use
inexpensive photoresistors as light sensors for the robot. A possible
configuration is a single sensor mounted to the robot, or an arm on the
robot, that “scans” for the target by pointing in a particular
direction at any given time. Another configuration is an array of several
sensors around the perimeter of the robot that constantly scan the entire
viewable scene. Program the robot such a way that it can be placed in
a random location at the near end of the play field, and have it use the
sensors to seek the target (by finding the brightest light source in the
field of view) and, once found, drive to the target. How quickly can the
robot find the target? Is the robot able to robustly locate the target,
no matter what the starting orientation? Try an alternate configuration
of sensors on the robot. What is the difference in performance between
the two approaches? Is there an optimal number of sensors or sensor locations
that enables the robot to find the target faster?
Exercise 5: Auto Calibrating Sensors
When completing any of the exercises utilizing photoresistors as sensors,
you may notice that sensor performance may be affected by ambient light
levels. One way to contend with this is to shield the sensors from any
stray lighting. However, this is not always feasible. An alternate approach
is to calibrate the sensors to the light levels in the environment on
startup, and then have the sensor look for changes in the light level
to detect the target material (e.g. black electrical tape). Repeat Exercise
#1 (Line Following), but this time program the robot so that automatically
measures the ambient light in the environment upon startup, scans for
the tape material and measures the signal level of the tape, and calibrates
the sensor input based on the difference between these two values. How
well does the calibration routine handle different ambient light levels?
Are there upper or lower limits to the ambient light level that “break”
the calibration routine levels (e.g. what happens if you take the play
field outside in bright sunlight? What happens if all the room lights
are turned off?)? Can the robot be programmed to dynamically re-calibrate
if the light level changes during the course of a drive across the play
field (i.e. what happens if you suddenly turn off the room light while
the robot is driving?)?
Exercise 6: Target Following
Mount an inexpensive bicycle reflector to a short post and place it at
the far end of the play field (alternately, make a small - 2” diameter
- target out of the retroreflective tape from the 2001 FIRST kit). Add
optical sensors to the robot (try either of the configurations mentioned
in Exercise #4, or another configuration). Program the robot such that
it can be placed in a random location at the near end of the play field,
and it will use the sensors to seek the target and, once found, drive
toward the target. Use the ranging capability of the optical sensors to
approach to within one foot of the target, but no closer. Slowly move
the target around the play field, and have the robot follow the target
at the one-foot “standoff distance.” Is the robot able to
robustly locate the target, no matter what the starting orientation? Does
the robot accurately maintain the standoff distance from the target? How
fast can you move the target before the robot is no longer able to track
it? Try the alternate configuration of sensors on the robot. What is the
difference in performance between the configurations?
Exercise 7: Sample Collection
Use black tape to mark out a crooked path on the play field, similar to
that described in Exercise #1. At random locations along the path, place
“sample canisters” to be collected by the robot. The canisters
can be any small objects that can be sensed and moved by the robot (e.g.
tuna cans, Styrofoam disks, tennis balls, hockey pucks, wood blocks, etc.).
Add a small arm (or gripper or scoop or claw…) to the front of the
robot that does not interfere with the line-following sensors. Add appropriate
sensors (optical sensors, bump sensors, photoresistors, IR detectors,
etc. – it’s your choice) to the robot to detect the sample
canisters. Program the robot to follow the line, and collect the canisters
when they are detected. The robot should then backtrack to the beginning
of the line and deposit the canisters, then start following the line again.
Repeat until all the canisters are collected and the robot can follow
the path to the end. How is the robot sensing the sample canister? Is
the robot programmed to recognize whether or not it has successfully lifted/moved
the canister? Does it need to be programmed in this way? What happens
if the targets are not all the same (e.g. use tuna cans, tennis balls
and hockey pucks at the same time)?
Exercise 8: Payload Deployment
Use black tape to mark out a crooked path on the play field, similar to
that described in Exercise #1. Modify the line-following robot developed
for Exercise #1, by adding a mechanism that can hold 4-6 of the sample
canisters collected in Exercise #7 (which will now be called “payload
canisters”), and release them one at a time from the back of the
robot as it drives. Program the robot so that as it follows the path,
it measures the distance traveled and drops one of the payload canisters
every 24” along the path. You will have to develop and program a
method of accurately measuring distance traveled. One of the common ways
to do this is to use a “shaft encoder” that counts the rotations
of a drive shaft or wheel axle (this can be as simple as a small light
on one side of a wheel and a photodetector on the other side, and a program
that counts the number of times the spokes of the wheel interrupt the
beam of light), and a program that computes the distance traveled based
on the number of wheel rotations. How accurately does the robot’s
“odometer” measure distance? Are the payload canisters accurately
placed every 24”? What happens to the accuracy if the drive wheels
slip on the play field surface? How can wheel slip be detected and how
can the robot compensate for it?
Exercise 9: Ballistic Targeting
Make a cardboard tube about 6” in diameter and 6” tall. Put
a bicycle reflector or piece of retroreflective tape on it as a target,
and place it at one end of the play field. Build a small throwing arm
or catapult capable of tossing a tennis ball, and add it to the robot.
Have the robot throw the ball several times to see how far the ball is
thrown and how repeatable and accurate it can be. Once the throwing “range”
is known, program the robot to search for the target, approach to a standoff
distance equal to the throwing range, and toss the tennis ball into the
target tube. How many times in a row can the robot toss the ball into
the target? How repeatable is the range of the throwing arm? How accurate
is the ranging information from the sensors? How would you calibrate the
ranging information from the sensors to the actual performance of the
throwing arm?
Exercise 10: Exploration
Construct a platform and ramp similar to the one built for Exercise #2,
located at one end of the play field. Place a shop “drop lamp”
over the platform. Scatter 12 “sample canisters” around the
play field. Place the robot at the opposite end of the play field. Program
the robot so that it will wander around the play field until it encounters
one of the sample canisters. The robot should then pick up the sample
canister, look for the drop lamp beacon, and drive toward it until it
reaches the ramp under the lamp. Sense when the robot drives up to the
top of the ramp, and deposit the canisters on the platform at the top.
Then drive down the ramp and back onto the play field, and continue to
search for more canisters. Continue until all the canisters are retrieved
and placed on the top of the platform. How does the robot determine if
it is picking up a canister, or an immobile obstacle (such as the rim
around the field)? Instead of randomly wandering around the field, can
the robot be programmed to follow a structured search pattern? What is
the most efficient search method you can find?
|