def hmat_to_trans_rot(hmat): ''' Converts a 4x4 homogenous rigid transformation matrix to a translation and a quaternion rotation. ''' _scale, _shear, angles, trans, _persp = transformations.decompose_matrix(hmat) rot = transformations.quaternion_from_euler(*angles) return trans, rot
def hmat_to_trans_rot(hmat): ''' Converts a 4x4 homogenous rigid transformation matrix to a translation and a quaternion rotation. ''' _scale, _shear, angles, trans, _persp = transformations.decompose_matrix( hmat) rot = transformations.quaternion_from_euler(*angles) return trans, rot
def yaw_to_quat(yaw): return transformations.quaternion_from_euler(0, 0, yaw)