udacity / CarND-Capstone

MIT License
189 stars 1.53k forks source link

Inconsistency in traffic light locations #28

Closed dolaameng closed 7 years ago

dolaameng commented 7 years ago

Hi, it seems there is an inconsistency between

  1. the light_positions specified in sim_traffic_light_config.yaml
  2. the actual values published by rostopic echo /vehicle/traffic_lights, e.g., the first several are [x: 1172.183, y: 1186.299], [x: 1584.065, y: 1156.953], [x: 2126.353, y: 1550.636],...

It seems the actual light locations in the sim player is consistent of 1. rather than 2. This causes problems when testing directly using the ground-truth by /vehicle/traffic_lights. Please suggest.

friedricherbs commented 7 years ago

These are the light locations from the sim:

light_positions:

However, typically the FOV of the camera image is not sufficient to detect the TL in close range. So I think there are two options: 1) Leave everything as it is. In this case, the vehicle breaks at the stop line before the TL. Looks a bit strange when the TL switches to red and the vehicle still passes it because the vehicle thinks it the TL is already behind. 2) Change config coordinates. In this case, the vehicle might not be able to see the TL in close range, so it will pass anyhow. It also looks bad. Any suggestions on that?

ckirksey3 commented 7 years ago

Sorry about the confusion around this topic. The positions in the config are actually the 2D positions of the stop line for the intersection so they should not be used for finding the light in the image. I've renamed the variable in the config file (https://github.com/udacity/CarND-Capstone/pull/44) and updated the classroom documentation (https://classroom.udacity.com/nanodegrees/nd013/parts/6047fe34-d93c-4f50-8336-b70ef10cb4b2/modules/e1a23b06-329a-4684-a717-ad476f0d8dff/lessons/462c933d-9f24-42d3-8bdc-a08a5fc866e4/concepts/d58e2c6a-1fd2-4e33-8912-861051ab301b) to make this clearer