27 TEST(ConstantVelocityFactor, VelocityFactor) {
28 using namespace gtsam;
30 const double tol{1
e-5};
48 const double mu{1000};
54 const auto state0_err_origin = factor.evaluateError(
origin, state0);
55 EXPECT(
assert_equal((Vector9() << 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0).finished(), state0_err_origin,
tol));
59 const auto state1_err_state0 = factor.evaluateError(state0,
state1);
60 EXPECT(
assert_equal((Vector9() << 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0).finished(), state1_err_state0,
tol));
66 const auto state3_err_state2 = factor.evaluateError(state0,
state1);
67 EXPECT(
assert_equal((Vector9() << 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0).finished(), state3_err_state2,
tol));
72 const auto state2_err_state0 = factor.evaluateError(state0,
state2);
73 EXPECT(
assert_equal((Vector9() << 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0).finished(), state2_err_state0,
tol));