Skip to content

Commit 1bb26f8

Browse files
committed
Attempt to resolve Windows linking
1 parent fccf3ce commit 1bb26f8

File tree

3 files changed

+30
-32
lines changed

3 files changed

+30
-32
lines changed

gtsam/navigation/PreintegratedRotation.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ bool PreintegratedRotation::equals(const PreintegratedRotation& other,
6868
&& equal_with_abs_tol(delRdelBiasOmega_, other.delRdelBiasOmega_, tol);
6969
}
7070

71-
Rot3 PreintegratedRotation::IncrementalRotation::operator()(
71+
namespace internal {
72+
Rot3 IncrementalRotation::operator()(
7273
const Vector3& bias, OptionalJacobian<3, 3> H_bias) const {
7374
// First we compensate the measurements for the bias
7475
Vector3 correctedOmega = measuredOmega - bias;
@@ -93,12 +94,13 @@ Rot3 PreintegratedRotation::IncrementalRotation::operator()(
9394
}
9495
return incrR;
9596
}
97+
} // namespace internal
9698

9799
void PreintegratedRotation::integrateGyroMeasurement(
98100
const Vector3& measuredOmega, const Vector3& biasHat, double deltaT,
99101
OptionalJacobian<3, 3> F) {
100102
Matrix3 H_bias;
101-
IncrementalRotation f{measuredOmega, deltaT, p_->body_P_sensor};
103+
internal::IncrementalRotation f{measuredOmega, deltaT, p_->body_P_sensor};
102104
const Rot3 incrR = f(biasHat, H_bias);
103105

104106
// Update deltaTij and rotation

gtsam/navigation/PreintegratedRotation.h

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -176,32 +176,6 @@ class GTSAM_EXPORT PreintegratedRotation {
176176

177177
/// @}
178178

179-
/// @name Internal, exposed for testing only
180-
/// @{
181-
182-
/**
183-
* @brief Function object for incremental rotation.
184-
* @param measuredOmega The measured angular velocity (as given by the sensor)
185-
* @param deltaT The time interval over which the rotation is integrated.
186-
* @param body_P_sensor Optional transform between body and IMU.
187-
*/
188-
struct IncrementalRotation {
189-
const Vector3& measuredOmega;
190-
const double deltaT;
191-
const std::optional<Pose3>& body_P_sensor;
192-
193-
/**
194-
* @brief Integrate angular velocity, but corrected by bias.
195-
* @param bias The bias estimate
196-
* @param H_bias Jacobian of the rotation w.r.t. bias.
197-
* @return The incremental rotation
198-
*/
199-
Rot3 operator()(const Vector3& bias,
200-
OptionalJacobian<3, 3> H_bias = {}) const;
201-
};
202-
203-
/// @}
204-
205179
/// @name Deprecated API
206180
/// @{
207181

@@ -250,4 +224,28 @@ class GTSAM_EXPORT PreintegratedRotation {
250224
template <>
251225
struct traits<PreintegratedRotation> : public Testable<PreintegratedRotation> {};
252226

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+
253251
} /// namespace gtsam

gtsam/navigation/tests/testPreintegratedRotation.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ TEST(PreintegratedRotation, integrateGyroMeasurement) {
5252

5353
// Check the value.
5454
Matrix3 H_bias;
55-
PreintegratedRotation::IncrementalRotation f{measuredOmega, deltaT,
56-
p->getBodyPSensor()};
55+
internal::IncrementalRotation f{measuredOmega, deltaT, p->getBodyPSensor()};
5756
const Rot3 incrR = f(bias, H_bias);
5857
Rot3 expected = Rot3::Roll(omega * deltaT);
5958
EXPECT(assert_equal(expected, incrR, 1e-9));
@@ -98,8 +97,7 @@ TEST(PreintegratedRotation, integrateGyroMeasurementWithTransform) {
9897

9998
// Check the value.
10099
Matrix3 H_bias;
101-
PreintegratedRotation::IncrementalRotation f{measuredOmega, deltaT,
102-
p->getBodyPSensor()};
100+
internal::IncrementalRotation f{measuredOmega, deltaT, p->getBodyPSensor()};
103101
Rot3 expected = Rot3::Pitch(omega * deltaT);
104102
EXPECT(assert_equal(expected, f(bias, H_bias), 1e-9));
105103

0 commit comments

Comments
 (0)