| |
Topic: RobotSim Programming
Due: Monday, February 12
In the style of main1 through main12
in the file frob/RobotSimDemo, define
controllers that achieve the following tasks:
- Using the left-side rangefinder, design a
"wall-follower" controller such that the robot follows a
wall that is on its left, keeping it at a distance d.
- Using the controller from (a) above, design a controller that follows a
wall that is on its left, keeping it at a distance d, but in addition:
- If it sees a wall in front of itself (using the front rangefinder), it first slows down, then
turns right, and then continues to follow the wall on its left.
(I.e. an inside-corner right turn.)
- If it loses track of the wall on its left, it continues just a
bit, then turns left, then moves forward a bit again, and then
follows the wall which is hopefully now on its left. (I.e. an
outside corner left turn.
This should permit the robot to follow the inside perimeter of the
simulator. But it should also be able to follow any convex or
concave object, whose corners are all at right angles, and whose
cavities and protrusions are all greater than some minimal
dimension. Create such an object and test your program on it.
|