papagina / RotationContinuity

Coder for "On the Continuity of Rotation Representations"
MIT License
328 stars 54 forks source link

get 6D rotation representation from rotation matrix or quaternion #3

Closed kaixin-bai closed 5 years ago

kaixin-bai commented 5 years ago

Thanks a lot for your work. I have a question, how to get 6D rotation representation from rotation matrix or quaternion?

kaixin-bai commented 5 years ago

just find (14)

pgrady3 commented 4 years ago

To clarify a little further, equation 14 in the supplementary says take the first two columns from the 3x3 rotation matrix. So something along these lines

def rot_to_6d(rot_matrix): return np.concatenate((rot_matrix[:, 0], rot_matrix[:, 1]))