Homework 2
Posted 29 Sep 03, Due 14 Oct 03 at 1PM

Problem 1  Motion Planning through Potential Fields:  Following the model developed in R. Beard’s notes, as well as the class lectures, we will develop a potential field based motion planner


Figure 1:  Potential function image generated with meshc function (left) and the same function displayed via the 2D contour function with robot trajectory superimposed (right). 

  1. In solving this problem, use the REQUIRED MATLAB TEMPLATE with prototype  function pField(sizeX, sizeY, v), where the first two arguments correspond to the figure size, and v the robot velocity.
  2. Assume a closed configuration space (the bounds of the figure are walls).  This requires the simulator to model the goal position, obstacles and walls with APPROPRIATE potential functions.  
  3. Parameters for these functions can be chosen at your discretion.  However, they should confine the robot trajectory to the configuration space (inside the figure) for all but the worst goal placements (e.g. on the wall).  
  4. The user will input obstacle positions from the mouse, a robot position, and then a goal position
  5. We are assuming a non-holonomic robot.  In other words, the robot must reflect orientation.  You can use the makeRobot and moveRobot functions provided to do this.
  6. After user input, contours of the potential function are to be drawn on the figure (see matlab function contour) and the robot will follow the trajectory dictated by the potential field (example in Figure 1 (right)).
  7. Plot the surface-contour plot of the potential function used for the simulation (example in Figure 1 (left)) using the built in Matlab meshc function.
  8. The simulation will terminate once the robot reaches a certain proximity to the goal, or when a local minimum is detected (constrained to a certain proximity for several iterations movement).


Problem 2  RANSAC Wall Follower:  In this problem, we will implement two wall followers:  a standard, least-squares based approach and a robust follower employing RANSAC.



INSTRUCTIONS:

  1. Assume that the robot is employing sonar sensors capable of measuring distances from a fixed bearing on the robot body frame. 
  2.  In solving this problem, use the REQUIRED MATLAB TEMPLATE and the function prototype   function ransacWF(vel, numSensors, sigmaPct, pctOut, sigmaTolerance,  modelConfidence),  
  3. In this version of RANSAC, there is no threshold value.  The model that achieves the most sample votes will be followed.
  4. The simulation will take user input for the position of the robot.  The wall will be location will be generated automatically at a desired separation d=40 figure units from the wall.   
  5. The simulation will run 2 wall followers - with and without RANSAC.  The effects of RANSAC will be illustrated by plotting the estimated wall position and orientation on the figure versus time.  The resulting animations should be equivalent to the mpegs presented in class (no ransac & ransac ).  
  6. In addition to the animations for both trials, on a third figure plot the mean error in estimated distance to the wall and the mean error in estimated wall orientation.  For the former, use the normal distance to the estimated wall model.  
  7. For the RANSAC trial, also plot versus time:



SUBMISSION INSTRUCTIONS:
The deliverables for this homework are the two .m files for the Matlab functions.  These are to be submitted as a ZIPPED FILE ATTACHMENT.  Submit them to spletzer@cse.lehigh.edu.  INCLUDE YOUR FULL NAME as the e-mail subject line.  In grading, I will run your Matlab functions with different arguments to ensure consistent behavior. .