Add mju_mat2Rot.
This function extracts the 3D rotation from an arbitrary 3x3 matrix by refining the input quaternion. It is based on the paper "A robust method to extract the rotational part of deformations" by Müller, Matthias, Jan Bender, Nuttapong Chentanez, and Miles Macklin. PiperOrigin-RevId: 700006006 Change-Id: I77550993233dea9cdf68601762a3ae7ded749bdf
This commit is contained in:
committed by
Copybara-Service
parent
e9a2f055f0
commit
7e46e21ef3
@@ -59,6 +59,10 @@ MJAPI void mju_quatIntegrate(mjtNum quat[4], const mjtNum vel[3], mjtNum scale);
|
||||
// compute quaternion performing rotation from z-axis to given vector
|
||||
MJAPI void mju_quatZ2Vec(mjtNum quat[4], const mjtNum vec[3]);
|
||||
|
||||
// extract 3D rotation from an arbitrary 3x3 matrix by refining the input quaternion
|
||||
// returns the number of iterations required to converge
|
||||
MJAPI int mju_mat2Rot(mjtNum quat[4], const mjtNum mat[9]);
|
||||
|
||||
|
||||
//------------------------------ pose operations (pos, quat) ---------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user