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

Function get_loc_rot_in_global

roach/utils/transforms.py:117–124  ·  view source on GitHub ↗
(actor_list)

Source from the content-addressed store, hash-verified

115 return np.array(location), np.array(rotation), np.array(absolute_velocity)
116
117def get_loc_rot_in_global(actor_list):
118 location, rotation = [], []
119 for actor in actor_list:
120 location_in_world = actor.get_transform().location
121 location.append([location_in_world.x, location_in_world.y, location_in_world.z])
122 rotation_in_world = actor.get_transform().rotation
123 rotation.append([rotation_in_world.roll, rotation_in_world.pitch, rotation_in_world.yaw])
124 return np.array(location), np.array(rotation)
125
126def cast_angle(x):
127 # cast angle to [-180, +180)

Callers

nothing calls this directly

Calls 1

get_transformMethod · 0.80

Tested by

no test coverage detected