Giter Site home page Giter Site logo

da-phil / sdc-unscented-kalman-filter Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 4.0 6.05 MB

Implementation of a simple 2D UKF and EKF using an CTRV kinematics model with lidar and radar measurements.

CMake 0.01% Shell 0.01% C++ 4.50% Jupyter Notebook 95.48%
ukf unscented-kalman-filter bayesian localization state-estimation extended-kalman-filter ekf

sdc-unscented-kalman-filter's Introduction

Unscented Kalman Filter Project Starter Code

Self-Driving Car Engineer Nanodegree Program

In this project utilize an Unscented Kalman Filter to estimate the state of a moving object of interest with noisy lidar and radar measurements. Passing the project requires obtaining RMSE values that are lower that the tolerance outlined in the project rubric.

Installation / Requirements

This project can be either used with *.csv text files or with a visualization in a simulator which can be downloaded here.

This repository includes two files that can be used to set up and intall uWebSocketIO for either Linux or Mac systems. For windows you can use either Docker, VMware, or even Windows 10 Bash on Ubuntu to install uWebSocketIO. Please see this concept in the classroom for the required version and installation scripts.

Other Important Dependencies

Basic Build Instructions

  1. Clone this repo.
  2. Make a build directory: mkdir build && cd build
  3. Compile: cmake .. && make
  4. Run it: ./UnscentedKF Previous versions use i/o from text files. The current state uses i/o from the simulator.

Running the program

Program documentation

Help:
  --verbose        <0|1>:    Turn on verbose output, default: 0
  --use_laser      <0|1>:    Turn on or off laser measurements, default: 1
  --use_radar      <0|1>:    Turn on or off radar measurements, default: 1
  --std_a          <num>:    Standard deviation for linear acceleration noise, default: 0.5
  --std_yawdd      <num>:    Standard deviation for angular acceleration noise, default: 0.2
  --use_simulator  <0|1>:    Use simulator for input and output or instead an input output csv file, default: 1
  --input_file     <path>:   Path to input csv file (only possible when simulator mode is not set), default: ../data/obj_pose-laser-radar-synthetic-input.txt
  --output_file    <path>:   Path to output csv file (only possible when simulator mode is not set), default: ../data/obj_pose-fused-output.txt
  --help:                    Show help

The program supports two modes: simulator backend (--use_simulator=1) and data files as in- and output (--use_simulator=0)

Simulator mode

When using the simulator mode the unity based udacity simulator mentioned above has to be started and the first menu option selected. Then the UKF can be started by invoking:

./UnscentedKF --use_simulator=1

Data file mode

Start the program using udacity provided data/obj_pose-laser-radar-synthetic-input.txt file as input and storing the filtered states, rmse and ground truth for evaluation and visualization in data/obj_pose-fused-output-all.txt:

./UnscentedKF --use_simulator=0 --input_file=../data/obj_pose-laser-radar-synthetic-input.txt --output_file=../data/obj_pose-fused-output-all.txt

Using the same input and output files but deactivating the laser scanner and only using the radar data for filtering (can't be called sensor fusion anymore, I guess):

./UnscentedKF --use_simulator=0 --use_laser=0 --input_file=../data/obj_pose-laser-radar-synthetic-input.txt --output_file=../data/obj_pose-fused-output-all.txt

Results

The following plot shows how the UFK filter compares using data from both lidar and radar sensor and having ony either as input.

As cartesian positions are directly observable by the lidar sensor the accuracy is pretty good. It will be more interesting to see how well the filter performes at predicting hidden states such as cartesian velocities. In the following plot we look at how well cartesian velocities are being predicted, just in the same manner as above, one plot is with both sensor inputs and in the other plots only either sensor being used.

In this plot we see the RMSE in cartesian position and velocity over time. It's interesting to see how the error in the velocities seems to have asymptotic behaviour towards the end of the dataset.

sdc-unscented-kalman-filter's People

Contributors

andrewpaster avatar awbrown90 avatar baumanab avatar cameronwp avatar da-phil avatar domluna avatar swwelch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sdc-unscented-kalman-filter's Issues

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.