Self-Driving Car Engineer Nanodegree Program (Udacity Starter Code)
In this project we utilize a 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 than the tolerance outlined in the project rubric.
This project involves the Term 2 Simulator which can be downloaded here.
This repository includes two files that can be used to set up and install 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 the uWebSocketIO Starter Guide page in the classroom within the EKF Project lesson for the required version and installation scripts.
Once the install for uWebSocketIO is complete, the main program can be built and run by doing the following from the project top directory.
- mkdir build
- cd build
- cmake ..
- make
- ./ExtendedKF
INPUT: values provided by the simulator to the c++ program
["sensor_measurement"] => the measurement 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"]
- cmake >= 3.5
- All OSes: click here for installation instructions
- make >= 4.1 (Linux, Mac), 3.81 (Windows)
- Linux: make is installed by default on most Linux distros
- Mac: install Xcode command line tools to get make
- Windows: Click here for installation instructions
- gcc/g++ >= 5.4
- Linux: gcc / g++ is installed by default on most Linux distros
- Mac: same deal as make - install Xcode command line tools
- Windows: recommend using MinGW
- Clone this repo.
- Make a build directory:
mkdir build && cd build
- Compile:
cmake .. && make
- On windows, you may need to run:
cmake .. -G "Unix Makefiles" && make
- On windows, you may need to run:
- Run it:
./ExtendedKF
The instructions are from here.
- Download the (.deb) package of Unity (3D) version 5.5.1f1 that the Udacity Simulator uses.
- Install dependencies :
sudo apt install gconf-service lib32gcc1 lib32stdc++6 libc6-i386 libgconf-2-4 npm
- Run the install :
sudo dpkg -i ~/Downloads/unity-editor_amd64-5.5.1xf1Linux.deb
- If you get error about unmet dependencies you may need to run, and retry
sudo apt --fix-broken install
- With Unity working now, download and run the latest release of the Udacity Term 2 Simulator.
I used VSCode IDE for this project. Follow the thorough instructions provided by yosoufe to setup the environment. The instructions cover debugging as well which maybe useful.
I ran the simulation four times:
- Dataset1, using lidar and radar
- Dataset1, using lidar only
- Dataset1, using radar only
- Dataset2, using lidar and radar
The output files and plotting script are in the ./output_files folder.
The conde works well, with RMSE = [0.0964425, 0.0852905, 0.415426, 0.431636]. Check output file.
The simulator output is shown below :
Position | RMSE |
---|---|
The predictions are slightly worse, with RMSE = [0.146952, 0.115285, 0.609732, 0.537763]. Check output file.
The simulator output is shown below :
Position | RMSE |
---|---|
The predictions are the worst of the three options, with RMSE = [0.22789, 0.346044, 0.572788, 0.796972]. Check output file.
The simulator output is shown below :
Position | RMSE |
---|---|
The predictions for dataset2 are about as good as those for datase1 while using lidar and radar measurements, with RMSE = [0.0725678, 0.0964738, 0.421634, 0.493199]. Check output file.
The simulator output is shown below :
Position | RMSE |
---|---|