1 #ifndef TAG_MEASUREMENTS_H
2 #define TAG_MEASUREMENTS_H
17 template <
class State>
23 TooN::Matrix<M_DIMENSION,State::STATE_DIMENSION>
jacobian;
29 jacobian.template slice<0,0,6,6>() = TooN::Identity;
53 template <
class State>
59 TooN::Matrix<M_DIMENSION,State::STATE_DIMENSION>
jacobian;
65 jacobian.template slice<0,0,6,6>() = TooN::Identity;
73 TooN::Matrix<M_DIMENSION> localCovariance =
covariance;
74 state.pose.adjoint(localCovariance);
75 return localCovariance;
78 const TooN::Vector<M_DIMENSION>
getInnovation(
const State & state )
const {
86 template <
class State>
93 TooN::Matrix<M_DIMENSION,State::STATE_DIMENSION>
jacobian;
99 jacobian.template slice<0,0,3,3>() = TooN::Identity;
107 TooN::Matrix<2 * M_DIMENSION> localCovariance = TooN::Zeros;
108 localCovariance.template slice<0,0,3,3>() =
covariance;
109 state.pose.adjoint(localCovariance);
110 return localCovariance.template slice<0,0,3,3>();
113 const TooN::Vector<M_DIMENSION>
getInnovation(
const State & state )
const {
133 template <
class State>
141 TooN::Matrix<M_DIMENSION,State::STATE_DIMENSION>
jacobian;
148 jacobian.template slice<0,9,3,3>() = TooN::Identity;
162 return (-
gyro - state.angularVelocity);
173 template <
class State>
191 TooN::Matrix<M_DIMENSION,State::STATE_DIMENSION> result = TooN::Zeros;
193 TooN::Vector<M_DIMENSION> local = state.pose.get_rotation() *
reference;
194 result.template slice<0,3,3,1>() = TooN::SO3<>::generator_field(0, local ).as_col();
195 result.template slice<0,4,3,1>() = TooN::SO3<>::generator_field(1, local ).as_col();
196 result.template slice<0,5,3,1>() = TooN::SO3<>::generator_field(2, local ).as_col();