Skip to content

gregtyminski/Kidnapped-Vehicle-Project

Repository files navigation

Kidnapped Vehicle Project

This project is a part of:
Udacity - Self-Driving Car NanoDegree

Project Introduction

Your robot has been kidnapped and transported to a new location! Luckily it has a map of this location, a (noisy) GPS estimate of its initial location, and lots of (noisy) sensor and control data.

This project is about to implement a 2 dimensional particle filter in C++. This particle filter will be given a map and some initial localization information (analogous to what a GPS would provide). At each time step your filter will also get observation and control data.

Running the Code

To be able to run the project, you need the Term 2 Simulator as well as uWebSocketIO installed. Please look below.

Simulator

This project involves the Term 2 Simulator which can be downloaded here.

If you don't have the simulator yet, please follow the instructions here.

uWebSocketIO

This repository includes two files that can be used to set up and install uWebSocketIO for either Linux or Mac systems. These files are:

For windows you can use either Docker, VMware, or even Windows 10 Bash on Ubuntu to install uWebSocketIO.

Building the code

Once the install for uWebSocketIO is complete, the main program can be built and ran by doing the following from the project top directory:

  1. ./clean.sh
  2. ./build.sh
  3. ./run.sh

Tips for setting up your environment can be found here

Results

After running program with the 100 particles defined in particle_filter.cpp ...

void ParticleFilter::init(double x, double y, double theta, double std[]) {
    num_particles = 100;  // the number of particles
    ...

... there are following results:

  • x-error = 0.113
  • y-error = 0.107
  • yaw = 0.004
  • running time = 48.86 seconds

results in Udacity environment