In this week's lab we will begin to consider robots who detect their location in an environment through the use of a light sensor. Thus, you should begin by removing the double bumper configuration from your RoverBot and installing the light sensor configuration that you were to construct in Lab0.
You will be required to write in leJOS and submit two different yet simple programs.
ENVIRONMENT : A flat surface with a "floor" of relatively uniform color. This color can be either relatively light or relatively dark. Additionally, there is a boundary or "warning track" consisting of a band of color at the opposite end of the brightness spectrum from the floor (dark-on-light or light-on-dark).
GOAL : "Freely" move about but remaining within the bounds of the environment.
DETAILS : One way in which a robot to sense its "location" is to use the concept of a "warning track" -- think of a lawn mowing robot that senses a buried wire. That is, the robot moves about the environment until it senses that it has encountered the warning track. At that point the robot would perform some sort of response which would ensure that the robot remains within the boundaries of its environment.
For this program, you will be creating a boundary detecting robot using the light sensor. For original testing purposes, you may use your Test Pad and you may assume that the environment has a light (white) floor with a dark (black) warning track. However, your finished code should allow for the environment to have the opposite configuration. That is, I might put some light masking tape on a dark table and use it as a larger testing area (probably with an irregular shape).
There are at least three ways in which your robot can decide whether it is avoiding a dark warning track or a light warning track.
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. As with the previous program, you may begin by having your robot follow the dark track provided on the test pad. However, your final robot should be able to also handle a white tape track placed on the back table. Once again, you may use either of the three techniques discussed in program 1.
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.
By the due date and time, submit the files:
BoundaryDetection.javaLineFollower.javaAny additional files necessaryvia the electronic submission system. You will also need to prepare your documentation packet following the homework collection policies.