Skip to content

Project 9 for the Udacity Self Driving Car Engineer Nanodegree Program. This project focuses on system integration using ROS, to drive a car autonomously in a simulator.

License

Notifications You must be signed in to change notification settings

rezarajan/sdc-capstone

Repository files navigation

Usage Guide

The project may be run natively, or through a Docker container. The recommended way to run the code is through Docker, to ensure consistency. However, in some instances running Docker may not be possible, for instance in some virtual environments. Please refer to the installation instructions for guides on how to set up the system.

For simplicity, the Docker usage guide is shown below for usage with the simulator only. To get set up, the following steps are required:

Clone the repository

Run the following command to clone the repository:

git clone https://github.com/rezarajan/sdc-capstone.git
cd sdc-capstone

Running the Code

The script to execute code depends on the system type. On constrained systems a more lightweight version of the code will run, which does not perform image classification for traffic lights. At the point of writing the online workspace is not performant enough to run inference, and bogs the system to the point where it is unusable. Otherwise, image classification will be performed.


Running Locally

  1. Build the Docker image:
docker build . -t capstone
  1. Run the Docker container
./run_container.sh

Note: The terminal should now be displaying the Docker container's environment. Continue the steps in the container's terminal.

  1. From inside the Docker container, build the project packages
catkin_make
  1. Source the environment
source devel/setup.bash
  1. Start ROS
roslaunch launch/styx.launch

Running on Constrained Systems:

  1. Build the project packages
cd ros
catkin_make
  1. Source the environment
source devel/setup.bash
  1. Start ROS
# This launch file is different, and ensures computationally intensive tasks are suppressed
roslaunch launch/styx-ws.launch

Launch the Simulator

Once roslaunch has finished, open the simulator. Once open, if working on a local system, first enable camera and then disable manual mode. If working on a constrained system in constrained mode, only disable manual mode, do NOT enable camera. The car should start navigating around the track in a loop.

Note: when running the code locally (not in constrained mode) please wait for TensorFlow to load the inference model before running the simulator. A prompt will appear stating 'Traffic Light Detection Model Loaded', after which it is safe to run the simulator.

About

Project 9 for the Udacity Self Driving Car Engineer Nanodegree Program. This project focuses on system integration using ROS, to drive a car autonomously in a simulator.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published