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

Function _numpy

leaderboard/team_code/roach_ap_agent_data_collection.py:55–59  ·  view source on GitHub ↗
(carla_vector, normalize=False)

Source from the content-addressed store, hash-verified

53 return 'ROACHAgent'
54
55def _numpy(carla_vector, normalize=False):
56 result = np.float32([carla_vector.x, carla_vector.y])
57 if normalize:
58 return result / (np.linalg.norm(result) + 1e-4)
59 return result
60
61
62def _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