2sbsbsb / CarND-Capstone

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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. We are submitting this project as a team effort. Here is the team composition.

Team Name: teamCarla

Num Name Email Role
1 Jan Rosicky janrosicky@centrum.cz Member
2 Komuraiah Poodari poodari@yahoo.com Member
3 Rakesh Chittineni rakeshch.net@gmail.com Member
4 Santosh Bhushan 2sbsbsb@gmail.com Leader

System Architecture

This project is based on the architecture framework provided by Udacity as per the following system architecture diagram.

alt text

source: Udacity Project Lesson section 4.

Perception Subsystem

We implemented traffic light detection by processing the camera image on need basis. For example processig image with minimum time gap (few milliseconds) and only when the traffic light ahead is few hundred waypoints ahead of current car position. The objective is to optimize the processing on the platform.

We used closest distance measure between car waypoint and traffic light waypoint to identify the closest light ahead of the car. We used a pre-trained convolutional neural network model for inferencing the traffic light classification. We used two models, one each for site inferencing and simulator inferencing.

Planning Subsystem

Planning system has two nodes, viz., waypoint loader and waypoint updater nodes.
The node waypoint loader loads the complete set of traffic waypoints for the entire track. The node waypoint updates updates next set of waypoints ahead of the car. We used only 50 look ahead waypoints to optimize processing. We implemented to have the car stopped 2 waypoints ahead of the traffic light waypoint ahead, the signal warrants a stop.

Control Subsystem

This module contains the following nodes. The node, DBW (Drive By Wire) computes control inputs for actuators, throttle, brake and steering angle based on the desired velocities. We implemented the main control logic in twist_controller.py using low pass filter, yaw_controller and PID cotroller given in the project. We had to play with various parameters.

Reflection

We had to spend good amount of bandwidth on making environment setup stable, as there are quite a few options and the project needs high-end platform with GPU. We look forward to running our implementation on real car, Carla and get feedback.

The rest of the sections are unmodified sections came with the project baseline.

Please use one of the two installation options, either native or docker installation. As a team some of us used native installation, some of us used docker based installation.

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

  • Dataspeed DBW

  • 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

Port Forwarding

To set up port forwarding, please refer to the instructions from term 2

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.
  2. Unzip the file
unzip traffic_light_bag_file.zip
  1. Play the bag file
rosbag play -l traffic_light_bag_file/traffic_light_training.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

About

License:MIT License


Languages

Language:CMake 38.3%Language:Python 35.4%Language:C++ 25.2%Language:Dockerfile 0.9%Language:Shell 0.3%