32 using namespace gtsam;
33 using namespace gtsam::serializationTestHelpers;
49 auto p = P::Params::MakeSharedD(9.81);
51 p->accelerometerCovariance = 1
e-7 * I_3x3;
52 p->gyroscopeCovariance = 1
e-8 * I_3x3;
53 p->integrationCovariance = 1
e-9 * I_3x3;
55 const double deltaT = 0.005;
67 for (
int j = 0;
j < 200; ++
j)
75 auto pim = getPreintegratedMeasurements<PreintegratedImuMeasurements>();
77 EXPECT(equalsObj<PreintegratedImuMeasurements>(pim));
78 EXPECT(equalsXML<PreintegratedImuMeasurements>(pim));
79 EXPECT(equalsBinary<PreintegratedImuMeasurements>(pim));
83 EXPECT(equalsObj<ImuFactor>(factor));
84 EXPECT(equalsXML<ImuFactor>(factor));
85 EXPECT(equalsBinary<ImuFactor>(factor));
90 auto pim = getPreintegratedMeasurements<PreintegratedImuMeasurements>();
94 EXPECT(equalsObj<ImuFactor2>(factor));
95 EXPECT(equalsXML<ImuFactor2>(factor));
96 EXPECT(equalsBinary<ImuFactor2>(factor));
101 auto pim = getPreintegratedMeasurements<PreintegratedCombinedMeasurements>();
103 EXPECT(equalsObj<PreintegratedCombinedMeasurements>(pim));
104 EXPECT(equalsXML<PreintegratedCombinedMeasurements>(pim));
105 EXPECT(equalsBinary<PreintegratedCombinedMeasurements>(pim));
109 EXPECT(equalsObj<CombinedImuFactor>(factor));
110 EXPECT(equalsXML<CombinedImuFactor>(factor));
111 EXPECT(equalsBinary<CombinedImuFactor>(factor));
116 Unit3 nDown(0, 0, -1);
120 EXPECT(serializationTestHelpers::equalsObj(factor));
121 EXPECT(serializationTestHelpers::equalsXML(factor));
122 EXPECT(serializationTestHelpers::equalsBinary(factor));
127 Unit3 nDown(0, 0, -1);
131 EXPECT(serializationTestHelpers::equalsObj(factor));
132 EXPECT(serializationTestHelpers::equalsXML(factor));
133 EXPECT(serializationTestHelpers::equalsBinary(factor));