Go to the documentation of this file.
29 using namespace gtsam;
36 TEST(TestImuPreintegration, LoadedSimulationData) {
39 vector<ImuMeasurement> imuMeasurements;
41 double accNoiseSigma = 0.001249;
42 double accBiasRwSigma = 0.000106;
43 double gyrNoiseSigma = 0.000208;
44 double gyrBiasRwSigma = 0.000004;
45 double integrationCovariance = 1
e-8;
46 double biasAccOmegaInt = 1
e-5;
48 double gravity = 9.81;
55 stringstream
ss(line);
58 while (getline(
ss,
str,
',')) {
62 measurement.dt =
static_cast<size_t>(1e9 * (1 / rate));
71 auto imuPreintegratedParams =
72 PreintegratedCombinedMeasurements::Params::MakeSharedU(gravity);
73 imuPreintegratedParams->accelerometerCovariance =
74 I_3x3 *
pow(accNoiseSigma, 2);
75 imuPreintegratedParams->biasAccCovariance = I_3x3 *
pow(accBiasRwSigma, 2);
76 imuPreintegratedParams->gyroscopeCovariance = I_3x3 *
pow(gyrNoiseSigma, 2);
77 imuPreintegratedParams->biasOmegaCovariance = I_3x3 *
pow(gyrBiasRwSigma, 2);
78 imuPreintegratedParams->integrationCovariance = I_3x3 * integrationCovariance;
79 imuPreintegratedParams->biasAccOmegaInt = I_6x6 * biasAccOmegaInt;
90 NavState initialNavState(priorPose, priorVelocity);
100 for (
size_t n = 1;
n < imuMeasurements.size();
n++) {
103 imuMeasurements[
n].I_w_WI, 1 / rate);
105 propState = imuPreintegrated.
predict(initialNavState, priorImuBias);
static int runAllTests(TestResult &result)
Rot3 rotation(const Pose3 &pose, OptionalJacobian< 3, 6 > H)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Concept check for values that can be used in unit tests.
Vector3 rpy(OptionalJacobian< 3, 3 > H={}) const
void integrateMeasurement(const Vector3 &measuredAcc, const Vector3 &measuredOmega, const double dt) override
static std::stringstream ss
Some functions to compute numerical derivatives.
TEST(TestImuPreintegration, LoadedSimulationData)
Uses the GTSAM library to perform IMU preintegration on an acceleration input.
utility functions for loading datasets
#define DOUBLES_EQUAL(expected, actual, threshold)
NavState predict(const NavState &state_i, const imuBias::ConstantBias &bias_i, OptionalJacobian< 9, 9 > H1={}, OptionalJacobian< 9, 6 > H2={}) const
Predict state at time j.
const Point3 & translation(OptionalJacobian< 3, 6 > Hself={}) const
get translation
Velocity3 velocity(const NavState &X, OptionalJacobian< 3, 9 > H)
Contains data from the IMU mesaurements.
Jet< T, N > pow(const Jet< T, N > &f, double g)
const Rot3 & rotation(OptionalJacobian< 3, 6 > Hself={}) const
get rotation
Point3 position(const NavState &X, OptionalJacobian< 3, 9 > H)
const Velocity3 & velocity(OptionalJacobian< 3, 9 > H={}) const
std::map< std::string, Array< float, 1, 8, DontAlign|RowMajor > > results
GTSAM_EXPORT std::string findExampleDataFile(const std::string &name)
static Point2 measurement(323.0, 240.0)
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:07:39