MCPcopy Create free account
hub / github.com/OpenDriveLab/DriveAdapter / dist

Method dist

agents/navigation/behavior_agent.py:268–268  ·  view source on GitHub ↗
(v)

Source from the content-addressed store, hash-verified

266
267 vehicle_list = self._world.get_actors().filter("*vehicle*")
268 def dist(v): return v.get_location().distance(waypoint.transform.location)
269 vehicle_list = [v for v in vehicle_list if dist(v) < 45 and v.id != self.vehicle.id]
270
271 if self.direction == RoadOption.CHANGELANELEFT:

Callers

nothing calls this directly

Calls 2

distanceMethod · 0.80
get_locationMethod · 0.80

Tested by

no test coverage detected