Hello,
I was wondering how do I obtain the Traffic light information which gets displayed on the screen in the simulator while it's running. The print_same_line function in client_example.py which prints these measurement doesn't have the traffic light state information printed in code as I saw.
So can you please help me out with this?
Thanks!
Hi @SoumiDas,
In the list of non-player agents we include the traffic lights and their states (on API 0.8.x). Unfortunately, it is not stated anywhere which traffic light is currently applying to you, (basically because we are still looking for an standardized way to do so), but you could try to deduce it by their distance from the player.
Thanks a lot @nsubiron !
So, how is the information of traffic light on the bottom left of the screen displayed while the simulator is running? Is it calculated in the same way as you mentioned here and the state is shown accordingly?
No, inside the simulator we have extra info that is not available in the client. There are trigger boxes that notify the vehicle when there is a traffic light.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi, @nsubiron is it possible to get the distance of the car from the next traffic light? I did not find any other function other than getting a traffic light state.
Hi,
You can get the transform/position of the next traffic light just as we got
the state.
You have the agent vehicle's transform too.
Taking these two points, you can get the distance of the traffic light!
On Thu, Nov 28, 2019, 21:15 Pranav Agarwal notifications@github.com wrote:
Hi, @nsubiron https://github.com/nsubiron is it possible to get the
distance of the car from the next traffic light? I did not find any other
function other than getting a traffic light state.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/carla-simulator/carla/issues/801?email_source=notifications&email_token=AIDCUCAEU2LTD37KTGTAW5DQV7RSVA5CNFSM4FWW5QS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFM6PBI#issuecomment-559540101,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIDCUCGX2WAJY7VCFUANTC3QV7RSVANCNFSM4FWW5QSQ
.
Most helpful comment
Hi @SoumiDas,
In the list of non-player agents we include the traffic lights and their states (on API 0.8.x). Unfortunately, it is not stated anywhere which traffic light is currently applying to you, (basically because we are still looking for an standardized way to do so), but you could try to deduce it by their distance from the player.