Git Product home page Git Product logo

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

Unscented Kalman Filter Project

Self-Driving Car Engineer Nanodegree Program


Overview

The included source implements the unscented Kalman filter in C++. The data folder contains simulated lidar and radar measurements for an object that travels in a figure eight around a sensor. The Kalman filter estimates the object's position and velocity. The metric used to measure the deviation from the ground truth is root mean square error (RMSE). The metric used to measure consistency is Normalized Innovations Squared (NIS). See: web.stanford.edu/group/arl/sites/default/files/public/publications/Robust_TRN_Framework.pdf

Compilation

The source can be compiled without error using cmake and make using mingw on the PC.

Kalman filter cmd compile

The source can be compiled without error using Microsoft Visual Studio on the PC.

Kalman filter mvs compile

The source can be compiled without error using cmake and make on the Macintoch.

Kalman filter cmd compile

Results for Included Data Set

RMSE: 0.0684014 0.0825572 0.336129 0.218017

Screenshot from PC:
Kalman filter results

Screenshot from Macintosh:
Kalman filter results

Results Visualization

The data set result is visualized using a chart in Microsoft Excel. The green line is the ground truth object location. The orange markers are lidar/radar measurements. The blue line is the UKF estimate of position.

Kalman filter results visualization

The Normalized Innovations Squared result is visualized below using a chart in Microsoft Excel. The green line is the windowed average NIS. The orange markers are single NIS values. The deshed blue line is the 95 percentile NIS threshold of 7.8.

Kalman filter results visualization

2-D Unity Visualizer

Important: A modified kalman_tracker.py script is included. Usage: python kalman_tracker.py src/UnscentedKF.exe

To optimize the Kalman filter program for real-time use with the Unity Visualizer, the Python script adds a flag to the internal command line (subprocess). This instructs the filter program to utilize only the last 10 items of the input file. The RMSE reports in the Visualizer therefore correspond to the 10 most recent measurements.


1 of 3: Below is the fused result of a run with Lidar and Radar enabled. The green markers indicate the UKF estimate of position:
Unity visualization LR


2 of 3: Below is the result with only Radar enabled:
Unity visualization R


3 of 3: Below is the result with only Lidar enabled:
Unity visualization L

Dependencies

Basic Build Instructions

  1. Clone this repo.
  2. Make a build directory: mkdir build && cd build
  3. Compile: cmake .. && make
    • On windows: cmake .. -G "Unix Makefiles" && make
  4. Run it: ./UnscentedKF path/to/input.txt path/to/output.txt. Sample inputs can be found in 'data/'.
    • eg. ./UnscentedKF ../data/obj_pose-laser-radar-synthetic-input.txt output.txt

A debug version can be made using: cmake -DCMAKE_BUILD_TYPE=Debug .. && make

Code Style

Conforms to Google's C++ style guide.

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

Contributors

andrewpaster avatar cameronwp avatar jwdunn1 avatar

Watchers

 avatar  avatar  avatar

Forkers

germal

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.