@@ -44,7 +44,7 @@ static std::shared_ptr<PreintegratedRotationParams> paramsWithTransform() {
44
44
}
45
45
46
46
// ******************************************************************************
47
- TEST (PreintegratedRotation, integrateMeasurement ) {
47
+ TEST (PreintegratedRotation, integrateGyroMeasurement ) {
48
48
// Example where IMU is identical to body frame, then omega is roll
49
49
using namespace biased_x_rotation ;
50
50
auto p = std::make_shared<PreintegratedRotationParams>();
@@ -74,48 +74,7 @@ TEST(PreintegratedRotation, integrateMeasurement) {
74
74
}
75
75
76
76
// ******************************************************************************
77
- TEST (PreintegratedRotation, Deprecated) {
78
- // Example where IMU is identical to body frame, then omega is roll
79
- using namespace biased_x_rotation ;
80
- auto p = std::make_shared<PreintegratedRotationParams>();
81
- PreintegratedRotation pim (p);
82
-
83
- // Check the value.
84
- Matrix3 H_bias;
85
- PreintegratedRotation::IncrementalRotation f{measuredOmega, deltaT,
86
- p->getBodyPSensor ()};
87
- Rot3 expected = Rot3::Roll (omega * deltaT);
88
- EXPECT (assert_equal (expected, f (bias, H_bias), 1e-9 ));
89
-
90
- // Ephemeral test for deprecated Jacobian:
91
- Matrix3 D_incrR_integratedOmega;
92
- (void )pim.incrementalRotation (measuredOmega, bias, deltaT,
93
- D_incrR_integratedOmega);
94
- auto g = [&](const Vector3& x, const Vector3& y) {
95
- return pim.incrementalRotation (x, y, deltaT, {});
96
- };
97
- const Matrix3 oldJacobian =
98
- numericalDerivative22<Rot3, Vector3, Vector3>(g, measuredOmega, bias);
99
- EXPECT (assert_equal<Matrix3>(oldJacobian, -deltaT * D_incrR_integratedOmega));
100
-
101
- // Check deprecated version.
102
- Matrix3 D_incrR_integratedOmega2, F;
103
- pim.integrateMeasurement (measuredOmega, bias, deltaT,
104
- D_incrR_integratedOmega2, F);
105
- EXPECT (assert_equal (expected, pim.deltaRij (), 1e-9 ));
106
-
107
- // Check that system matrix F is the first derivative of compose:
108
- EXPECT (assert_equal<Matrix3>(pim.deltaRij ().inverse ().AdjointMap (), F));
109
-
110
- // Check that deprecated Jacobian is correct.
111
- EXPECT (assert_equal (D_incrR_integratedOmega, D_incrR_integratedOmega2, 1e-9 ));
112
-
113
- // Make sure delRdelBiasOmega is H_bias after integration.
114
- EXPECT (assert_equal<Matrix3>(H_bias, pim.delRdelBiasOmega ()));
115
- }
116
-
117
- // ******************************************************************************
118
- TEST (PreintegratedRotation, IncrementalRotationWithTransform) {
77
+ TEST (PreintegratedRotation, integrateGyroMeasurementWithTransform) {
119
78
// Example where IMU is rotated, so measured omega indicates pitch.
120
79
using namespace biased_x_rotation ;
121
80
auto p = paramsWithTransform ();
@@ -143,47 +102,6 @@ TEST(PreintegratedRotation, IncrementalRotationWithTransform) {
143
102
EXPECT (assert_equal<Matrix3>(H_bias, pim.delRdelBiasOmega ()));
144
103
}
145
104
146
- // ******************************************************************************
147
- TEST (PreintegratedRotation, DeprecatedWithTransform) {
148
- // Example where IMU is rotated, so measured omega indicates pitch.
149
- using namespace biased_x_rotation ;
150
- auto p = paramsWithTransform ();
151
- PreintegratedRotation pim (p);
152
-
153
- // Check the value.
154
- Matrix3 H_bias;
155
- PreintegratedRotation::IncrementalRotation f{measuredOmega, deltaT,
156
- p->getBodyPSensor ()};
157
- Rot3 expected = Rot3::Pitch (omega * deltaT);
158
- EXPECT (assert_equal (expected, f (bias, H_bias), 1e-9 ));
159
-
160
- // Ephemeral test for deprecated Jacobian:
161
- Matrix3 D_incrR_integratedOmega;
162
- (void )pim.incrementalRotation (measuredOmega, bias, deltaT,
163
- D_incrR_integratedOmega);
164
- auto g = [&](const Vector3& x, const Vector3& y) {
165
- return pim.incrementalRotation (x, y, deltaT, {});
166
- };
167
- const Matrix3 oldJacobian =
168
- numericalDerivative22<Rot3, Vector3, Vector3>(g, measuredOmega, bias);
169
- EXPECT (assert_equal<Matrix3>(oldJacobian, -deltaT * D_incrR_integratedOmega));
170
-
171
- // Check deprecated version.
172
- Matrix3 D_incrR_integratedOmega2, F;
173
- pim.integrateMeasurement (measuredOmega, bias, deltaT,
174
- D_incrR_integratedOmega2, F);
175
- EXPECT (assert_equal (expected, pim.deltaRij (), 1e-9 ));
176
-
177
- // Check that system matrix F is the first derivative of compose:
178
- EXPECT (assert_equal<Matrix3>(pim.deltaRij ().inverse ().AdjointMap (), F));
179
-
180
- // Check that deprecated Jacobian is correct.
181
- EXPECT (assert_equal (D_incrR_integratedOmega, D_incrR_integratedOmega2, 1e-9 ));
182
-
183
- // Make sure delRdelBiasOmega is H_bias after integration.
184
- EXPECT (assert_equal<Matrix3>(H_bias, pim.delRdelBiasOmega ()));
185
- }
186
-
187
105
// ******************************************************************************
188
106
int main () {
189
107
TestResult tr;
0 commit comments