GithubHelp home page GithubHelp logo

naurislv / p7-unscented-kalman-filter-project Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 2.0 6.88 MB

Self-Driving Car Nanodegree Program Term 2 Unscented Kalman Filter second Project

CMake 0.09% C++ 39.74% C 0.56% HTML 0.01% Jupyter Notebook 59.57% Python 0.03%

p7-unscented-kalman-filter-project's Introduction

Unscented Kalman Filter Project Starter Code

Self-Driving Car Engineer Nanodegree Program

Project results:

RMSE from data/sample-laser-radar-measurement-data-1.txt and data/sample-laser-radar-measurement-data-2.txt

  • 0.0793, 0.0867, 0.603, 0.586
  • 0.172, 0.177, 0.218, 0.279

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
  5. To force using only Radar or Laser set use_laser_=false or use_radar_=false in src/ukf.cpp accordingly. And re-build project.

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.

Kalman Filter Consistency check - Normalized Innovation Parameter (NIS)

For every step we calculate measurement prediction zk+1 and covoriance matrix Sk+1 (elipse around mean value) then we receive actual measurement zk+1. We can check consistency by finding wether zk+1 measurement is in our Sk+1 eliplse or is it too close to our predicted mean.

  • If zk+1 measurement is outside elipse (Sk+1) Kalman Filter prediction is not consistent or in other words Kalman Filter underestimates uncertainty of predicted measurement. KF estimation is less precise as it should be.

  • If zk+1 measurement is inside elipse (Sk+1) Kalman Filter prediction is not consistent too,- Kalman Filter overestimate uncertainity of predicted measurement. KF estimation is more precise as it should be.

By calculating NIS we can check consistency - if zk+1 measurement and zk+1 predictions are just right.

$$\epsilon = (z_{k+1} - z_{k+1|k})^T \cdot S^{-1}{k+1|k} \cdot (z{k+1} - z_{k+1|k})$$

NIS is difference between predicted measurement and actual measurement. Normalized means that it in to relation with covariance matrix.

NIS value for RADAR must be under 7.815 for 95% of measurement and for LIDAR it must be 5.991 for 95% of measurement. This comes from Chi Squared distribution.

So if NIS values are greater than KF underestimates uncertainity in system and if NIS values are lower that means thtat KF overestimates uncertainity in system.

See resulting plots or check visualize_results.ipynb



PROJECT DESCRIPTION

The project "unscented Kalman filter" is based on the same structure as the extended Kalman filter. It uses a main file that calls a function called ProcessMeasurement. Anything important happens in this function. The function is part of the class ukf.

C++ QUIZZES

The quizzes including the solutions of them are included in the file ukf.cpp. They are individual functions, which don't need any special environment. The solution of the quizzes are given here and also the expected results. The quizzes can easily evaluated: if every value of the student solution (vectors and matrices) differs less than 0.001 from the original solution, the quizz is passed, otherwise failed.

PROJECT PASSING CRITERIA

There are several criteria that must be fulfilled to pass the project.

  • The overall processing chain (prediction, laser update or radar update depending on measurement type) must be correct.
  • The student is not allowed to use values from the future to reason about the current state.
  • It must be possible to run the project in three different modes: considering laser only, with considering radar only, or with using both sensors.
  • For every mode, the overall RMSE (2d position only) may not be more than 10% increased to what the original solution is able to reach (this number depends on the individual measurement sequence)
  • The RMSE of laser AND radar must be lower than radar only or laser only
  • The NIS of radar measurements must be between 0.35 and 7.81 in at least 80% of all radar update steps.

PROJECT GRADING

  • I recommend a hall of fame for the lowest overall RMSE using laser AND radar.
  • I recommend to ask students to improve the initialization procedure and evaluate the RMSE during the first 20 steps.

p7-unscented-kalman-filter-project's People

Contributors

naurislv avatar

Watchers

 avatar  avatar

Forkers

edmig

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.