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

Function _numpy

leaderboard/team_code/auto_pilot.py:56–62  ·  view source on GitHub ↗
(carla_vector, normalize=False)

Source from the content-addressed store, hash-verified

54
55
56def _numpy(carla_vector, normalize=False):
57 result = np.float32([carla_vector.x, carla_vector.y])
58
59 if normalize:
60 return result / (np.linalg.norm(result) + 1e-4)
61
62 return result
63
64
65def _location(x, y, z):

Callers 2

_is_walker_hazardMethod · 0.70
_is_vehicle_hazardMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected