Skip to content

jwdunn1/CarND-Extended-Kalman-Filter-Project

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Extended Kalman Filter Project

Self-Driving Car Engineer Nanodegree Program


Overview

The included source implements the extended 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).

Compilation

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

Kalman filter cmd compile

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

Kalman filter mvs compile

Results for Included Data Sets

Data set 1 RMSE: 0.0651795 0.0605726 0.544212 0.544226
Data set 2 RMSE: 0.185791 0.190311 0.474852 0.805316

Kalman filter results

Results Visualization

Data set 1 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 EKF estimate of position.

Kalman filter results visualization

2-D Unity Visualizer

Important: A modified kalman_tracker.py script is included. Usage: python kalman_tracker.py src/ExtendedKF.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 EKF 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, you may need to run: cmake .. -G "Unix Makefiles" && make
  4. Run it: ./ExtendedKF path/to/input.txt path/to/output.txt. Sample inputs can be found in 'data/'.
    • eg. ./ExtendedKF ../data/sample-laser-radar-measurement-data-1.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.

About

Self-Driving Car Nanodegree: Extended Kalman Filter Project

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 98.3%
  • C 1.4%
  • Other 0.3%