Git Product home page Git Product logo

carnd-extended-kalman-filter-p5's Introduction

Vehicle tracking using Extended Kalman Filter

In this project , Extended kalman filter is implemented in C++ to fuse noisy lidar and radar measurements in order to track the position and velocity of a moving vehicle of interest.

This project is done as part of the self-driving car nanodegree .


Dependencies


Files structure

Source Files are located in the src directory

main.cpp - communicates with the Term 2 Simulator receiving data measurements, calls a function to run the Kalman filter, calls a function to calculate RMSE.
FusionEKF.cpp - initializes the filter, calls the predict function, calls the update function.
kalman_filter.cpp - defines the predict function, the update function for lidar, and the update function for radar.
tools.cpp - function to calculate RMSE and the Jacobian matrix.

How the Files Relate to Each Other

Here is a brief overview of what happens when you run the code files.

Main.cpp reads in the data and sends a sensor measurement to FusionEKF.cpp.
FusionEKF.cpp takes the sensor data and initializes variables and updates variables , the Kalman filter equations are not in this file , as it has has a variable called ekf_ which is an instance of a KalmanFilter class. The ekf_ will hold the matrix and vector values and it's used to call the predict and update equations.
Kalman_filter.cpp defines The Kalman Filter class.

Here is the main protcol that main.cpp uses for uWebSocketIO in communicating with the simulator.

INPUT: values provided by the simulator to the c++ program

["sensor_measurement"] => the measurement that the simulator observed (either lidar or radar)

OUTPUT: values provided by the c++ program to the simulator

["estimate_x"] <= kalman filter estimated position x ["estimate_y"] <= kalman filter estimated position y ["rmse_x"] ["rmse_y"] ["rmse_vx"] ["rmse_vy"]


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

Results

Lidar measurements are red circles, radar measurements are blue circles with an arrow pointing in the direction of the observed angle, and estimation markers are green triangles.

The simulator provides the C++ program the measured data (either lidar or radar), and C++ program feeds back the measured estimation marker, and RMSE values from its Extended Kalman filter.

The Extended kalman filter estimations are compared to the ground truth values and how close the estimations are to ground truth values is evaluated using root mean-squared error RMSE.

Dataset 1 :

dataset1

Parameter RMSE
Px 0.0974
Py 0.0855
Vx 0.4517
Vy 0.4404

Dataset 2 :

dataset2

Parameter RMSE
Px 0.0726
Py 0.0967
Vx 0.4582
Vy 0.4971

Generating Additional Data

This is optional!

If you'd like to generate your own radar and lidar data, see the utilities repo for Matlab scripts that can generate additional data.

carnd-extended-kalman-filter-p5's People

Contributors

m0hamed-alaa avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.