Activity #4

Object Avoider version 1


810:159, Robotics Laboratory

Spring Semester 2008


GOAL :

Create a robot that uses touch and/or ultrasonic sensors to avoid obstacles.

DETAILS:

So far we have had robots that don't know anything about their environment (they were in pretty big trouble if something got in their way).  Now we want to begin studying some sensors so we can make some judgments on how to move.

Your task this week is to add touch and ultrasonic sensors to your RoverBot (see pp28-31and pp 40-45 for one possible configuration of these sensors) so that it moves about its environment performing obstacle avoidance maneuvers when necessary.  You will likely find that the finished program is short and simple in hind sight, but given your current knowledge of leJOS, I anticipate this may be a reasonable enough challenge for now. 

Upon starting, the RoverBot should proceed in a straight line until it interacts with an obstacle.  Once an obstacle is detected, your RoverBot should attempt an avoidance maneuver.  The simplest maneuver, and the one I would like you to use, is to back up, rotate away from the object, and then proceed again.

Your robot should continue "roving" and avoiding until the program is "terminated" by a human user.

You may use any configuration of sensors that seems appropriate to you.   You should use "polling" to detect potential conflicts.  That is, you should write a loop which continuously asks the sensors if there is a problem and if evasive actions should be taken.