Traffic Light recognition


  • Vector Map
  • NDT working
  • Calibration publisher
  • Tf between camera and localizer

Traffic light recognition is splitted in two parts

  1. feat_proj finds the ROIs of the traffic signals in the current camera FOV
  2. region_tlr checks each ROI and publishes result, it also publishes /tlr_superimpose_image image with the traffic lights overlayed
    2a. region_tlr_ssd deep learning based detector.

Launch Feature Projection

roslaunch road_wizard feat_proj.launch camera_id:=/camera0

Launch HSV classifier

roslaunch road_wizard traffic_light_recognition.launch camera_id:=/camera0 image_src:=/image_XXXX

SSD Classifier

roslaunch road_wizard traffic_light_recognition_ssd.launch camera_id:=/camera0 image_src:=/image_XXXX network_definition_file:=/PATH_TO_NETWORK_DEFINITION/deploy.prototxt pretrained_model_file:=/PATH_TO_MODEL/Autoware_tlrSSD.caffemodel use_gpu:=true gpu_device_id:=0

How to install SSD Caffe for Autoware

Caffe Prerequisites

  1. sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
  2. sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
  3. sudo apt-get install libatlas-base-dev

Clone SSD fork of Caffe

  1. Go to your home directory
  2. Clone the code: git clone ssdcaffe
  3. Move inside the directory cd ssdcaffe
  4. Checkout compatible API version git checkout 5365d0dccacd18e65f10e840eab28eb65ce0cda7
  5. Create config file cp Makefile.config.example Makefile.config
  6. Start building make
  7. Once completed execute make distribute
  8. Compile Autoware, Cmake will detect SSD Caffe and compile the SSD nodes.
  9. To test, download the object detection models from: The 300 model will run faster but won’t provide good results at farther distances. In contrast, the 500 model require more computing power but will detect at lower resolutions(farther objects).
  10. In Autoware’s RTM use the [app] button next to ssd_unc in the Computing Tab. to select the correct image input src and the models path. image
  11. Launch the node and play a rosbag with image data.
  12. In Rviz add the ImageViewer Panel
  13. Select the Image topic and the Object Rect topic

How to setup Nvidia Drivers and CUDA in Ubuntu

Disabling Nouveau, if required (login loop or low res mode), otherwise skip to next section

  1. Confirm nouveau is loaded

lsmod | grep -i nouveau

You’ll see the text nouveau in the 4th column, if loaded

video XXXX Y nouveau

  1. If nouveau is loaded then blacklist it. Create the file blacklist-nouveau.conf in /etc/modprobe.d/

sudo nano /etc/modprobe.d/blacklist-nouveau.conf

And add the following text

blacklist nouveau
options nouveau modeset=0
  1. Execute sudo update-initramfs -u

  2. Restart

NVIDIA Driver Setup

  1. Download the RUN file from NVidia’s website You’ll have a file named similarly to

  2. Assign execution permissions chmod +x

  3. Move to a virtual console pressing Ctrl+Alt+F1 and login

  4. Terminate the X Server executing sudo service lightdm stop

  5. Run the installer sudo ./ (If you are running on a laptop run instead sudo ./ --no-opengl-files)

  6. Follow the instruction from the wizard. At the end, do not allow the wizard to modify the X configuration.

  7. Once back in the console, execute sudo service lightdm start. The GUI should be displayed. Login.

  8. To confirm everything is set run in a terminal nvidia-smi

CUDA Setup

  1. Download the CUDA Installation RUN File from You’ll have a file named similarly to

  2. Assign execution permissions chmod +x

  3. Run the installer sudo ./

  4. Follow the instructions on screen. DO NOT install the NVIDIA Driver included. Install the CUDA Samples on your home directory.

  5. Once finished, to confirm everything is ok. Go to your home directory and execute cd NVIDIA_CUDA-X.Y_Samples/1_Utilities/deviceQuery Match X, Y to your CUDA version. i.e. CUDA 9.0 cd NVIDIA_CUDA-9.0_Samples/1_Utilities/deviceQuery

  6. Compile the sample running make

  7. Run the sample ./deviceQuery you should see the details about your GPU(s) and CUDA Setup.