Functor used to compute the Jacobian via AD.
More...
|
template<typename T > |
bool | operator() (const T *rotMatSerialized, T *quaternion) const |
|
Functor used to compute the Jacobian via AD.
Definition at line 43 of file test_mat2quat_jacobian.cpp.
template<typename T >
bool RotationMatrix2QuaternionManifold::operator() |
( |
const T * |
rotMatSerialized, |
|
|
T * |
quaternion |
|
) |
| const |
|
inline |
Definition at line 46 of file test_mat2quat_jacobian.cpp.
48 typename Eigen::Matrix<T, 3, 3, Eigen::ColMajor>::ConstMapType R(rotMatSerialized);
56 quaternion[0] = (R(2,1) - R(1,2)) * t;
57 quaternion[1] = (R(0,2) - R(2,0)) * t;
58 quaternion[2] = (R(1,0) - R(0,1)) * t;
69 t = sqrt(R(i,i) - R(j,j) - R(k,k) + T(1.0));
70 quaternion[i] = T(0.5) * t;
72 quaternion[j] = (R(j,i) + R(i,j)) * t;
73 quaternion[k] = (R(k,i) + R(i,k)) * t;
74 T w = (R(k,j) - R(j,k)) * t;
78 for (
int l = 0; l < 3; ++l)
79 quaternion[l] *= T(-1);
The documentation for this struct was generated from the following file: