|
27 | 27 |
|
28 | 28 | namespace gtsam { |
29 | 29 |
|
| 30 | +namespace internal { |
| 31 | +/** |
| 32 | + * @brief Function object for incremental rotation. |
| 33 | + * @param measuredOmega The measured angular velocity (as given by the sensor) |
| 34 | + * @param deltaT The time interval over which the rotation is integrated. |
| 35 | + * @param body_P_sensor Optional transform between body and IMU. |
| 36 | + */ |
| 37 | +struct IncrementalRotation { |
| 38 | + const Vector3& measuredOmega; |
| 39 | + const double deltaT; |
| 40 | + const std::optional<Pose3>& body_P_sensor; |
| 41 | + |
| 42 | + /** |
| 43 | + * @brief Integrate angular velocity, but corrected by bias. |
| 44 | + * @param bias The bias estimate |
| 45 | + * @param H_bias Jacobian of the rotation w.r.t. bias. |
| 46 | + * @return The incremental rotation |
| 47 | + */ |
| 48 | + Rot3 operator()(const Vector3& bias, |
| 49 | + OptionalJacobian<3, 3> H_bias = {}) const; |
| 50 | +}; |
| 51 | + |
| 52 | +} // namespace internal |
| 53 | + |
30 | 54 | /// Parameters for pre-integration: |
31 | 55 | /// Usage: Create just a single Params and pass a shared pointer to the constructor |
32 | 56 | struct GTSAM_EXPORT PreintegratedRotationParams { |
@@ -184,7 +208,7 @@ class GTSAM_EXPORT PreintegratedRotation { |
184 | 208 | inline Rot3 GTSAM_DEPRECATED incrementalRotation( |
185 | 209 | const Vector3& measuredOmega, const Vector3& bias, double deltaT, |
186 | 210 | OptionalJacobian<3, 3> D_incrR_integratedOmega) const { |
187 | | - IncrementalRotation f{measuredOmega, deltaT, p_->body_P_sensor}; |
| 211 | + internal::IncrementalRotation f{measuredOmega, deltaT, p_->body_P_sensor}; |
188 | 212 | Rot3 incrR = f(bias, D_incrR_integratedOmega); |
189 | 213 | // Backwards compatible "weird" Jacobian, no longer used. |
190 | 214 | if (D_incrR_integratedOmega) *D_incrR_integratedOmega /= -deltaT; |
@@ -224,28 +248,4 @@ class GTSAM_EXPORT PreintegratedRotation { |
224 | 248 | template <> |
225 | 249 | struct traits<PreintegratedRotation> : public Testable<PreintegratedRotation> {}; |
226 | 250 |
|
227 | | -namespace internal { |
228 | | -/** |
229 | | - * @brief Function object for incremental rotation. |
230 | | - * @param measuredOmega The measured angular velocity (as given by the sensor) |
231 | | - * @param deltaT The time interval over which the rotation is integrated. |
232 | | - * @param body_P_sensor Optional transform between body and IMU. |
233 | | - */ |
234 | | -struct IncrementalRotation { |
235 | | - const Vector3& measuredOmega; |
236 | | - const double deltaT; |
237 | | - const std::optional<Pose3>& body_P_sensor; |
238 | | - |
239 | | - /** |
240 | | - * @brief Integrate angular velocity, but corrected by bias. |
241 | | - * @param bias The bias estimate |
242 | | - * @param H_bias Jacobian of the rotation w.r.t. bias. |
243 | | - * @return The incremental rotation |
244 | | - */ |
245 | | - Rot3 operator()(const Vector3& bias, |
246 | | - OptionalJacobian<3, 3> H_bias = {}) const; |
247 | | -}; |
248 | | - |
249 | | -} // namespace internal |
250 | | - |
251 | 251 | } /// namespace gtsam |
0 commit comments