Assigned: Thu, Nov 13.
Part I due: Wed, Nov 26, 11:59pm.
Part II due: Fri, Dec 5, 11:59pm.
Your task is to implement a particle filter that estimates the location, lane, and velocity of the slot car based on the camera images. To do so, you need to implement the prediction, importance sampling, and re-sampling steps of the particle filter. The prediction step should use the current velocity of each particle, sample a new velocity for this particle from a Gaussian distribution, and place the particle at the corresponding location on the track. Additionally, particles can randomly switch lanes if they move through the corresponding area. For each particle, you should then compute the distance to the blob extracted from the camera and weigh the particle according to a Gaussian likelihood model. Finally, re-sample the set of particles based on the normalized weights.
Please send Athan your results per email by Wed, Nov 25. Your results should contain a video sequence that shows the sample set distributions during a localization run and the mean location and mean velocity of the particles.
Here is a suggestion for which sensor model should work. For each particle that moves along the track, you can compute the change in heading the car should measure based on the shape of the track. You can get this change via the function "getTrackAngle" in the provided java code. Just like for the camera image, this angle can be compared to the measured angle via a Gaussian likelihood model.
Since this sensor model does not provide highly concentrated locations, you still need to extract a good estimate for where the robot actually is. The simplest idea would be to take the sample that has the highest weight before re-sampling. The problem of this approach is that the best estimate "jumps" aribtrarily between iterations. Thus, we want you to implement a more robust estimate based on a mixture of Gaussians approximation (for more background, see Section 20.3 in the AIMA book). The best guess for the car location can now be the mean of the Gaussian with the highest weight.
Read the printout I brought to class
Read Section 25.3 in Russell & Norvig.