Code Monkey home page Code Monkey logo

selfdrivingcar-term2-p1-extendedkalmanfilter's Introduction

Extended Kalman Filter

This Project is first project of second term of Udacity Self-Driving Car Nanodegree program. The goal is to apply Extended Kalman Filter to data from LIDAR and RADAR sensors by C++.

Content

  • scr contains source code:
    • main.cpp - loads data, calls a function to run the Kalman filter, calls a function to calculate RMSE
    • data_source.cpp - load input data into measurement and ground truth vectors
    • fusion_ekf.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 - a function to calculate RMSE and the Jacobian matrix
  • data a directory with two input files, provided by Udacity
  • result a directory with output files, log files and output charts
  • docs a directory with files formats description

Results

In order to see how sensor data impact accuracy of Kalman Filter, I run the algorithm on two data input (porvided by Udacity) with three calculations:

  1. Lidar and Radar measurements are considered
  2. Only Lidar measurements are considered
  3. Only Radar measurements are considered

Here is the RMSEs comparion of expected and above calculations:

Data 1

 RMSE px py vx vy
Threshold 0.08 0.08 0.60 0.60
Radar + Lidar 0.0655724 0.0624793 0.534247 0.54817
Lidar 0.0681865 0.0607532 0.625587 0.570902
Radar 0.10121 0.0823387 0.601316 0.581942

Radar and Lidar measurements are considered

input 1 (radar+lidar)

Only Lidar measurements are considered

input 1 (lidar)

Only Radar measurements are considered

input 1 (radar)

Data 2

 RMSE px py vx vy
Threshold 0.20 0.20 0.50 0.85
Radar + Lidar 0.185609 0.189915 0.473388 0.776187
Lidar 0.217995 0.19416 0.93745 0.800829
Radar 2.80105 2.67625 3.83749 4.39577

Radar and Lidar measurements are considered

input 2 (radar+lidar)

Only Lidar measurements are considered

input 2 (lidar)

Only Radar measurements are considered

input 2 (radar)

The results were visualized with Sensor Fusion utilities.

Lessons Learned

  • Considering both sensor data (LIDAR and RADAR) give much better accuracy. You can see in RSME table that when we are considering both sensor data, we have acceptable RMSE.
  • Lidar sensor give more accurate measurement than radar

Build Instructions

  1. Clone this repo.
  2. Make a build directory: mkdir build && cd build
  3. Compile: cmake ../src && make
    • On windows, you may need to run: cmake ../src -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/sample-laser-radar-measurement-data-1.txt output.txt true|false true|false

selfdrivingcar-term2-p1-extendedkalmanfilter's People

Contributors

alimehrpour avatar

Stargazers

 avatar

Watchers

 avatar  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.