GithubHelp home page GithubHelp logo

carla-brain's Introduction

Self Driving Car Engineer Nanodegree -- Capstone project

Codacy Badge Build Status Docker Status

This is the project repo for the final project of the Udacity Self-Driving Car Nanodegree: Programming a Real Self-Driving Car.

Team Members

This repository is maintained by the following:

Workflow

Please see wiki for complete description.

Installation

We use ROS Kinetic on Ubuntu 16.04

Native Install

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.

Docker Install

Install Docker

Build the docker container

docker build . -t kairosautomotive/carla-brain:latest

or pull the latest docker container from dockerhub

docker pull kairosautomotive/carla-brain:latest

The prefered way for using containers is to use the prebuild.

Run the docker file

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

Simulator

Download the Udacity Simulator

Build and Run in Simulator

  1. Clone the project repository
git clone https://github.com/Kairos-Automotive/carla-brain.git
  1. Install python dependencies
cd carla-brain
pip install -r requirements.txt
  1. Make and run styx
cd ros
catkin_make
source devel/setup.sh
roslaunch launch/styx.launch

If the connection of the simulator is not working as expected it is possible to lauch with the workaround described in the discussion.

roslaunch launch/styx.launch monkey_patch:=true
  1. Run the simulator

Video result on simulator run

Visualize the drive

Mac with X11 and docker

Setup

Install and start X11 (XQuartz).

brew cask install xquartz
open -a Xquartz

Set the preferences as described in docker for mac and gui. Restart Xquartz.

Setup the environment and start docker

ip=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}')
xhost + $ip
docker run -p 127.0.0.1:4567:4567 -v $PWD:/capstone -v /tmp/log:/root/.ros/ -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$ip:0 --rm -it kairosautomotive/carla-brain:latest
source devel/setup.sh
roslaunch launch/styx.launch &
rosrun waypoint_updater show_waypoints.py

Linux with X11 and docker

To use the visualizer use below commands to configure the environment:

xhost +SI:localuser:root
docker run -p 127.0.0.1:4567:4567 -v $PWD:/capstone -v /tmp/log:/root/.ros/ -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY --rm -it kairosautomotive/carla-brain:latest
source devel/setup.sh
roslaunch launch/styx.launch &
rosrun waypoint_updater show_waypoints.py

Rviz

To run rviz within the docker environment, configure it as described above. Afterwards run within the container:

source devel/setup.sh
rosrun rviz rviz &

Further documentation about rviz can be found in the user guide.

Unit tests

To run the unit tests call

source devel/setup.sh
catkin_make run_tests

Test with ROS bags from real car

  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

To disable specific topics from the bag they can either be filtered or the topics can be renamed during playback:

rosbag play -l udacity_succesful_light_detection.bag /traffic_waypoint:=/traffic_waypoint_null /final_waypoints:=/final_waypoints_null /base_waypoints:=/base_waypoints_null /vehicle/steering_cmd:=/vehicle/steering_cmd_null 
  1. Launch your project in site mode
cd carla-brain/ros
roslaunch launch/site.launch
  1. Confirm that traffic light detection works on real life images.

Video result on Udacity ROS bag

carla-brain's People

Contributors

asimonov avatar ckirksey3 avatar avrabe avatar vguerra avatar yhoazk avatar swwelch avatar carlosgalvezp avatar awbrown90 avatar spicavigo avatar ncondo avatar olala7846 avatar baumanab avatar aoinakanishi avatar bydavy avatar ianboyanzhang avatar j-rojas avatar luisandroide avatar codacy-badger avatar

Watchers

James Cloos avatar Hafizur Rahman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.