Skip to content

Commit 23ed14c

Browse files
committed
Add stubbed GalileanImuFactor
1 parent 8c33a73 commit 23ed14c

File tree

2 files changed

+157
-0
lines changed

2 files changed

+157
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/* ----------------------------------------------------------------------------
2+
3+
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
4+
* Atlanta, Georgia 30332-0415
5+
* All Rights Reserved
6+
* Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7+
8+
* See LICENSE for the license information
9+
10+
* -------------------------------------------------------------------------- */
11+
12+
/**
13+
* @file GalileanImuFactor.cpp
14+
* @brief Implementation of Delama et al. IMU Factor
15+
* @author Frank Dellaert
16+
* @author Giulio Delama
17+
*/
18+
19+
#include <gtsam/navigation/GalileanImuFactor.h>
20+
21+
namespace gtsam {
22+
23+
// -- Constructors ------------------------------------------------------------
24+
PreintegratedImuMeasurementsG::PreintegratedImuMeasurementsG(
25+
const std::shared_ptr<Params>& p, const imuBias::ConstantBias& biasHat)
26+
: Base(p, biasHat), p_(p) {}
27+
28+
// -- Integration API ---------------------------------------------------------
29+
void PreintegratedImuMeasurementsG::resetIntegration() {
30+
throw std::runtime_error("Not implemented: resetIntegration");
31+
}
32+
33+
void PreintegratedImuMeasurementsG::integrateMeasurement(
34+
const Vector3& measuredAcc, const Vector3& measuredOmega, double dt) {
35+
throw std::runtime_error("Not implemented: integrateMeasurement");
36+
}
37+
38+
// -- print / equals ----------------------------------------------------------
39+
void PreintegratedImuMeasurementsG::print(const std::string& s) const {
40+
throw std::runtime_error("Not implemented: print");
41+
}
42+
bool PreintegratedImuMeasurementsG::equals(
43+
const PreintegratedImuMeasurementsG& o, double tol) const {
44+
throw std::runtime_error("Not implemented: equals");
45+
}
46+
47+
} // namespace gtsam
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
/* ----------------------------------------------------------------------------
2+
3+
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
4+
* Atlanta, Georgia 30332-0415
5+
* All Rights Reserved
6+
* Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7+
8+
* See LICENSE for the license information
9+
10+
* -------------------------------------------------------------------------- */
11+
12+
/**
13+
* @file GalileanImuFactor.h
14+
* @brief Equivariant IMU Preintegration with Biases: a Galilean Group
15+
* Approach
16+
*
17+
* This class implements a new approach for Inertial Measurement Unit (IMU)
18+
* preintegration based on the Galilean group, as described in:
19+
*
20+
* Giulio Delama, Alessandro Fornasier, Robert Mahony, Stephan Weiss,
21+
* "Equivariant IMU Preintegration with Biases: a Galilean Group Approach,"
22+
* IEEE Robotics and Automation Letters, 2024.
23+
*
24+
* Inspired by recent advances in equivariant theory applied to biased inertial
25+
* navigation systems (INS), this approach derives a discrete-time formulation
26+
* of IMU preintegration on the Galilean group, geometrically coupling
27+
* navigation states and biases for improved consistency and lower linearization
28+
* error compared to traditional methods.
29+
*/
30+
31+
#pragma once
32+
33+
#include <gtsam/base/Matrix.h>
34+
#include <gtsam/basis/Chebyshev2.h>
35+
#include <gtsam/navigation/ImuBias.h>
36+
#include <gtsam/navigation/ImuFactor.h>
37+
#include <gtsam/navigation/NavState.h>
38+
#include <gtsam/navigation/PreintegrationBase.h>
39+
#include <gtsam/navigation/PreintegrationParams.h>
40+
41+
#include <optional>
42+
#include <vector>
43+
44+
namespace gtsam {
45+
46+
/// IMU preintegration based on the Galilean group (see class docs above).
47+
class GTSAM_EXPORT PreintegratedImuMeasurementsG : public PreintegrationBase {
48+
using Base = PreintegrationBase;
49+
using Params = PreintegrationBase::Params;
50+
51+
std::shared_ptr<Params> p_;
52+
53+
public:
54+
// Constructors (stubs)
55+
explicit PreintegratedImuMeasurementsG(
56+
const std::shared_ptr<Params>& p = std::make_shared<Params>(),
57+
const imuBias::ConstantBias& biasHat = {});
58+
59+
// Public (const) accessors – stubs
60+
double deltaTij() const {
61+
throw std::runtime_error("Not implemented: deltaTij");
62+
}
63+
Rot3 deltaRij() const override {
64+
throw std::runtime_error("Not implemented: deltaRij");
65+
}
66+
Vector3 deltaPij() const override {
67+
throw std::runtime_error("Not implemented: deltaPij");
68+
}
69+
Vector3 deltaVij() const override {
70+
throw std::runtime_error("Not implemented: deltaVij");
71+
}
72+
NavState deltaXij() const override {
73+
throw std::runtime_error("Not implemented: deltaXij");
74+
}
75+
Matrix9 preintMeasCov() const {
76+
throw std::runtime_error("Not implemented: preintMeasCov");
77+
}
78+
79+
// Bias correction (first‑order) – stub
80+
Vector9 biasCorrectedDelta(const imuBias::ConstantBias& bias_i,
81+
OptionalJacobian<9, 6> H = {}) const override {
82+
throw std::runtime_error("Not implemented: biasCorrectedDelta");
83+
}
84+
85+
// integration API
86+
void integrateMeasurement(const Vector3& measuredAcc,
87+
const Vector3& measuredOmega, double dt) override;
88+
89+
void resetIntegration() override;
90+
91+
// Testable – stubs
92+
void print(
93+
const std::string& s = "PreintegratedImuMeasurementsG") const override;
94+
bool equals(const PreintegratedImuMeasurementsG& other,
95+
double tol = 1e-9) const;
96+
97+
void update(const Vector3& measuredAcc, const Vector3& measuredOmega,
98+
const double dt, Matrix9* A, Matrix93* B, Matrix93* C) override {
99+
throw std::runtime_error("Not implemented: update");
100+
}
101+
};
102+
103+
// Tell GTSAM about PreintegratedImuMeasurementsG print/equals:
104+
template <>
105+
struct traits<PreintegratedImuMeasurementsG>
106+
: public Testable<PreintegratedImuMeasurementsG> {};
107+
108+
using GalileanImuFactor = ImuFactorT<PreintegratedImuMeasurementsG>;
109+
110+
} // namespace gtsam

0 commit comments

Comments
 (0)