struct mola::state_estimation_smoother::Parameters::ImuPreintegration
Overview
IMU preintegration between consecutive keyframes: every kinematic link whose interval is covered by raw readings gets an on-manifold preintegration factor (gtsam::ImuFactor on the raw accelerometer and gyroscope readings), and every keyframe gets a gyroscope and accelerometer bias variable, chained by a random walk. Gravity is along -z of {enu}: the factors include T_enu_to_map, so {map} may be tilted. Default on; inert without IMU readings.
#include <Parameters.h> struct ImuPreintegration { // fields bool enabled = true; std::string sensor_label_re = ".*"; bool gyro_only = false; int max_imus = 1; double gyro_noise_density = 2.4e-4; double accel_noise_density = 1.6e-3; double gyro_bias_random_walk = 2e-5; double accel_bias_random_walk = 3e-4; double integration_sigma = 1e-4; double gravity = 9.80665; double accel_scale = 0; double initial_gyro_bias_sigma = 0.02; double initial_accel_bias_sigma = 0.2; double linear_kinematics_sigma_scale = 10.0; double max_reading_gap = 0.1; double min_sigma_rotation = 2e-4; double min_sigma_position = 1e-3; double min_sigma_velocity = 5e-3; double min_link_duration = 2e-3; };
Fields
std::string sensor_label_re = ".*"
IMUs used (regex of labels)
bool gyro_only = false
If true, only the gyroscope is preintegrated: each link gets a rotation-only factor (gtsam AHRS preintegration, with the gyro bias of the same bias variables), and the accelerometer is not used for it, nor are the linear kinematic factors weakened. For vehicles whose accelerometer is too disturbed (vibration) to integrate, while their gyroscope still observes rotation far better than LiDAR or wheel odometry in some scenes (e.g. a degenerate LiDAR scene).
int max_imus = 1
With gyro_only, how many IMUs matching sensor_label_re are preintegrated (1 to 3), each with its own gyro bias variables, in the order they are first seen. Several gyroscopes keep the rotation observed when one of them stops (e.g. a LiDAR with a built-in IMU).
double gyro_noise_density = 2.4e-4
[rad/s/sqrt(Hz)]
double accel_noise_density = 1.6e-3
[m/s^2/sqrt(Hz)]
double gyro_bias_random_walk = 2e-5
[rad/s^2/sqrt(Hz)]
double accel_bias_random_walk = 3e-4
[m/s^3/sqrt(Hz)]
double integration_sigma = 1e-4
position integration noise
double gravity = 9.80665
[m/s^2]
double accel_scale = 0
Multiplier taking the accelerometer readings to m/s^2. 0 (default): automatic, decided once from their mean norm over the first readings, since some drivers publish them in units of g.
double initial_gyro_bias_sigma = 0.02
[rad/s]
double initial_accel_bias_sigma = 0.2
[m/s^2]
double linear_kinematics_sigma_scale = 10.0
The constant-velocity linear factors of a link (velocity and position integration) contradict any acceleration the IMU measures: their sigmas are multiplied by this while preintegration is on. They stay, weak, so a link without IMU data is still determined.
double max_reading_gap = 0.1
Largest gap between consecutive readings integrated across [s].
double min_sigma_rotation = 2e-4
Floor of the preintegrated uncertainty, added to it: unmodeled errors (timing, extrinsics, vibration), and numerical conditioning, since keyframes can be milliseconds apart. Rotation [rad], position [m], velocity [m/s].
double min_link_duration = 2e-3
Links shorter than this get no preintegration factor [s].