# Instructions to get traffic light detection working

Hi everyone, I'm using Autoware (version 1.12.0) with LGSVL (version 2020.01) on Ubuntu 16.04. I'm doing a set of tests to assure that I can stimulate the main functionalities of autoware, testing on the BorregasAve map (from LGSVL), downloaded from the lgsvl/autoware-data github (commit 05658fee453454af1f9290e0a0f76d4f19d1bb89)

Right now, I'm trying to make the traffic light detection work, but with no success so far. In fact, I'm not really aware of how does the traffic light works, or how should I set it up. By looking on available .launch files, I understood that I need to launch both:

  <!-- traffic light recognition -->
<!-- feat_proj -->
<include file="$(find trafficlight_recognizer)/launch/feat_proj.launch" /> <!-- region_tlr --> <include file="$(find trafficlight_recognizer)/launch/traffic_light_recognition.launch">
<arg name="light_src" value="/traffic_signal_info" />
</include>


Which is within the my_detection.launch file I'm using. I thought with that we should start the appropriate modules for traffic light recognition. However, it (apparently) does not. Camera data from LGSVL seems to be working properly, as I could set up the object detection with SSD.

As you can see in the image above, there is a traffic light in sight, but none is detected with the TrafficLightPlugin (RViz panel), neither tlr_result (or any other tlr topic) contains updated messages. Even though I manually drive the car nearer to the traffic light, there is still no detection. Was that expected?

I went to the node page after the README file, but there is only an explanation on using feat_proj_lanelet2 (which does not exist in my Autoware project, perhaps because it is version 1.12.0).

Given that, I'd like to kindly ask you where can I find some sort of tutorial on setting up the traffic light detection. I know that there is also some detection based on neural networks, which is nice, but I'd like to have the vanilla version properly working before adding more complexity to the task.

I thank you all in advance. Cheers!

edit retag close merge delete

Hello, I also met the same issue. Did you make it work?

( 2020-03-16 11:05:26 -0500 )edit

Hi! I left that aside for a while to make tracking work. During that, I found out a problem on the rosbridge and lgsvl simulator. I found a workaround for that (you can check the whole thing here https://github.com/lgsvl/simulator/is...) and when I came back to the traffic light it started working (not perfectly, sometimes it guesses the wrong light, especially if the camera is not directly pointing to the traffic light, but at least the topics are being published, and it seems to be founding it properly).

I must say to you that I'm not sure that is the solution, but I didn't change anything regarding the traffic light in the meantime. What I also discover is that ndt must be very precise for the roi to find the traffic light.

Hope it helps you.

( 2020-03-16 11:49:33 -0500 )edit

Hi @pedroexe. Did you encounter to this problem with SSD?

( 2020-05-08 04:42:16 -0500 )edit

Hi @Jock. I don't recall so. But apparently the launch file was not found. That can occur if the ssd was not correctly compiled I guess. When compilation ends, there should be a folder for ssd, with the applications and launch files, inside the "install" dir (as in the path reported in the error). Make sure you successfully build ssd before trying to run it. Cheers.

( 2020-05-08 05:53:13 -0500 )edit

@pedroexe I'm using docker. Before installing I built ssdcaffe. And still there isn't vision_ssd_detect.launch. Thanks for reply.

( 2020-05-08 08:15:53 -0500 )edit

@Jock, I'm using docker as well, and still could make it work. Recall that after building ssdcaffe you have to rebuild autoware (autoware's ssd_vision depends on ssdcaffe). Only then the node will be available.

( 2020-05-08 08:55:39 -0500 )edit

@pedroexe how can I rebuild docker?

( 2020-05-09 06:42:55 -0500 )edit

Hi @Jock, My suggestion was that you rebuild autoware (not docker), with something like \$ AUTOWARE_COMPILE_WITH_CUDA=1 colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release (remove compile_with_cuda flag if you don't want gpu code).

Also, the path where ssdcaffe is placed is important. See details here https://autoware.readthedocs.io/en/fe...

( 2020-05-09 07:02:11 -0500 )edit