changing sign of z_rotation() to follow conventions of a right-handed coordinate system with yaw, pitch and roll defined as right-handed rotations about z-, y- and x-axis (http://nghiaho.com/?page_id=846, http://planning.cs.uiuc.edu/node102.html);

partly reverts pull request #200 (https://github.com/openmv/openmv/pull/200/files);
relates to discussion in openmv forum (http://forums.openmv.io/viewtopic.php?f=6&t=538);
note that rotation() is probably effected by this change (but it should not!)
This commit is contained in:
Falko Schindler 2017-12-06 09:11:52 +01:00
parent f79c6ba8d2
commit 7673aaf742

View File

@ -11943,7 +11943,7 @@ void imlib_find_apriltags(list_t *out, image_t *ptr, rectangle_t *roi, apriltag_
lnk_data.z_translation = MATD_EL(pose, 2, 3);
lnk_data.x_rotation = fast_atan2f(MATD_EL(pose, 2, 1), MATD_EL(pose, 2, 2));
lnk_data.y_rotation = fast_atan2f(-MATD_EL(pose, 2, 0), fast_sqrtf(sq(MATD_EL(pose, 2, 1)) + sq(MATD_EL(pose, 2, 2))));
lnk_data.z_rotation = -fast_atan2f(MATD_EL(pose, 1, 0), MATD_EL(pose, 0, 0));
lnk_data.z_rotation = fast_atan2f(MATD_EL(pose, 1, 0), MATD_EL(pose, 0, 0));
matd_destroy(pose);