Assignment 3
Home HANDOUTS Assignment 1 Solution 1 Assignment 2 Solution 2 Assignment 3 Solution 3 Assignment 4 Assignment 5

 

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:
 
  1. 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.
     
  2. 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:
     
    1. 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.)
       
    2. 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.