struct mola::LidarOdometry::MethodState::MapGravityState¶
Overview¶
Online estimate of gravity in the MAP frame (plus IMU biases), used to replace the one-shot gravity_calib_pitch_roll capture when imu_gravity_correction.map_gravity.enabled.
#include <LidarOdometry.h> struct MapGravityState { // fields mola::imu::MapGravityEstimator estimator; mola::imu::ImuPreintegrator preintegrator; std::optional<double> last_imu_time; std::optional<double> open_t_from; mrpt::poses::CPose3D open_R_from; mrpt::math::TVector3D open_v_from {0, 0, 0}; uint32_t intervals_since_solve = 0; std::optional<mrpt::poses::CPose3D> pending_relevel; bool relevel_decided = false; std::optional<mrpt::poses::CPose3D> applied_relevel; };
Fields¶
std::optional<double> last_imu_time
Wall-clock stamp of the last IMU sample fed to the preintegrator, to derive dt for the next one.
std::optional<double> open_t_from
Open interval start: stamp, attitude and map-frame velocity captured when the previous scan was committed.
std::optional<mrpt::poses::CPose3D> pending_relevel
Correction awaiting application to the map frame, set by the solve loop and consumed (once) by applyMapFrameRelevel(). The solve runs under imu_state_mtx_, while rotating the map needs the local-map and simplemap mutexes, which the lock order forbids taking from there.
bool relevel_decided = false
Set once the re-level decision has been taken, whichever way it went: the map frame is a gauge, and changing it more than once per session would make the run’s own output non-comparable with itself.
std::optional<mrpt::poses::CPose3D> applied_relevel
The rotation actually applied to the map frame, if any. Recorded in the map and keyframe metadata so a run stays auditable.