Self-Driving Car Engineer Nanodegree Program
In this project I utilize a kalman filter to estimate the state of a moving object of interest with noisy lidar and radar measurements. You can find the project code in src folder.
Here is the video of how my my code work in the simulator: (Lidar measurements are red circles, radar measurements are blue circles with an arrow pointing in the direction of the observed angle, and estimation markers are green triangles.)
This project involves the Term 2 Simulator which can be downloaded here.
For windows you can use either Docker, VMware, or even Windows 10 Bash on Ubuntu to install uWebSocketIO.
Here's steps for Ubuntu BASH:
- Follow this step by step guide for setting up the utility.
- After setting up Ubuntu BASH, open Ubuntu Bash, and run the following commands inside the Linux Bash Shell:
sudo apt-get update
sudo apt-get install git
sudo apt-get install cmake
sudo apt-get install openssl
sudo apt-get install libssl-dev
sudo apt install zlib1g-dev
git clone https://github.com/hankkkwu/SDCND-P5-Extended_Kalman_Filters.git
sudo rm /usr/lib/libuWS.so
- navigate to SDCND-P5-Extended_Kalman_Filters
./install-ubuntu.sh
- at the top level of the project repository
mkdir build && cd build
- from /build
cmake .. && make
- Launch the simulator from Windows and execute
./ExtendedKF
for the project. If you see this messageListening to port 4567
Connected!!!
, it is working!!
-
Trouble Shooting
- .sh files not recognized on run: Try
chmod a+x <filename.sh>
for examplechmod a+x install-ubuntu.sh
- .sh files not recognized on run: Try
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.
From the project repository directory run the script: install-mac.sh
Some users report needing to use cmakepatch.txt
which is automatically referenced and is also located in the project repository directory.
-
Trouble Shooting
-
.sh files not recognized on run: Try chmod a+x <filename.sh> for example chmod a+x install-mac.sh
-
missing openssl, libuv, or cmake: install-mac.sh contains the line
brew install openssl libuv cmake
, which will not execute properly ifhomebrew
is not installed. To determine ifhomebrew
is installed, executewhich brew
in a terminal. If a path returns it is installed, otherwise you seebrew not found
. Follow the guidance here to install homebrew, then try running install-mac.sh again.
-
- 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
Once the install for uWebSocketIO is complete, the main program can be built and run by doing the following from the project top directory.
- Clone this repo.
- Make a build directory:
mkdir build && cd build
- Compile:
cmake .. && make
- Run it:
./ExtendedKF
Here is the main protocol that main.cpp uses for uWebSocketIO in communicating with the simulator.
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"]
This is optional!
If you'd like to generate your own radar and lidar data, see the utilities repo for Matlab scripts that can generate additional data.
-
Students have reported rapid expansion of log files when using the term 2 simulator. This appears to be associated with not being connected to uWebSockets. If this does occur, please make sure you are conneted to uWebSockets. The following workaround may also be effective at preventing large log files.
- create an empty log file
- remove write permissions so that the simulator can't write to log