laventura / CarND-Capstone

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Udacity CarND Capstone project

This is the project repo for the final project of the Udacity Self-Driving Car Nanodegree: Programming a Real Self-Driving Car. The goal is drive a car in simulator and in real world test ground. Car must be able to drive through pre recorded track and stop on red traffic lights. For Traffic lights detection existing SSD was trained on Bosch small traffic lights dataset. For classification simple CNN was trained on handcrafted dataset. For car controlling was used simple PID.

Team

Anton Pechenko forpost78@gmail.com
Kai Detlefsen kai.detlefsen@gmx.de
Andrew Ayers keeper63@cox.net
Muddassir Ahmed Khan muddassir.ahmed235@gmail.com
Ng Fang Kiang kiang.ng@hotmail.com

Installation

Docker

Install Docker-CE from here.

 # on Ubuntu 16.04 prefer version 17.06.0~ce-0~ubuntu instead 17.06.0~ce-1~ubuntu
 # because of the issue https://github.com/moby/moby/issues/22207
 # or docker may eat all of your disk space

 sudo apt-get install docker-ce=17.06.0~ce-0~ubuntu

 # add yourself to the docker group and relogin
 sudo usermod -a -G docker username

If you have Nvidia GPU install Nvidia-Docker from here

 # clone this repository
 git clone https://github.com/parilo/CarND-Capstone.git
 cd CarND-Capstone
 # download
 # http://parilo.ru/ssd/model.ckpt-226812.data-00000-of-00001
 # into 
 # ros/src/tl_detector/tl_ssd_detector/checkpoint/
 
 # Run and enter the docker container
 # run GPU version of the container
 nvidia-docker run -dit --name udacity-carnd-ros -v "$(pwd)":/home/ros/project --user "$(id -u)" -p 4567:4567 -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix parilo/udacity-carnd-ros-gpu:ver1 bash
 # enter the container
 nvidia-docker exec -it udacity-carnd-ros bash
 
 # run none-GPU version
 docker run -dit --name udacity-carnd-ros -v "$(pwd)":/home/ros/project --user "$(id -u)" -p 4567:4567 -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix parilo/udacity-carnd-ros-nogpu:ver1 bash
 # enter the container
 docker exec -it udacity-carnd-ros bash

 # run this on your host OS in order to be able to run GUI apps
 xhost +

 # you may safely leave the container with exit command and reenter it again

 # compile and run the code
 cd /home/ros/project/ros
 source /opt/ros/kinetic/setup.bash
 catkin_make
 source devel/setup.sh
 roslaunch launch/styx.launch
 # then run simualtor

 # remember that all your modifications of the system in the container
 # will be lost after container removed
 # all changes in /home/ros/project will be preserved

 # stop and remove docker container
 docker container stop udacity-carnd-ros
 docker container rm udacity-carnd-ros

How to build docker images

Native

  • 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.

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
source /opt/ros/kinetic/setup.bash
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_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

About


Languages

Language:Python 79.2%Language:CMake 12.1%Language:C++ 8.0%Language:Shell 0.6%