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

error with traffic light #134

Open
353xiong opened this issue Jan 8, 2025 · 0 comments
Open

error with traffic light #134

353xiong opened this issue Jan 8, 2025 · 0 comments

Comments

@353xiong
Copy link

353xiong commented Jan 8, 2025

data_collect.py
for npc in traffic_light.lights:
new_bbox = None
min_dis = 50
for light_bbox in traffic_light_bbox_nearby:
dis = compute_2d_distance(npc.get_transform().location, light_bbox.location)
if dis < min_dis:
new_bbox = light_bbox
min_dis = dis
if min_dis > 20:
continue
How can the matching of traffic light and traffic light box be based on the closest distance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant