Skip to content
Snippets Groups Projects
Commit cae88cf7 authored by Dinesh Atchuthan's avatar Dinesh Atchuthan
Browse files

quaternion error using minus_left

parent b0a5723f
No related branches found
No related tags found
1 merge request!149Constraint abs
...@@ -59,16 +59,12 @@ inline bool ConstraintQuaternionAbsolute::operator ()(const T* const _o, T* _res ...@@ -59,16 +59,12 @@ inline bool ConstraintQuaternionAbsolute::operator ()(const T* const _o, T* _res
* q2 = exp(diff) * q1 ==> exp on the left means global. * q2 = exp(diff) * q1 ==> exp on the left means global.
* *
* In rotations.h, we have * In rotations.h, we have
* minus(q1,q2) = log_q(q1.conjugate() * q2); --> this is a local 'minus' * minus(q1,q2) = minus_right(q1,q2) = log_q(q1.conjugate() * q2); --> this is a local 'minus'
* But we could use this function to make a global 'minus' : * minus_left(q1,q2) = log_q(q2.conjugate() * q1); --> this is a global 'minus'
* minus(q2.conjugate(),q1.conjugate()) = log_q(q2 * q1.conjugate());
*
* Other option : define plus_left(), plus_right(), minus_left() and minus_right(),
* as we defined Jac_SO3_left() and Jac_SO3_right() in rotations.h.
*/ */
Eigen::Matrix<T, 3, 1> er; Eigen::Matrix<T, 3, 1> er;
er = log_q( q2.cast<T>() * q1.conjugate() ); er = minus_left( q1, q2.cast<T>() );
// residual // residual
Eigen::Map<Eigen::Matrix<T, 3, 1>> res(_residuals); Eigen::Map<Eigen::Matrix<T, 3, 1>> res(_residuals);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment