25 #include <boost/bind.hpp> 29 static const double kDt = 0.1;
32 return TangentPreintegration::UpdatePreintegrated(a, w,
kDt, zeta);
37 static boost::shared_ptr<PreintegrationParams>
Params() {
38 auto p = PreintegrationParams::MakeSharedD(
kGravity);
41 p->integrationCovariance = 0.0001 * I_3x3;
49 const Vector3 acc(0.1, 0.2, 10), omega(0.1, 0.2, 0.3);
63 const Vector3 acc(0.1, 0.2, 10), omega(0.1, 0.2, 0.3);
65 zeta << 0.01, 0.02, 0.03, 100, 200, 300, 10, 5, 3;
79 boost::function<Vector9(const Vector3&, const Vector3&)> preintegrated =
108 boost::bind(&TangentPreintegration::computeError, pim, _1, _2, _3,
109 boost::none, boost::none, boost::none);
122 boost::function<Vector9(const Vector9&, const Vector9&)>
f =
123 [pim](
const Vector9& zeta01,
const Vector9& zeta12) {
124 return TangentPreintegration::Compose(zeta01, zeta12, pim.
deltaTij());
138 const Vector9 actual_zeta =
139 TangentPreintegration::Compose(zeta, zeta, pim.
deltaTij());
static const Eigen::MatrixBase< Vector3 >::ConstantReturnType Z_3x1
static int runAllTests(TestResult &result)
const CwiseBinaryOp< internal::scalar_zeta_op< Scalar >, const Derived, const DerivedQ > zeta(const EIGEN_CURRENT_STORAGE_BASE_CLASS< DerivedQ > &q) const
TEST(TangentPreintegration, UpdateEstimate1)
void integrateMeasurements(const vector< ImuMeasurement > &measurements, PIM *pim)
internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative33(boost::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
Some functions to compute numerical derivatives.
Pose3 x2(Rot3::Ypr(0.0, 0.0, 0.0), l2)
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative31(boost::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative21(const boost::function< Y(const X1 &, const X2 &)> &h, const X1 &x1, const X2 &x2, double delta=1e-5)
Common testing infrastructure.
Vector9 computeError(const NavState &state_i, const NavState &state_j, const imuBias::ConstantBias &bias_i, OptionalJacobian< 9, 9 > H1, OptionalJacobian< 9, 9 > H2, OptionalJacobian< 9, 6 > H3) const
Calculate error given navStates.
const Matrix93 & preintegrated_H_biasOmega() const
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative32(boost::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative22(boost::function< Y(const X1 &, const X2 &)> h, const X1 &x1, const X2 &x2, double delta=1e-5)
static const double kAccelSigma
Test harness methods for expressions.
#define EXPECT(condition)
static Vector9 UpdatePreintegrated(const Vector3 &a_body, const Vector3 &w_body, const double dt, const Vector9 &preintegrated, OptionalJacobian< 9, 9 > A=boost::none, OptionalJacobian< 9, 3 > B=boost::none, OptionalJacobian< 9, 3 > C=boost::none)
static const Vector3 kZero
Array< double, 1, 3 > e(1./3., 0.5, 2.)
static boost::shared_ptr< PreintegratedCombinedMeasurements::Params > Params()
const Matrix93 & preintegrated_H_biasAcc() const
const Vector9 & preintegrated() const
void mergeWith(const TangentPreintegration &pim, Matrix9 *H1, Matrix9 *H2)
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
imuBias::ConstantBias Bias
static const double kGyroSigma
Vector9 f(const Vector9 &zeta, const Vector3 &a, const Vector3 &w)