Skip to content

🏎️ Unscented Kalman Filter (UKF) Localization Project using C++ and Eigen library for the Self-Driving Car Nanodegree at Udacity

License

Notifications You must be signed in to change notification settings

Danziger/CarND-T2-P2-Unscented-Kalman-Filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CarND · T2 · P2 · Unscented Kalman Filter (UKF) Project

Udacity - Self-Driving Car NanoDegree

Unscented Kalman Filter visualization on the simulator.

Project Overview

In this project utilize an Unscented Kalman Filter (UKF) 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: px = 0.09, py = 0.10, vx = 0.40, vy = 0.30, which are obviously lower than those required in the previous project: px = 0.11, py = 0.11, vx = 0.52, vy = 0.52.

To test it, Term 2 Simulator need to be used. The latest version of main.cpp used to run this project without the simulator can be found here.

If you are looking for Udacity's started code project, you can find it here.

Dependencies

Installation

This repository includes two files that can be used to set up and intall uWebSocketIO:

For Windows, Docker or VMware coulso also be used as explained in the course lectures. Details about enviroment setup can also be found there.

If you install from source, checkout to commit e94b6e1, as some function signatures have changed in v0.14.x:

git clone https://github.com/uWebSockets/uWebSockets
cd uWebSockets
git checkout e94b6e1

See this PR for more details.

Build & Run

Once the install is complete, the main program can be built and run by doing the following from the project top directory:

  1. Create a build directory and navigate to it: mkdir build && cd build
  2. Compile the project: cmake .. && make
  3. Run it: ./UKF

Or, all together (from inside the build directory): clear && cmake .. && make && ./UKF

Tips for setting up your environment can be found here.

Relevant Changes

TODO

Data Flow

TODO

Results

TODO

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.

Generating Additional Data

If you'd like to generate your own radar and lidar data, see the utilities repo for Matlab scripts that can generate additional data.

Interesting Resources


Note that the programs that need to be written to accomplish the project are src/ukf.cpp, src/ukf.h, tools.cpp, and tools.h

The program main.cpp has already been filled out, but feel free to modify it.

Here is the main protcol that main.cpp uses for uWebSocketIO in communicating with the simulator.

INPUT: values provided by the simulator to the c++ program

["sensor_measurement"] => the measurment that the simulator observed (either lidar or radar)

OUTPUT: values provided by the c++ program to the simulator

["estimate_x"] <= kalman filter estimated position x ["estimate_y"] <= kalman filter estimated position y ["rmse_x"] ["rmse_y"] ["rmse_vx"] ["rmse_vy"]

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.

Releases

No releases published

Packages

No packages published

Languages