Git Product home page Git Product logo

laventura / unscented_kalmanfilter Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 2.0 1.47 MB

Unscented Kalman Filter (in C++) for Self-Driving Car (AV) Project. Using Sensor Fusion, combines noisy data from Radar and LIDAR sensors on a self-driving car to predict a smooth position for seen objects.

CMake 0.21% C++ 88.95% C 1.26% Jupyter Notebook 9.58%
kalman-filter unscented-kalman-filter self-driving-car udacity c-plus-plus sensor-fusion lidar radar autonomous-vehicles

unscented_kalmanfilter's Introduction

Unscented Kalman Filter Project

Self-Driving Car Engineer Nanodegree Program

  • Atul Acharya

Results

The Unscented Kalman Filter (UKF) is an extension of the regular Extended Kalman Filter (EKF). The UKF allows for non-linear models (unlike the EKF, which assumes a constant velocity model). UKF allows for:

  • constant turn rate and velocity (CTRV)
  • constant turn rate and acceleration (CTRA)
  • constant steering angle and veloticy (CSAV)
  • constant curvature and acceleration (CCA)

This project assumes the CTRV motion model on given datasets. To deal with non-linear models, UKF works via unscented transformations. In the Predict phase, it begins by generating Sigma points, augments them, and then predicts the mean state vector and process covariance matrices. In the Update phase, the sigma points are transformed into measurement space, and then the updates are applied based on sensor (Radar/Lidar) measurements to get the new values for state vector and process covariance matrix.

Results of the UKF project are shown below.

UKF prediction

The UKF parameters are also shown, along with the resulting RMSE values for each dataset. The UKF parameters are chosen to optimize the RMSE within the required ranges.

  • on dataset1, the RMSE values of [px, py, vx, vy] values are within the required range of [0.09, 0.09, 0.65, 0.65]

  • on dataset2, the RMSE values of [px, py, vx, vy] values are within the required range of [0.20, 0.20, 0.55, 0.55]

The chart below shows the NIS visualization.

NIS results


Dependencies

  • cmake >= v3.5
  • make >= v4.1
  • gcc/g++ >= v5.4

Basic Build Instructions

  1. Clone this repo.
  2. Make a build directory: mkdir build && cd build
  3. Compile: cmake .. && make
  4. Run it: ./UnscentedKF path/to/input.txt path/to/output.txt. You can find some sample inputs in 'data/'.
    • eg. ./UnscentedKF ../data/sample-laser-radar-measurement-data-1.txt output.txt

Editor Settings

We've purposefully kept editor configuration files out of this repo in order to keep it as simple and environment agnostic as possible. However, we recommend using the following settings:

  • indent using spaces
  • set tab width to 2 spaces (keeps the matrices in source code aligned)

Code Style

Please stick to Google's C++ style guide as much as possible.

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.

Project Instructions and Rubric

This information is only accessible by people who are already enrolled in Term 2 of CarND. If you are enrolled, see the project page for instructions and the project rubric.

unscented_kalmanfilter's People

Contributors

andrewpaster avatar cameronwp avatar laventura avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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