Skip to content

ra9hur/SDC-P6-Extended-Kalman-Filter

Repository files navigation

Extended Kalman Filter Project

This project is about implementing Extended Kalman Filter (EKF) to locate objects (i.e. a bicycle) in real-time, using a data inputs from multiple sensors such as Laser and Radar.

This is a 3-step process-

  1. To predict position and velocity with some uncertainty. Here, we are predicting information based on current belief.
  2. Then measure position and velocity with some uncertainty using sensors.
  3. Finally, increase the certainty of our prediction by combining our prediction with the measurement information. Here belief is being updated with new information.

Simulated lidar and radar measurements are provided to detect a bicycle that travels around the vehicle. While laser sensors represent measurements in cartesian coordinate, the radar sensors represent in polar coordinate. A direct conversion of polar coordinate to cartesian coordinate gives nonlinearity and so Kalman filter is no more useful. Hence, we have to be able to linearly map from the polar coordinate to the cartesian coordinate.

EKF uses the method called first order Taylor expansion to obtain linear approximation of the polar coordinate measurements. A Jacobian matrix is used, which represents linear mapping from polar to cartesian coordinate.


Dependencies

Basic Build Instructions

  1. Clone this repo.
  2. Make a build directory: mkdir build && cd build
  3. Compile: cmake .. && make
    • On windows, you may need to run: cmake .. -G "Unix Makefiles" && make
  4. Run it: ./ExtendedKF path/to/input.txt path/to/output.txt. You can find some sample inputs in 'data/'.
    • eg. ./ExtendedKF ../data/obj_pose-laser-radar-synthetic-input.txt

Extended Kalman Filter - Visualization

ekf_visualization

About

To implement the extended Kalman filter in C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published