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

Function rot_global_to_ref

roach/utils/transforms.py:36–42  ·  view source on GitHub ↗
(target_rot_in_global, ref_rot_in_global)

Source from the content-addressed store, hash-verified

34
35
36def rot_global_to_ref(target_rot_in_global, ref_rot_in_global):
37 target_roll_in_ref = cast_angle(target_rot_in_global.roll - ref_rot_in_global.roll)
38 target_pitch_in_ref = cast_angle(target_rot_in_global.pitch - ref_rot_in_global.pitch)
39 target_yaw_in_ref = cast_angle(target_rot_in_global.yaw - ref_rot_in_global.yaw)
40
41 target_rot_in_ref = carla.Rotation(roll=target_roll_in_ref, pitch=target_pitch_in_ref, yaw=target_yaw_in_ref)
42 return target_rot_in_ref
43
44def rot_ref_to_global(target_rot_in_ref, ref_rot_in_global):
45 target_roll_in_global = cast_angle(target_rot_in_ref.roll + ref_rot_in_global.roll)

Callers 1

get_loc_rot_vel_in_evFunction · 0.85

Calls 1

cast_angleFunction · 0.85

Tested by

no test coverage detected