You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
In the official implementation of Carla, the API (light actor) can be used to obtain the bounding box (including the pole and the light). However, the pole is not necessary.
To get the bounding box for the light only, the world.get_level_bbs API can be used but does not provide additional information, such as the light ID. Therefore, we match the closest light using the distance as a reference.
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?
The text was updated successfully, but these errors were encountered: