The key goal of this project is to get an understanding of the properties of Kalman filters and Particle filters for state estimation. You will be implementing an Extended Kalman Filter (EKF) and a Particle Filter (PF) for landmark based localization. You will also analyze their performance under various conditions.
run.m -- Main update loop, should call ekfUpdate and pfUpdate ekfUpdate.m -- EKF update pfUpdate.m -- Particle filter update resample.m -- Particle filter resampling, called by pfUpdate runExperiments.m -- Useful later for running multiple experiments
generateScript.m -- Generates data according to initial mean and noise parameters generateMotion.m -- Simulates simple motion commandsYou may find these files useful:
prediction.m -- Move robot according to specified motion observation.m -- Returns the observation of the specified marker given the current state sampleOdometry.m -- Implements Table 5.6 sample.m -- Samples from a covariance matrix meanAndVariance.m -- Returns mean and variance for a set of unweighted samples (illustrates handling of angles) getfieldinfo.m -- gets field information minimizedAngle.m -- Normalizes an angle to [-pi, pi] endPoint.m -- Returns the location of an observation noiseFromMotion.m -- Get variance based on alphas matlab.el -- Customization file for emacsDisplay functions:
plotcircle.m -- Draws a circle plotcov2d.m -- Draws a 2-D covariance matrix plotfield.m -- Draws the field with landmarks plotmarker.m -- Draws an 'x' at a specified point (useful for drawing samples) plotrobot.m -- Draws the robot plotSamples.m -- Plots particles from the pf plotLine.m -- Plot a ray (origin, angle, length)
State : [x,y,theta]; Observation : [bearing to landmark, landmark ID]; Control : [drot1,trans,drot2];
The script generates motion information according to the odometry-based motion model (rotation first, then translation followed by another rotation). Observations are landmark detections. Each landmark has a unique ID. At each timestep, the robot starts from the current state and moves according to the control input. The robot then receives a landmark observation from the world. This information needs to be used by you to localize the robot over the whole time-sequence, by using an EKF or a PF.
In addition to implementing the required EKF and PF functionality, we will ask you to generate a writeup including several plots.
As a way to check that you have implemented the filters correctly, you can set the variable fixSeed to true. This ensures that all random steps will happen the same way on multiple runs.
On Octave, you should get the following values:
EKF:
run(200, false, 0.001, true) --> meanPositionError = 5.2527 meanMahalanobisError = 1.9864 ANEES = 0.66212 meanPOfZ = 2.1756
PF:
run(200, true, 0.001, true) --> meanPositionError = 7.1791 meanMahalanobisError = 7.5702 ANEES = 2.5234 meanPOfZ = 2.1626
On MATLAB, because the random number generator works differently, you should get the following values:
EKF:
run(200, false, 0.001, true) --> meanPositionError = 7.2436 meanMahalanobisError = 3.0394 ANEES = 1.0131 meanPOfZ = 2.1214
PF:
run(200, true, 0.001, true) --> meanPositionError = 8.2722 meanMahalanobisError = 8.2194 ANEES = 2.7398 meanPOfZ = 2.1447
Please provide a typeset writeup analyzing the performance of your filters under various conditions. The file runExperiments.m can be quite useful for generating these tables and plots. Your writeup must include the following: