No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data
imgs
ros
.gitignore
Dockerfile
README.md
requirements.txt

README.md

Udacity Self-Driving Car Nanodegree Capstone Project

Introduction

The objective of this project is to implement the core set of functionalities that would allow an autonomous vehicle drive arround a track with obstacles. These include a path planning system, a control system to manage the signals sent to the actuators on the car and a detection and classification system to identify obstacles (in this case traffic light status).

Implemented by:

Jordi Tudela Alcacer

Systems

Waypoint Updater

The Waypoint updater checks what are the desired speeds and the positions for the next positions the car should reach. If the car is about to reach a traffic light, it checks if it must stop and when the car gets within a reasonable distance from the crossroad, it applies a linear deceleration.

Twist Control

Implemented a PID control to try to smooth the changes of velocity and direction. Implemented a reset policy for the filter to avoid undesired unstable behaviours of the error's value.

Traffic Light Detector & Classifier

For the task of detecting and classifying the state of traffic lights, I have implemented a fast-rcnn network with (a reduced) 50 regions and also limiting the output to 4 classes (Green, Yellow, Red, Off). I started with a pretrained model from the Tensorflow detection model zoo trained on the COCO dataset.

To train the model, I initially chose the Bosch Small Traffic Lights Dataset because it is an accessible, reasonably extensive dataset but, not having access to a cuda capable computer and having to train it using Google ML-engine, it seemed apparent that this was not the most resource-efficient strategy. In the end, I opted to train the model with a mixture of images both from the real world and also taken from the simulator.


This is the project repo for the final project of the Udacity Self-Driving Car Nanodegree: Programming a Real Self-Driving Car. For more information about the project, see the project introduction here.

Native Installation

  • Be sure that your workstation is running Ubuntu 16.04 Xenial Xerus or Ubuntu 14.04 Trusty Tahir. Ubuntu downloads can be found here.

  • If using a Virtual Machine to install Ubuntu, use the following configuration as minimum:

    • 2 CPU
    • 2 GB system memory
    • 25 GB of free hard drive space

    The Udacity provided virtual machine has ROS and Dataspeed DBW already installed, so you can skip the next two steps if you are using this.

  • Follow these instructions to install ROS

  • Download the Udacity Simulator.

Docker Installation

Install Docker

Build the docker container

docker build . -t capstone

Run the docker file

docker run -p 4567:4567 -v $PWD:/capstone -v /tmp/log:/root/.ros/ --rm -it capstone

Usage

  1. Clone the project repository
git clone https://github.com/udacity/CarND-Capstone.git
  1. Install python dependencies
cd CarND-Capstone
pip install -r requirements.txt
  1. Make and run styx
cd ros
catkin_make
source devel/setup.sh
roslaunch launch/styx.launch
  1. Run the simulator

Real world testing

  1. Download training bag that was recorded on the Udacity self-driving car (a bag demonstraing the correct predictions in autonomous mode can be found here)
  2. Unzip the file
unzip traffic_light_bag_files.zip
  1. Play the bag file
rosbag play -l traffic_light_bag_files/loop_with_traffic_light.bag
  1. Launch your project in site mode
cd CarND-Capstone/ros
roslaunch launch/site.launch
  1. Confirm that traffic light detection works on real life images