25 #ifndef INCLUDED_AbsoluteOrientationMeasurement_h_GUID_71285DD8_A6F1_47A8_4B2E_B10171C91248
26 #define INCLUDED_AbsoluteOrientationMeasurement_h_GUID_71285DD8_A6F1_47A8_4B2E_B10171C91248
48 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
54 : m_quat(quat), m_covariance(emVariance.asDiagonal()) {}
56 template <
typename State>
57 MeasurementSquareMatrix
const &getCovariance(State
const &) {
67 template <
typename State>
69 const Eigen::Quaterniond prediction = s.getCombinedQuaternion();
70 const Eigen::Quaterniond residualq = m_quat * prediction.inverse();
74 MeasurementVector residual = util::quat_exp_map(residualq).ln();
75 MeasurementVector equivResidual =
76 util::quat_exp_map(Eigen::Quaterniond(-(residualq.coeffs())))
78 return residual.squaredNorm() < equivResidual.squaredNorm()
88 return Eigen::Matrix3d::Identity();
92 Eigen::Quaterniond m_quat;
93 MeasurementSquareMatrix m_covariance;
105 using State = pose_externalized_rotation::State;
106 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
113 :
Base(quat, eulerVariance) {}
116 getJacobian(State
const &s)
const {
117 using namespace pose_externalized_rotation;
119 Jacobian ret = Jacobian::Zero();
120 ret.block<DIMENSION, 3>(0, 3) = Base::getJacobianBlock();
126 #endif // INCLUDED_AbsoluteOrientationMeasurement_h_GUID_71285DD8_A6F1_47A8_4B2E_B10171C91248
Eigen::Matrix< Scalar, n, 1 > Vector
A vector of length n.
typename detail::Dimension_impl< T >::type Dimension
Eigen::Matrix< Scalar, n, n > SquareMatrix
A square matrix, n x n.
The main namespace for all C++ elements of the framework, internal and external.
types::Matrix< DIMENSION, 3 > getJacobianBlock() const
Header wrapping include of and for warning quieting.
void setMeasurement(Eigen::Quaterniond const &quat)
Convenience method to be able to store and re-use measurements.
std::size_t DimensionType
Type for dimensions.
MeasurementVector getResidual(State const &s) const
Eigen::Matrix< Scalar, m, n > Matrix
A matrix with rows = m, cols = n.