Giter Site home page Giter Site logo

darienmt / carnd-unscented-kalman-filter-p2 Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 7.0 967 KB

Udacity Self-Driving Car Nanodegree - Unscented Kalman Filter Implementation

License: MIT License

CMake 0.22% Shell 0.01% C++ 98.56% C 1.21%
c-plus-plus kalman-filter udacity unscented-kalman-filter sensor-fusion self-driving-car udacity-self-driving-car ukf

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

CarND-Unscented-Kalman-Filter-P2

Udacity Self-Driving Car Nanodegree - Unscented Kalman Filter Implementation

Overview

This project consists of implementing an Unscented Kalman Filter with C++. A simulator provided by Udacity (it could be downloaded here) generates noisy RADAR and LIDAR measurements of the position and velocity of an object, and the Unscented Kalman Filter[UKF] must fusion those measurements to predict the position of the object. The communication between the simulator and the UKF is done using WebSocket using the uWebSockets implementation on the UKF side. To get this project started, Udacity provides a seed project that could be found here.

Prerequisites

The project has the following dependencies (from Udacity's seed project):

  • cmake >= 3.5
  • make >= 4.1
  • gcc/g++ >= 5.4
  • Udacity's simulator.

For instructions on how to install these components on different operating systems, please, visit Udacity's seed project. As this particular implementation was done on Mac OS, the rest of this documentation will be focused on Mac OS. I am sorry to be that restrictive.

In order to install the necessary libraries, use the install-mac.sh.

Compiling and executing the project

These are the suggested steps:

  • Clone the repo and cd to it on a Terminal.
  • Create the build directory: mkdir build
  • cd build
  • cmake ..
  • make: This will create two executable UnscentedKF containing implementation.

Running the Filter

From the build directory, execute ./UnscentedKF. The output should be:

Listening to port 4567
Connected!!!

As you can see, the simulator connect to it right away.

The following is an image of the simulator:

Simulator without data

The simulator provides two datasets. The differences between them are:

  • The direction the car (the object) is moving.
  • The order the first measurement is sent to the UKF. On dataset 1, the LIDAR measurement is sent first. On the dataset 2, the RADAR measurement is sent first.

Here is the simulator final state after running the EKL with dataset 1:

Simulator with dataset 1

Here is the simulator final state after running the EKL with dataset 2:

Simulator with dataset 1

Rubric points

Compiling

Your code should compile.

No modifications on CMakeList.txt were done in this project. It compiles without errors or warnings.

Accuracy

For the new version of the project, there is now only one data set "obj_pose-laser-radar-synthetic-input.txt". px, py, vx, vy output coordinates must have an RMSE <= [.09, .10, .40, .30] when using the file: "obj_pose-laser-radar-synthetic-input.txt"

The UKF accuracy was:

  • Dataset 1 : RMSE = [0.0693, 0.0835, 0.3336, 0.2380]
  • Dataset 2 : RMSE = [0.0685, 0.0693, 0.5846, 0.2473]

Following the Correct Algorithm

Your Sensor Fusion algorithm follows the general processing flow as taught in the preceding lessons.

The UKF implementation could be found at src/ukf.cpp. On the ProcessMeasurement method, the Prediction is executed for the prediction step, and methods UpdateRadar and UpdateLidar are executed for the update step depending on the measurement type.

Your Kalman Filter algorithm handles the first measurements appropriately.

The first measurement is handled at ProcessMeasurement from line 103 to line 123.

Your Kalman Filter algorithm first predicts then updates.

The prediction step is implemented at Prediction method from line 144 to line 186.

Your Kalman Filter can handle radar and lidar measurements.

Different type of measurements are handled in two places in UKF class:

  • For the first measurement from line 103 to line 123.
  • For the update step from line 131 to line 136.

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

Contributors

darienmt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

carnd-unscented-kalman-filter-p2'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.