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).
- 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.
- 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.
- 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).
- The user will input obstacle positions from the mouse, a robot
position, and then a goal position
- 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.
- 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)).
- 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.
- 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:
- Assume that the robot is employing
sonar sensors capable of measuring distances from a fixed bearing on
the robot body frame.
- In solving this problem,
use the REQUIRED MATLAB TEMPLATE and the function
prototype function
ransacWF(vel, numSensors, sigmaPct, pctOut, sigmaTolerance,
modelConfidence),
- vel is the vehicle velocity
- numSensors
is the number of sonars in the array. These will evenly discretized
from 225-315 degrees. Thus if numSensors = 5, they will take
readings at headings of 225, 247.5, 270, 292.5, and 315 degrees.
- sigmaPct is the standard deviation of the distance measurement
as a function of distance. For example, if Sonar 1 measures
a distance of 14 meters to the wall, the 5% noise argument (sigmaPct=0.05) would induce random gaussian noise
with sigma = 14*0.05 = 0.7 meters onto the measurement of Sonar 1.
- pctOut is the expected
percentage of sonar measurements corrupted as outliers. The outlier
error will be modeled by adding or subtracting a percentage of the actual
distance as taken from a uniform distribution. For
example, if pctOut=0.2, each
sonar would have a 20% chance of being corrupted by outlier error (crosstalk,
multipath, etc.) in lieu of random error. If Sonar 1
was corrupted as an outlier, the error would be +/-rand*14
meters (rand samples from a uniform probability distribution),
where the sign would also be determined randomly. NOTE HOWEVER THAT
THE OUTLIER ERROR MUST EXCEED THE sigma VALUE. If it does not,
repeat the random distance generation until it does.
- sigmaTolerance is the distance
(in standard deviations) used to accept/reject sample votes
- modelConfidence is the probability
of achieving a valid model. If modelConfidence=0.99, then
RANSAC must be run enough iterations to ensure a valid model is obtained
with 99% probability.
- In this version of RANSAC, there is no threshold value.
The model that achieves the most sample votes will be followed.
- 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.
- 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 ).
- 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.
- For the RANSAC trial, also plot versus
time:
- the number of outliers generated
versus the number that RANSAC detected/rejected.
- the number of non-outliers that RANSAC
errantly classified as outliers
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. .