apriltag icon indicating copy to clipboard operation
apriltag copied to clipboard

add 3x3 rotation matrix to quaternion function

Open chobitsfan opened this issue 2 years ago • 2 comments

In https://github.com/AprilRobotics/apriltag/issues/90#issuecomment-656802651, @mkrogius suggests using doubles_mat_to_quat to get a quaternion from the matrix. However, rotation matrix in apriltag_pose_t is a 3x3 matrix and doubles_mat_to_quat expects a 4x4 matrix. It would be easier to use if we have a doubles_mat33_to_quat.

chobitsfan avatar Oct 25 '22 03:10 chobitsfan

Thank you for the patch. Where is this new function used? I cannot find references to doubles_mat_to_quat. Can you provide more details on why this new function is required?

christian-rauch avatar Oct 25 '22 19:10 christian-rauch

Hi @christian-rauch Thank you for reviewing

I cannot find references to doubles_mat_to_quat

Yes. doubles_mat_to_quat is defined but never used. But in https://github.com/AprilRobotics/apriltag/issues/90, @mkrogius suggests it can be used (with doubles_quat_to_rpy) to obtain euler angles from apriltag_pose_t. I found it is quite useful. However, rotation matrix in apriltag_pose_t is a 3x3 matrix and doubles_mat_to_quat expects a 4x4 matrix.

chobitsfan avatar Oct 26 '22 02:10 chobitsfan