30 static const double kDt = 0.1;
33 return TangentPreintegration::UpdatePreintegrated(a, w,
kDt, zeta);
38 static std::shared_ptr<PreintegrationParams>
Params() {
39 auto p = PreintegrationParams::MakeSharedD(
kGravity);
42 p->integrationCovariance = 0.0001 * I_3x3;
66 zeta << 0.01, 0.02, 0.03, 100, 200, 300, 10, 5, 3;
80 std::function<Vector9(const Vector3&, const Vector3&)> preintegrated =
109 f = std::bind(&TangentPreintegration::computeError, pim,
110 std::placeholders::_1, std::placeholders::_2,
111 std::placeholders::_3,
nullptr,
nullptr,
125 std::function<Vector9(const Vector9&, const Vector9&)>
f =
126 [pim](
const Vector9& zeta01,
const Vector9& zeta12) {
127 return TangentPreintegration::Compose(zeta01, zeta12, pim.
deltaTij());
141 const Vector9 actual_zeta =
142 TangentPreintegration::Compose(zeta, zeta, pim.
deltaTij());
static const Eigen::MatrixBase< Vector3 >::ConstantReturnType Z_3x1
static int runAllTests(TestResult &result)
static std::shared_ptr< PreintegrationParams > Params()
TEST(TangentPreintegration, UpdateEstimate1)
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
void integrateMeasurements(const vector< ImuMeasurement > &measurements, PIM *pim)
Some functions to compute numerical derivatives.
Pose3 x2(Rot3::Ypr(0.0, 0.0, 0.0), l2)
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.
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative21(const std::function< Y(const X1 &, const X2 &)> &h, const X1 &x1, const X2 &x2, double delta=1e-5)
const CwiseBinaryOp< internal::scalar_zeta_op< Scalar >, const Derived, const DerivedQ > zeta(const EIGEN_CURRENT_STORAGE_BASE_CLASS< DerivedQ > &q) const
static const double kAccelSigma
internal::FixedSizeMatrix< Y, X3 >::type numericalDerivative33(std::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
Test harness methods for expressions.
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative32(std::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
#define EXPECT(condition)
internal::FixedSizeMatrix< Y, X1 >::type numericalDerivative31(std::function< Y(const X1 &, const X2 &, const X3 &)> h, const X1 &x1, const X2 &x2, const X3 &x3, double delta=1e-5)
Vector::Scalar omega(const Vector &t, const Vector &s, RealScalar angle)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
static const Vector kZero
void mergeWith(const TangentPreintegration &pim, Matrix9 *H1, Matrix9 *H2)
imuBias::ConstantBias Bias
static Vector9 UpdatePreintegrated(const Vector3 &a_body, const Vector3 &w_body, const double dt, const Vector9 &preintegrated, OptionalJacobian< 9, 9 > A={}, OptionalJacobian< 9, 3 > B={}, OptionalJacobian< 9, 3 > C={})
const Matrix93 & preintegrated_H_biasOmega() const
internal::FixedSizeMatrix< Y, X2 >::type numericalDerivative22(std::function< Y(const X1 &, const X2 &)> h, const X1 &x1, const X2 &x2, double delta=1e-5)
const Matrix93 & preintegrated_H_biasAcc() const
static std::shared_ptr< PreintegratedCombinedMeasurements::Params > Params(const Matrix3 &biasAccCovariance=Matrix3::Zero(), const Matrix3 &biasOmegaCovariance=Matrix3::Zero(), const Matrix6 &biasAccOmegaInt=Matrix6::Zero())
Vector9 f(const Vector9 &zeta, const Vector3 &a, const Vector3 &w)
static const double kGyroSigma
const Vector9 & preintegrated() const