Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to calculate when the red light will change, considering the traffic light cycles of the traffic light groups? #7684

Closed
seominseokt opened this issue May 22, 2024 · 2 comments
Assignees
Labels
art Requires changes/additions to art content

Comments

@seominseokt
Copy link

seominseokt commented May 22, 2024

CARLA version: 0.9.15
Platform/OS: Windows

Traffic lights operate in groups, and when one group's cycle ends, it waits at a red light until the other group's cycle finishes, resulting in a longer duration of the red light.
For example, if there are two groups (Group 1 and Group 2) and each maintains green for 10 seconds, yellow for 3 seconds, and red for 2 seconds:
When Group 1's cycle ends, Group 2's cycle begins, during which Group 1 stays on red.
Thus, Group 1's red light lasts for 2 seconds (Group 1's red) + 10 seconds (Group 2's green) + 3 seconds (Group 2's yellow) + 2 seconds (Group 1's red) = 17 seconds.

I found out that in CARLA, traffic lights stay on longer than the set time.

How to accurately calculate how much time is left until the red light changes, considering the cycles of other traffic lights within the traffic group, as shown in the example?

@seominseokt seominseokt changed the title How can I calculate exactly how many seconds it takes for a red light to change? How to calculate when the red light will change, considering the traffic light cycles of the traffic light groups? May 22, 2024
@Madecu Madecu added the art Requires changes/additions to art content label May 31, 2024
@DnDare
Copy link

DnDare commented May 31, 2024

Hi,
Please review this answer:
#6121 (comment)

@seominseokt
Copy link
Author

@DnDare Thank you for your response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
art Requires changes/additions to art content
Projects
None yet
Development

No branches or pull requests

3 participants