This project implements 2 dimensional particle filter in C++ to estimate the position of a moving object of interest using map of the location, noisy GPS estimate of its initial location, and noisy sensor and control data.
This is the final project for the Localization course in Udacity's Self-Driving Car Nanodegree.
Implementation requires to match accuracy and performance values outlined in the specification.
Usage:
particle_filter [options]
Available options:
-m, --map map file
-?, --help print this help screen
In order to use provided map, one may use the following commands
cd build
./particle_filter -m ../data/map_data.txt
or
./run.sh
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, clang- 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
uWebSocketIO
== v0.13.0- Ubuntu/Debian: the repository includes
install-ubuntu.sh
that can be used to set up and installuWebSocketIO
- Mac: the repository includes
install-mac.sh
that can be used to set up and installuWebSocketIO
- Windows: use either Docker, VMware, or even Windows 10 Bash on Ubuntu
- Ubuntu/Debian: the repository includes
JSON for Modern C++
- JSON parserCatch2
- Unit-testing frameworkProgramOptions.hxx
- Single-header program options parsing library for C++11
- Clone this repo.
mkdir build
cd build
cmake .. -G "Unix Makefiles"
make
make test # -- optional
or use provided build script
- Clone this repo.
./build.sh
The project uses uWebSocketIO
request-response protocol in communicating with the simulator.
INPUT: values provided by the simulator to the c++ program
// sense noisy position data from the simulator
["sense_x"]
["sense_y"]
["sense_theta"]
// get the previous velocity and yaw rate to predict the particle's transitioned state
["previous_velocity"]
["previous_yawrate"]
// receive noisy observation data from the simulator, in a respective list of x/y values
["sense_observations_x"]
["sense_observations_y"]
OUTPUT: values provided by the c++ program to the simulator
// best particle values used for calculating the error evaluation
["best_particle_x"]
["best_particle_y"]
["best_particle_theta"]
//Optional message data used for debugging particle's sensing and associations
["best_particle_associations"] <= list of associated ID labels
["best_particle_sense_x"] <= list of sensed x positions
["best_particle_sense_y"] <= list of sensed y positions
data/map_data.txt
includes the position of landmarks (in meters) on an arbitrary Cartesian coordinate system. Each row has three columns
- x position
- y position
- landmark id