MCPcopy Index your code
hub / github.com/OpenDriveLab/DriveAdapter / distance

Method distance

scenario_runner/no_rendering_mode.py:997–997  ·  view source on GitHub ↗
(v)

Source from the content-addressed store, hash-verified

995 vehicle_list = [x[0] for x in vehicles if x[0].id != self.hero_actor.id]
996
997 def distance(v): return location.distance(v.get_location())
998 for n, vehicle in enumerate(sorted(vehicle_list, key=distance)):
999 if n > 15:
1000 break

Callers 15

interpolate_trajectoryFunction · 0.80
mainFunction · 0.80
downsample_routeFunction · 0.80
_find_obstacle_3dbbMethod · 0.80
_find_obstacleMethod · 0.80
get_nearby_objectFunction · 0.80
_get_3d_bbsMethod · 0.80
_find_obstacle_3dbbMethod · 0.80
get_nearby_lightsFunction · 0.80
draw_traffic_lightsFunction · 0.80

Calls 1

get_locationMethod · 0.80

Tested by

no test coverage detected