Skip to content

Particle Filter implemented in C++ using nearest neighbor data association

Notifications You must be signed in to change notification settings

shazraz/Particle-Filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Particle Filter

1. Introduction

This project implements a Particle Filter in C++ to perform markov localization in a given map using noisy LIDAR measurements passed via a simulator. This project was completed as part of Term 2 of Udacity's Self-Driving Car Nanodegree program.

2. Project Environment

The project was built using the Ubuntu 16-04 bash shell in Windows 10. Instructions to set this up can be found here. The following dependencies need to be in place to build and execute the project.

The project consists primarily of the following files located in the src folder:

  • main.cpp: Interfaces with the simulator using uWebSocketIO to recieve measurements and transmit the location and measurement associations of the highest weighted particle.
  • particle_filter.cpp: Defines the intialization, prediction, weight update & resampling methods of the particle filter class.

Once the environment is ready, the code can be tested as follows:

  1. OPTIONAL: Modify the num_particles parameter in particle_filter.cpp
  2. OPTIONAL: cd build
  3. OPTIONAL: make
  4. Launch the simulator and select the Kidnapped Vehicle project
  5. Execute ./particle_filter from the build directory
  6. Click Start in the simulator

The simulator shows a blue vehicle navigating a map with known landmarks. The green lines define the ground truth associations between the LIDAR measurements of landmarks and the vehicle, the overlaid blue lines define the estimated associations based on the predicted LIDAR measurements of the best localized particle (i.e. particle with highest weight)

3. Results & Discussion

This particle filter implements the bicycle motion model to perform its prediction step when translating the initial particle positions followed by a nearest neighbor data association to associate each measurement with a landmark. Concretely, each measurement vector recieved by the particle filter is first transformed into map coordinates and then associated with a landmark ID provided in the given map using the minimum Euclidean distance between the predicted measurement and actual landmark coordinates. The image below shows the result once the vehicle has navigated the entire course.

About

Particle Filter implemented in C++ using nearest neighbor data association

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published