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.
- Udacity's Self Driving Car Simulator
cmake >= 3.5
make >= 4.1
(Linux / Mac),3.81
(Windows)gcc/g++ >= 5.4
(Linux / Mac),MinGW
(Windows)uWebSockets
commite94b6e1
. See the following section for installation instructions and additional details.Eigen
. This is already part of the repo so you shouldn't have to worry about it.
This repository includes two files that can be used to set up and intall uWebSocketIO:
install-mac.sh
for Mac.install-ubuntu
for either Linux or Windows 10 Bash on Ubuntu (please, make sure it is updated).
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.
Once the install is complete, the main program can be built and run by doing the following from the project top directory:
- Create a build directory and navigate to it:
mkdir build && cd build
- Compile the project:
cmake .. && make
- 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.
TODO
TODO
TODO
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.
If you'd like to generate your own radar and lidar data, see the utilities repo for Matlab scripts that can generate additional data.
-
Detailed explanations (55 videos) about Kalman Filters by Michel van Biezen @ iLectureOnline.
-
A New Method for the Nonlinear Transformation of Means and Covariances in Filters and Estimators
-
Udacity Discussion Forum - Numerical instability of the implementation
-
Udacity Discussion Forum - UKF getting stuck on second dataset
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"]
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)
Please stick to Google's C++ style guide as much as possible.