struct mola::LidarOdometry::Parameters::IMUGravityCorrection
Overview
#include <LidarOdometry.h> struct IMUGravityCorrection { // structs struct MapGravity; struct OdometryAttitude; // fields bool enabled = true; bool use_rank2_prior = true; bool adaptive_sigma = true; double sigma_deg = 2.0; uint32_t averaging_samples = 20; double max_age_seconds = 2.0; double map_origin_max_dispersion_deg = 1.0; double map_origin_capture_timeout = 3.0; OdometryAttitude odometry_attitude; MapGravity map_gravity; // methods void initialize(const Yaml& c); };
Fields
bool enabled = true
Enable accelerometer-based pitch/roll correction of the ICP solution.
bool use_rank2_prior = true
Apply the verticality constraint as mp2p_icp’s yaw-free, rank-2 gravityPrior (recommended) instead of folding the gravity-derived pitch/roll into the SE(3) pose prior.
The legacy path (false) encodes tilt in a 6x6 prior information matrix, whose diagonal only isolates roll/pitch near yaw=0 and which injects translation directly. Kept selectable for reproducibility of older results.
Requires an mp2p_icp version providing mp2p_icp::GravityPrior; when built against an older one this silently falls back to the legacy path (with a warning), it does not fail.
bool adaptive_sigma = true
Widen sigma_deg in quadrature by the MEASURED angular dispersion of the buffered accelerometer directions, so the constraint stands down automatically when the accelerometer is not actually measuring gravity.
Needed because the quasi-static acceptance gate alone is far too permissive: accepting |norm(a) - g| <= 2 m/s^2 admits up to asin(2/9.81) ~= 11.8 deg of aliased tilt. Without this, on a real vehicle the gravity constraint asserts tilt information the reading does not contain, and odometry gets worse rather than better.
double sigma_deg = 2.0
Sigma [degrees] for the gravity-derived verticality constraint. Lower values = more trust in IMU. Typical: 1 to 5 deg.
uint32_t averaging_samples = 20
Number of recent accelerometer samples to average for gravity estimation.
double max_age_seconds = 2.0
Maximum age [seconds] for accelerometer samples used in averaging. Samples older than this are discarded. 0 = no age limit.
double map_origin_max_dispersion_deg = 1.0
Maximum RMS angular dispersion [deg] of the buffered accelerometer directions for the one-shot map-origin verticality capture to be accepted. The capture decides the map’s vertical reference for the whole run, so while this is exceeded it is deferred and retried at the next scan rather than freezing a reading taken during a footfall. 0 disables the gate.
double map_origin_capture_timeout = 3.0
How long [s] the capture may be deferred by the gate above before it is taken anyway. Measured from the first scan at which accelerometer data was available. 0 defers indefinitely until a quiet reading shows up.