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):

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:

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:

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:

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: