yubrshen / CarND-Capstone-Driving-Real-Car

Self-Driving-Car system integration to drive real car!

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.

The project is successfully delivered by the team of "Cruising-by-the-Bay" of Udacity Self-Driving-Car students.

Here are the team members:

Name email Role
Yu Shen yubrshen@gmail.com team lead
Peng Zhang zpactfc@gmail.com
Sumanth Reddy Kaliki sumanth818@gmail.com
Sahil Juneja sahiljuneja17@gmail.com
Hector Sanchez Pajares hector.spc@gmail.com

LIMITATION

When simulator is started and "Manual" unchecked before the ROS nodes are started and let to finish initialization. The message of "dbw_enabled" might be lost. Then the car would not receive /vehicle/throttle_cmd, etc. The car would not move along the track properly.

To overcome the potential problem, please start ROS nodes and let them finish initialization, then start the simulator, and then uncheck "Manual". Likewise, to drive the real car, the ROS nodes should also be started and let to initialize first then engage dbw to drive.

This ends the limitation.

Project Descriptions

The project bases on the architecture proposed by Udacity. It uses ROS as the implementation framework. The project implements the following ROS nodes:

  • waypoint_updater
  • tl_detector
  • dbw_node

It also implements a deep learning classifier to classify traffic light's colors. By learning from examples, the classifier can classify traffic light samples in both the simulated environment, and real traffic light images. Experiements shows that the classification can provide sufficient level of correctness for traffic light color classification.

Extensive experiments have shown that the system can drive a car autonomously correctly on the simulated track following the traffic light signals. Based the requirements, the car should stop at the end of the track. The system is designed, built to drive real car. Tests will be conducted to drive real car in a parking lot of Udacity.

Besides adhering to the established architecture, special care is made to pre-compute and store required distance computation, so that the real-time computation is minimized, which may improve the responsiveness, and reliability of the Self-Driving-Car system.

For more information about the project, see the project introduction here.

To review the design artifacts (design document and source code), goto Design in Literate Programming

Please use one of the two installation options, either native or docker 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 (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

About

Self-Driving-Car system integration to drive real car!


Languages

Language:HTML 50.6%Language:Python 33.8%Language:CMake 10.2%Language:C++ 5.3%Language:Shell 0.1%