Manuscript Offprint
arXiv:2610.17870LAG-IO: Multi-IMU State Estimation for Legged Robots Using Factor Graphs
Yicheng Zhou Longwen Chen Qinghua Yu Junhao Xiao Huimin Lu Xieyuanli Chen
Abstract—Robust proprioceptive state estimation is crucial for legged robots, particularly in challenging environments where exteroceptive sensors are unreliable. While traditional leg odometry typically relies on a single body-mounted inertial measurement unit (IMU) fused with leg kinematics via an extended Kalman filter (EKF), such methods are vulnerable to linearization errors and hard-contact assumptions, leading to severe drift during slippage or dynamic locomotion. In this paper, we propose LAG-IO, a factor graph-based multi-IMU state estimation framework that tightly couples measurements from a main body IMU, multiple leg-mounted IMUs, and joint encoders within a sliding-window optimization. To handle non-stationary foot-ground interactions, we introduce a continuous probabilistic contact detection module based on kernel density estimation (KDE), which adaptively scales the covariance of zero-velocity update (ZUPT) factors. Furthermore, kinematic relative position factors are formulated to structurally anchor the independent leg inertial states to the robot's main body. Experimental results on a quadruped robot across various unstructured terrains demonstrate that, compared to existing baselines, LAG-IO achieves higher planar trajectory accuracy, reduces unobservable vertical divergence, and provides smoother trajectory transitions during unstable contacts, while maintaining competitive attitude observability. The code is released at: https://github.com/nubot-nudt/LAG-IO.
I. INTRODUCTION
Accurate proprioceptive state estimation is crucial for legged robots to execute dynamic locomotion and navigation tasks. While exteroceptive sensors such as LiDAR and cameras provide rich environmental information for localization, their performance can degrade significantly in adverse weather conditions or visually impoverished environments [1], [2]. Thus, a robust proprioceptive estimator is required to provide reliable, high-frequency state feedback when external perception becomes unreliable or fails.
Existing proprioceptive state estimation methods mainly rely on fusing measurements from a single body-mounted IMU and joint kinematics [3]–[5]. Traditional filtering frameworks, such as the extended Kalman filter, typically employ zero-velocity updates (ZUPT) under the assumption that the stance foot maintains a rigid, stationary contact with the ground [6]. However, when foot slips occur on unstructured terrains, this no-slip assumption is violated, injecting erroneous biases that inevitably lead to trajectory drift [7]. To mitigate these slip-induced errors, recent literature has explored end-to-end learning-based odometry networks [8], [9] and neural-augmented filters [10], [11] to compensate for complex, unmodeled contact dynamics. While these data-driven approaches can capture intricate motion patterns, they often struggle with generalizability across unseen environments and remain strictly bounded by their training datasets.
Expanding the proprioceptive sensing suite from a single IMU to a multi-IMU configuration has recently emerged as an effective way to address the limitations of traditional setups. Placing additional IMUs on the lower limbs allows the system to capture local impact dynamics directly, avoiding dependence on fragile force sensors [12]. Building on this idea, the recent DogLegs framework [13] showed that combining a body IMU, multiple leg IMUs, and kinematic constraints within an EKF can markedly improve leg odometry performance. However, despite these hardware gains, the EKF remains limited by its recursive structure. Once a measurement is incorporated, the associated linearization point cannot be revisited. This constraint prevents the filter from correcting past linearization errors, making it vulnerable to transient nonlinear disturbances caused by unstable contacts and high-frequency impacts.
To address these limitations, we propose LAG-IO, which reformulates multi-IMU kinematic fusion within a tightly-coupled, sliding-window factor graph optimization. Unlike filtering methods [3], [4], [11], the graph-based backend maintains a recent history of states, naturally enabling iterative relinearization to smooth out slip-induced outliers. Within this unified graph, continuous inertial preintegration and kinematic relative position (RelPos) factors are incorporated to structurally anchor the independent leg states to the robot's main body. Furthermore, a continuous contact probability evaluated from leg-IMU signals is proposed to dynamically scale the variance of the ZUPT factors, gracefully relaxing the zero-velocity constraints during unstable contacts. The main contributions of this work are threefold:
• We propose LAG-IO, a novel sliding-window factor graph optimization framework for multi-IMU legged proprioception, integrating body and leg inertial states with kinematics-based relative position constraints to ensure consistent cross-limb anchoring and improved robustness over recursive filtering.
• We propose a continuous probabilistic contact weighting mechanism that computes a stationarity likelihood from leg-IMU motion statistics and adaptively scales ZUPT covariances, enabling graceful handling of micro-slips, soft contacts, and impact disturbances.
• We provide a real-time, impact-resilient implementation with noise-shaped leg-IMU preintegration and robust optimization, achieving higher planar accuracy, reduced vertical drift, and smoother trajectory transitions compared to the EKF baselines. The code will be open source to benefit future research.
The foundational approach to legged proprioception, established by Bloesch et al. [3], formulated an EKF to jointly estimate the main body state and foot contact positions. This architecture applies state updates using forward kinematics as pseudo-measurements whenever a stable contact is detected. However, standard EKFs operating on the SE(3) manifold suffer from spurious observability, where state-dependent Jacobians can inadvertently inject erroneous information into unobservable directions such as global yaw. Researchers subsequently introduced Lie group symmetries into the filtering process. The resulting Invariant EKF (InEKF) [4], [14] ensures that the error dynamics of the filter remain independent of the current state trajectory. Although the InEKF resolves these structural symmetry issues, its estimation accuracy remains sensitive to boolean contact assumptions. Unmodeled foot slippage in unstructured environments violates the rigid kinematic measurement model and may subsequently induce progressive trajectory drift.
Data-driven methodologies offer an alternative by reducing the reliance on analytical kinematic models during uncertain contacts. Early applications primarily utilized machine learning as heuristic classifiers to replace threshold-based contact detection [15]. Recent end-to-end architectures, such as TLIO [8], leverage temporal convolutional networks to directly regress 3D displacements from local IMU sequences, thereby bypassing the kinematic chain entirely. Concurrently, hybrid approaches [10], [11] employ recurrent neural networks to dynamically estimate pseudo-measurement noise covariances or contact biases. This allows the filter to adaptively de-weight unreliable kinematic updates. While learning-augmented methods can model complex impact dynamics, their zero-shot generalizability is often constrained when the robot encounters out-of-distribution terrains or novel gait patterns not present in the training datasets.
A fundamental structural limitation of recursive filtering is that the linearization point is permanently fixed upon each measurement update. The community has increasingly investigated smoothing and optimization-based backends to address this constraint. Fixed-lag smoothers [7] maintain a short history of states, enabling the system to retroactively re-evaluate the trajectory window upon detecting slip events. Expanding upon this concept, FGO reformulates the estimation as a Maximum A Posteriori inference problem. As demonstrated by Wisth et al. [5], maintaining a sliding window of historical states allows for iterative relinearization. This optimization process provides a robust mechanism to reject delayed outlier measurements and accommodate nonlinear impact shocks.
Parallel to algorithmic advancements, enriching the physical observation model through multi-sensor fusion has emerged as a practical frontier. Due to the compliance and damping characteristics of legged structures, high-frequency foot-ground interaction forces are significantly attenuated before reaching a single body-mounted IMU. Deploying additional IMUs on the lower limbs allows for the direct measurement of these localized dynamics [12]. The DogLegs framework [13] demonstrated that tightly fusing a primary body IMU with multiple leg IMUs enhances the observability of the kinematic chain. However, because DogLegs is architecturally built upon an EKF, it can still struggle to fully recover from transient linearization errors during severe and unstable contacts. Building upon this multi-IMU paradigm, the proposed LAG-IO framework migrates the fusion engine to a sliding-window factor graph. By incorporating continuous KDE-based contact probabilities to adaptively scale the ZUPT covariances, LAG-IO preserves the physical observability of distributed inertial sensing while exploiting the resilience of iterative optimization.
III. Our Approach
The proposed LAG-IO framework processes multiple sensor streams within a unified sliding-window graph optimization. The overall system architecture is illustrated in Fig. 1. Rather than recursively compressing past measurements, the graph-based backend dynamically instantiates keyframes driven by a probabilistic contact detection mechanism. These temporally distributed keyframes are subsequently constrained by inertial preintegration, probability-scaled ZUPT factors, and kinematic RelPos factors.
A. Definition of Coordinate System and State
Rigorous spatial referencing is a prerequisite for multi-sensor state estimation. Let W denote the global inertial navigation frame, which strictly adheres to the North-East-Down (NED) convention, such that the gravity vector g aligns with the positive z-axis. The local moving frames, as explicitly marked in the upper schematic of Fig. 2, consist of the main body frame B following the Front-Right-Down (FRD) convention, alongside four independent leg-IMU frames , where .
Within the sliding-window formulation, the full system state at keyframe encapsulates the coupled navigation states of both the main body and the lower limbs of the legged robot:
For each individual sensor node , the internal navigation state is parameterized as:
where represent the translation and velocity vectors in , respectively. The orientation matrix transforms vectors from the local frame to the global frame . The terms denote the accelerometer and gyroscope biases, which are modeled as random walks.

Fig. 1. System architecture of the LAG-IO framework. Proprioceptive measurements from the body-IMU, four leg-IMUs, and joint encoders (hip, thigh, and calf) are processed through state preintegration and KDE-based contact detection to construct the tightly-coupled factor graph. The multi-IMU states are subsequently solved via sliding-window optimization and bounded by marginalization. The grey dashed box in the bottom-right indicates the oldest keyframe undergoing marginalization, while the grey dotted and red solid trajectories denote the drifting prior and the optimized estimates.
System initialization is executed under stationary conditions before the robot starts moving. During this initial static phase, the initial roll and pitch attitudes and the IMU gyroscope biases are calibrated. The initial relative spatial offsets between the body and each leg are established by averaging the forward kinematics derived from the joint encoder measurements, providing a kinematically consistent initial configuration for the factor graph.
B. KDE-Based Contact Detection
Reliable foot contact detection is fundamental to the stability of proprioceptive odometry for legged robots. Modeling foot-ground interaction strictly as a binary event is inherently insufficient for unstructured terrains, as contact instability involves continuous dynamic transitions rather than discrete states. In contrast to rigid boolean thresholds and learning-based classifiers with limited terrain generalizability, we utilize the kernel density estimation (KDE) framework [16]. This approach quantifies the degree of contact stability through a continuous probabilistic metric, reformulating contact detection as a stationarity test of Leg-IMU signals.
Let and denote the raw linear acceleration and angular velocity measurements from a specific Leg-IMU (denoted as frame ). Motion-induced variations are isolated from the gravity vector via compensation: . Defining the kinematic measurement vector as , we employ a Gaussian kernel to model the underlying measurement distribution. Under this formulation, the KDE evaluates the probability that the deviation of axis falls within a predefined static bandwidth :
is the standard normal CDF and is the sensor noise.
The joint contact probability for the l-th leg, , is aggregated as . A new keyframe is instantiated at time according to the event :
where K triggers the structural update of the factor graph and the concurrent insertion of kinematic-inertial constraints.
C. IMU Preintegration Factor
Consecutive keyframes and , triggered by the KDE-based inference, are constrained by high-frequency inertial measurements using on-manifold preintegration factor [17]. For a sensor frame , assuming constant biases and between two consecutive frames, the rotation, velocity, and position increments are propagated as:
The residual is constructed by comparing these increments with the manifold states. The orientation, velocity, and position residuals are defined as:
where . The full IMU residual concatenates these terms with the bias random walk:
denotes the bias change between keyframes. First-order Jacobians are employed to update the preintegrated measurements during optimization without reintegration.
D. ZUPT Factor
The ZUPT factor enforces a zero-velocity constraint on the actual contact point f in the world frame W. To bridge

Fig. 2. Topology of the LAG-IO factor graph and sensor frames. Local moving frames follow the Front-Right-Down (FRD) convention. IMU preintegration factors (yellow squares) continuously constrain all body (pink circles) and leg (blue circles) states within the sliding window. Conversely, at each keyframe, relative position (green squares) and zero-velocity (blue squares) factors are applied exclusively to the specific detected contact legs. For instance, at keyframe k, these constraints are added to only a single active stance leg.
the kinematic gap between the Leg-IMU center and the contact interface , we account for the lever arm within the foot structure.
In our framework, the velocity of the contact point is modeled as a zero-velocity pseudo-measurement corrupted by Gaussian noise . The kinematic relationship is defined as:
is the raw angular velocity from the Leg-IMU, and is the corresponding gyroscope bias state at keyframe .
Under the contact event K, the zero-velocity residual is formulated as the difference between the IMU-inferred velocity and the noise-perturbed observation:
By integrating this residual into the factor graph, the ZUPT constraint effectively suppresses the velocity drift of the Leg-IMUs, ensuring that the local rotation of the foot is correctly propagated to the global velocity.
E. Kinematic RelPos Factor
The RelPos factor establishes a spatial constraint between the body center and the Leg-IMU utilizing the robot's forward kinematics.
Let denote the raw joint encoder measurements. The relative position of the Leg-IMU with respect to the body, expressed locally in the body frame , is obtained via the forward kinematics function as a pseudo-measurement:
Concurrently, based on the manifold states being optimized, this local relative position can be analytically predicted. Given the position states of the Leg-IMU and the body in the world frame , alongside the body's orientation state , the predicted relative position is:
To account for joint sensing noise and mechanical tolerances, the kinematic observation is modeled with an additive Gaussian white noise term . The translational residual is formulated as the discrepancy between the IMU-predicted relative position and the kinematics-measured relative position:
By enforcing this positional residual, the RelPos factor resolves the observability ambiguity in a multi-IMU system. Specifically, when a leg enters the swing phase and loses its ZUPT constraint, its IMU biases become unobservable and prone to rapid drift. Managing thirty concurrent bias states across five IMUs would otherwise lead to severe divergence. The RelPos factor mitigates this by kinematically anchoring the airborne leg to the main body. Since the body state is continuously bounded by the active stance legs, this structural coupling implicitly transfers global observability to the swinging leg, bounding its bias random walk. Thus, compared to a standard single-body kinematic model, the RelPos factor ensures that capturing local high-frequency dynamics does not compromise overall estimation stability.
F. Maximum A Posteriori Estimation
The proposed state estimation is fundamentally formulated as a Maximum A Posteriori (MAP) inference over a sliding window of states . Under the assumption of zero-mean Gaussian noise, this is equivalent to minimizing a non-linear least-squares objective defined by the sum of the squared Mahalanobis distances of all factor residuals.
As illustrated in Fig. 2, to accurately reflect our graph topology, let represent the dynamic subset of active stance legs registering a stable contact at keyframe . The unified objective function is formulated as:
where denotes the marginalization prior. This mathematical formulation describes our system architecture: preintegration constraints are instantiated for all continuous inertial nodes to maintain global temporal continuity, while zero-velocity measurements and relative position constraints are exclusively applied to the active stance legs .
The robustness of this hardware-deployed optimization relies on the physically grounded covariance matrices :
• Preintegration Covariance ( ) is propagated analytically from continuous-time sensor noise. Crucially, the accelerometer noise density for the Leg-IMUs is inflated relative to the Body-IMU. This design absorbs severe, high-frequency impact shocks during touchdown, preventing transient spikes from dominating the local inertial propagation.
- ZUPT Covariance is dynamically scaled based on the continuous KDE contact probability instead of an empirical value. A simple exponential mapping is employed to inflate the nominal firm-contact covariance as the contact probability decreases:
where is a positive scaling hyperparameter. High confidence tightens the covariance to firmly anchor the stance foot, whereas lower probabilities proportionally inflate the uncertainty to accommodate minor slip or soft-ground deformation.
- Kinematic RelPos Covariance encodes the inherent structural uncertainty in the forward kinematics map , effectively mitigating the impact of joint encoder noise and mechanical lever-arm tolerances.
This unified MAP objective is continuously optimized using an incremental fixed-lag smoother [18]. Real-time onboard execution is ensured by systematically marginalizing old states outside the sliding window via the Schur complement, condensing their structural information into the prior term . By weighting the residuals through these properly determined covariance profiles, the factor graph seamlessly fuses high-bandwidth inertial readings with kinematically anchored pseudo-measurements to provide consistent and robust state estimation.

Fig. 3. The experimental platform and hardware payload deployed in an unstructured environment (offroad). The Unitree Go2 quadruped robot is equipped with a custom multi-IMU suite, a Raspberry Pi for onboard data logging, and a GNSS antenna for ground truth acquisition.
IV. EXPERIMENTS
This section evaluates the proposed LAG-IO framework using a publicly available real-world legged locomotion dataset. The subsequent evaluations substantiate two primary claims: first, the proposed multi-IMU graph optimization exhibits competitive state estimation accuracy against the evaluated baselines; second, the probabilistic contact detection mechanism cooperates with the graph backend to facilitate
TABLE I OVERALL TRAJECTORY ESTIMATION ACCURACY
| Sequence | Method | APE Trans. (m) | RPE Trans. (%) |
|---|---|---|---|
| Parking lots | LegOdom | 2.95 | 1.02 |
| Foot-INS | 4.35 | 4.32 | |
| DogLegs | 3.04 | 1.74 | |
| LAG-IO | 2.80 | 1.24 | |
| Asphalt road | LegOdom | 2.73 | 1.42 |
| Foot-INS | 4.85 | 4.40 | |
| DogLegs | 3.08 | 1.94 | |
| LAG-IO | 1.93 | 1.27 | |
| Construction site | LegOdom | 2.17 | 0.66 |
| Foot-INS | 1.12 | 4.04 | |
| DogLegs | 0.97 | 0.85 | |
| LAG-IO | 0.34 | 0.52 | |
| Offroad | LegOdom | 2.54 | 2.81 |
| Foot-INS | 1.86 | 3.81 | |
| DogLegs | 1.71 | 1.09 | |
| LAG-IO | 1.23 | 0.63 |
- APE and RPE denote the overall translational absolute pose error and relative pose error evaluated via evo [19].
TABLE II PLANAR TRAJECTORY ESTIMATION ACCURACY
| Sequence | Method | APE Trans. (m) | RPE Trans. (%) |
|---|---|---|---|
| Parking lots | DogLegs | 1.19 | 1.43 |
| LAG-IO | 0.88 | 1.16 | |
| Asphalt road | DogLegs | 2.14 | 1.56 |
| LAG-IO | 0.91 | 0.95 | |
| Construction site | DogLegs | 0.68 | 0.64 |
| LAG-IO | 0.24 | 0.43 | |
| Offroad | DogLegs | 0.87 | 0.88 |
| LAG-IO | 1.03 | 0.56 |
- APE and RPE in this table are evaluated exclusively on the horizontal plane (XY) to eliminate the influence of unobservable vertical drift.
smoother trajectory transitions during unstable foot-ground interactions. Additionally, the computational efficiency of the system is analyzed to verify its real-time viability.
A. Experimental Setup
The proposed LAG-IO framework is evaluated using the dataset collected from the DogLegs [13]. As illustrated in Fig. 3, the experimental platform is a Unitree Go2 quadruped robot equipped with a primary body-mounted IMU and four Leg-IMUs attached to the lower legs, close to the foot contact points. All inertial measurements rely on low-cost commercial ICM20602 sensor(3 US dollars). Both the IMU streams and joint encoder data are recorded at a nominal frequency of via an onboard Raspberry Pi. Spatial extrinsics among the sensor frames and the kinematic chain are calibrated prior to data collection. For quantitative evaluation, the reference ground-truth trajectories are provided by a smoothed post-processed kinematic (PPK) GNSS/IMU integrated navigation system.
The dataset includes several outdoor scenes, namely an asphalt road, parking lots, a construction site, an offroad trail, and a grassy terrain. The robot operated in a standard walking gait across all sequences, traversing typical real-
TABLE III ATTITUDE ESTIMATION ACCURACY (RMSE / MAX IN DEGREES)
| Sequence | Method | Roll (°) | Pitch (°) | Yaw (°) |
|---|---|---|---|---|
| Parking lots | LegOdom | 1.51 / 3.48 | 1.03 / 3.50 | 14.69 / 21.75 |
| DogLegs | 0.62 / 1.24 | 0.42 / 1.42 | 10.03 / 16.92 | |
| LAG-IO | 0.73 / 1.85 | 0.77 / 2.88 | 7.04 / 12.48 | |
| Asphalt road | LegOdom | 0.69 / 1.88 | 0.83 / 2.28 | 10.05 / 16.01 |
| DogLegs | 0.77 / 1.98 | 0.78 / 2.04 | 10.45 / 17.85 | |
| LAG-IO | 0.67 / 1.89 | 0.86 / 2.38 | 7.24 / 12.66 | |
| Construction site | LegOdom | 0.68 / 1.67 | 0.94 / 1.95 | 3.93 / 6.06 |
| DogLegs | 0.68 / 1.63 | 1.07 / 1.92 | 1.40 / 3.03 | |
| LAG-IO | 0.61 / 1.69 | 0.57 / 1.76 | 0.99 / 3.81 | |
| Offroad | LegOdom | 0.91 / 1.90 | 0.64 / 1.73 | 29.33 / 33.17 |
| DogLegs | 0.50 / 1.29 | 0.87 / 1.98 | 1.68 / 3.70 | |
| LAG-IO | 0.46 / 1.32 | 0.85 / 1.98 | 1.99 / 5.70 |

(a) Parking lots
(b) Asphalt road
(c) Construction site
(d) Offroad
Fig. 4. Top-down planar trajectory estimates from the DogLegs dataset across four scenarios: parking lots, asphalt road, construction site, and offroad. Overall, the proposed LAG-IO (red) maintains closer alignment with the GNSS-PPK ground truth (black) compared to the baseline (blue), which exhibits accumulated drift in certain regions.

(a) Construction site (3D)
(b) Offroad (3D)
Fig. 5. Vertical trajectory profiles for the construction site and offroad scenarios. Both methods inevitably exhibit Z-axis drift, with the proposed LAG-IO (red) maintaining a relatively milder elevation divergence compared to the DogLegs baseline (blue).
world environments with natural terrain variations. Due to severe GNSS signal occlusion by surrounding trees and buildings, absolute ground truth is unavailable for the grass sequence; instead, the estimation drift is evaluated using the loop-closure error when the robot returns to its starting location.
B. State Estimation Performance
We evaluate the state estimation performance of the proposed LAG-IO framework against three existing proprioceptive estimators:
-
LegOdom. The traditional EKF-based leg odometry using a body-mounted IMU and joint encoders [3].
-
Foot-INS. A single foot-mounted IMU-based localization system [20].
-
DogLegs. A tightly-coupled multi-IMU EKF baseline that fuses a body IMU, leg IMUs, and forward kinematics [13].
Since the optimization and marginalization mechanisms yield a sparser state trajectory for the graph, both the ground truth and the baseline trajectories are downsampled to align with the graph's timestamps prior to evaluation.
Fig. 4 and Fig. 5 present the top-down planar trajectories and vertical profiles, respectively. To maintain visual clarity, we illustrate the proposed LAG-IO alongside the most competitive multi-IMU baseline, DogLegs. Certain sequences exhibit initial heading deviations caused by slightly inaccurate attitude and IMU bias calibrations during the stationary initialization. Furthermore, due to the lack of absolute elevation referencing, all methods experience Z-axis drift. Despite this, LAG-IO demonstrates relatively milder elevation divergence and maintains higher geometric fidelity to the ground truth. This mitigated vertical drift is primarily attributed to the RelPos factors establishing a tightly constrained kinematic chain.
For quantitative evaluation, Tab. I and Tab. II report the overall and planar translational absolute and relative pose errors (APE and RPE) evaluated via evo [19]. As unobservable vertical drift inflates the overall spatial errors, the isolated planar metrics in Tab. II provide a clearer assessment of odometry performance. By iteratively re-optimizing the relative position constraints within the sliding window, our framework effectively suppresses the multi-directional drift of foot IMUs, resulting in superior tracking accuracy.
Moving to orientation performance, Tab. III details the attitude estimation accuracy. All evaluated frameworks demonstrate comparable, sub-degree accuracy in observable roll and pitch states, which are globally constrained by gravity. Regarding the unobservable heading state, LAG-IO maintains highly competitive orientation accuracy alongside the baselines.
Finally, Fig. 6 illustrates the estimation performance on a grassy terrain lacking GNSS references. In this scenario, the robot navigates a long loop over a slip-prone surface. The accumulated drift is quantified by the loop-closure distance upon returning to the start. DogLegs finishes with a terminal error of , whereas LAG-IO achieves a residual error of only , validating its dead-reckoning reliability in perceptually degraded environments.

Fig. 6. Trajectory evaluation in the GNSS-denied grass scenario. The proposed LAG-IO achieves a final loop-closure error of 0.04 m, outperforming the DogLegs baseline.
C. Impact of Probabilistic Contact Detection
We evaluate the impact of the probabilistic contact formulation using the asphalt road sequence. As illustrated in Fig. 7a, this scenario features a long and narrow path terminating in sharp maneuvers, where unstable foot-ground slipping is highly likely to occur while turning.
As highlighted in the enlarged detail of Fig. 7b, the DogLegs baseline exhibits localized trajectory jitters and geometric fluctuations during the sharp turn. In contrast, LAG-IO effectively mitigates these distortions, tracking the ground truth smoothly. The temporal subplots (Fig. 7c) reveal the adaptive mechanism driving this improvement. During high-frequency impacts or micro-slips, traditional force sensors may still report high-magnitude readings, erroneously triggering rigid ZUPT constraints that inject bad information. At the exact timestamps where the baseline jitters (dashed boxes), force data indicates active contact, yet the KDE-based probability noticeably drops. This transient loss of stability is precisely what binary force detection fails to capture.
Within the LAG-IO framework, this lower probability is utilized to scale the covariance of the ZUPT factors to decrease their confidence. Consequently, the factor graph relaxes the stationarity constraint and allows the optimization to rely more on inertial measurements and relative kinematics to bridge the unstable transition. Since the robot maintained a consistent walking gait throughout the dataset, the bandwidth parameter was kept constant. Tuning for vastly different vibration profiles in dynamic gaits (e.g., trotting), alongside quantitatively analyzing contact stability using high-frequency motion capture references, remains a primary focus for our future research.
D. Computational Efficiency
This section analyzes the computational efficiency of the proposed LAG-IO. All experiments were conducted on a computational platform equipped with an Intel i7-14650HX CPU and 32 GB of RAM, with the processor configured to a clock frequency of 2.20 GHz. To evaluate the real-time performance, all algorithmic modules were executed in a persistent process using a single computation thread.
The Factor Creation stage, responsible for constructing multi-IMU preintegration, KDE-scaled ZUPT, and kinematic RelPos constraints, requires an average computation time of 0.15 ms per keyframe. The Optimization & Marginalization process is performed via the iSAM2 incremental solver within a fixed-lag sliding window. Specifically, the smoother marginalizes old states based on their timestamps with a lag threshold of 0.2 s, maintaining an active optimization window of approximately 10 keyframes. This combined optimization step takes 4.67 ms on average. Since the graph optimization is not triggered for every incoming high-frequency IMU frame, the overall framework achieves an average processing time of 1.67 ms per IMU measurement. These results demonstrate that the proposed system is capable of reliably operating at a processing frequency exceeding 200 Hz, fully satisfying the real-time requirements for proprioceptive state estimation on legged robots.
V. CONCLUSION
This paper presented LAG-IO, a tightly-coupled factor graph optimization framework for multi-IMU proprioceptive state estimation in legged robots. By migrating the sensor fusion architecture from traditional recursive filtering to a sliding-window graph backend, our approach addresses the limitations associated with fixed linearization points. To handle unstable foot-ground interactions, we integrated a continuous probabilistic contact detection module based on kernel density estimation. This mechanism adaptively scales the zero-velocity constraints, relaxing them during microslips to prevent the injection of erroneous kinematic updates. Furthermore, kinematic relative position factors were formulated to structurally anchor the independent leg inertial states to the robot's main body.
Experiments demonstrated that, compared to the evaluated baselines, LAG-IO achieves higher planar trajectory accuracy, reduces unobservable vertical divergence, and provides smoother trajectory transitions during unstable contacts, while maintaining competitive attitude observability. Future research will focus on a more exhaustive exploration of the adaptive probability mapping utilizing high-frequency motion capture references, alongside the integration of exteroceptive perception (e.g., vision or LiDAR) to achieve resilient autonomous navigation in unstructured environments.
ACKNOWLEDGMENT
We thank Dr. Yibin Wu for his assistance in running DogLegs and helpful discussion on the experiments.
REFERENCES
[1] S. Zhao, S. Zhou, Y. Zhang, J. Zhang, C. Wang, W. Wang, and S. Scherer, “Resilient odometry via hierarchical adaptation,” Science Robotics, vol. 10, no. 109, p. eadv1818, 2025.
[2] W. Kuang, X. Zhao, Y. Shen, C. Wen, H. Lu, Z. Zhou, and X. Chen, "Reslpr: A lidar data restoration network and benchmark for robust place recognition against weather corruptions," in Proc. of the IEEE/RSJ Intl. Conf. on Intelligent Robots and Systems (IROS), 2025.
[3] M. Bloesch, M. Hutter, M. A. Hoepflinger, S. Leutenegger, C. Gehring, C. D. Remy, and R. Siegwart, “State estimation for legged robots-consistent fusion of leg kinematics and imu,” in Proc. of Robotics: Science and Systems (RSS), The MIT Press, 2013.

(a) Asphalt road
(b) Enlarged detail
(c) Contact results
Fig. 7. Visualization of contact detection results during a trajectory jitter event on the asphalt road sequence. (a) Full 2D trajectory. (b) Enlarged detail highlighting localized estimation jitters and fluctuations in the baseline. (c) Temporal contact detection subplots: foot force (top), baseline likelihood ratio test (middle), and KDE-based probability (bottom). The red dots indicate contact triggers thresholded by these three mechanisms. The dashed box in (c) illustrates the specific contact probability conditions corresponding to the trajectory jitter boxed in (b), revealing a drop in contact stability.
[4] R. Hartley, M. Ghaffari, R. M. Eustice, and J. W. Grizzle, “Contact-aided invariant extended kalman filtering for robot state estimation,” Intl. Journal of Robotics Research (IJRR), vol. 39, no. 4, pp. 402–430, 2020.
[5] D. Wisth, M. Camurri, and M. Fallon, “Robust legged robot state estimation using factor graph optimization,” IEEE Robotics and Automation Letters (RA-L), vol. 4, no. 4, pp. 4507–4514, 2019.
[6] J. Wahlström and I. Skog, “Fifteen years of progress at zero velocity: A review,” IEEE Sensors Journal, vol. 21, no. 2, pp. 1139–1151, 2020.
[7] Y. Kim, B. Yu, E. M. Lee, J.-h. Kim, H.-w. Park, and H. Myung, “Step: State estimator for legged robots using a preintegrated foot velocity factor,” IEEE Robotics and Automation Letters (RA-L), vol. 7, no. 2, pp. 4456–4463, 2022.
[8] W. Liu, D. Caruso, E. Ilg, J. Dong, A. I. Mourikis, K. Daniilidis, V. Kumar, and J. Engel, “Tlio: Tight learned inertial odometry,” IEEE Robotics and Automation Letters (RA-L), vol. 5, no. 4, pp. 5653–5660, 2020.
[9] R. Buchanan, M. Camurri, F. Dellaert, and M. Fallon, “Learning inertial odometry for dynamic legged robot state estimation,” in Proc. of the Conf. on Robot Learning (CoRL), pp. 1575–1584, PMLR, 2022.
[10] Y. Gu, Z. Liu, and T. Zou, “Enhancing leg odometry in legged robots with learned contact bias: An lstm recurrent neural network approach,” in Proc. of the IEEE/RSJ Intl. Conf. on Intelligent Robots and Systems (IROS), pp. 6832–6839, IEEE, 2024.
[11] S. Lee, H.-B. Kim, and K.-S. Kim, “Legged robot state estimation using invariant neural-augmented kalman filter with a neural compensator,” in Proc. of the IEEE/RSJ Intl. Conf. on Intelligent Robots and Systems (IROS), pp. 15445–15452, IEEE, 2025.
[12] S. Yang, Z. Zhang, B. Bokser, and Z. Manchester, “Multi-imu proprioceptive odometry for legged robots,” in Proc. of the IEEE/RSJ Intl. Conf. on Intelligent Robots and Systems (IROS), pp. 774–779, IEEE, 2023.
[13] Y. Wu, J. Kuang, S. Khorshidi, X. Niu, L. Klingbeil, M. Bennewitz, and H. Kuhlmann, “Doglegs: Robust proprioceptive state estimation for legged robots using multiple leg-mounted imus,” in Proc. of the IEEE/RSJ Intl. Conf. on Intelligent Robots and Systems (IROS), pp. 8856–8863, IEEE, 2025.
[14] L. Hohmeyer, M. Popescu, I. Bergonzani, D. Mronga, and F. Kirchner,
“Inekformer: A hybrid state estimator for humanoid robots,” in Proc. of the Int. Conf. on Advanced Robotics (ICAR), pp. 833–840, IEEE, 2025.
[15] M. Camurri, M. Fallon, S. Bazeille, A. Radulescu, V. Barasuol, D. G. Caldwell, and C. Semini, “Probabilistic contact estimation and impact detection for state estimation of quadruped robots,” IEEE Robotics and Automation Letters (RA-L), vol. 2, no. 2, pp. 1023–1030, 2017.
[16] M. Maravgakis, D.-E. Argiropoulos, S. Piperakis, and P. Trahanias, “Probabilistic contact state estimation for legged robots using inertial information,” arXiv preprint arXiv:2303.00538, 2023.
[17] C. Forster, L. Carlone, F. Dellaert, and D. Scaramuzza, “On-manifold preintegration for real-time visual–inertial odometry,” IEEE Trans. on Robotics (TRO), vol. 33, no. 1, pp. 1–21, 2016.
[18] M. Kaess, H. Johannsson, R. Roberts, V. Ila, J. J. Leonard, and F. Dellaert, “isam2: Incremental smoothing and mapping using the bayes tree,” Intl. Journal of Robotics Research (IJRR), vol. 31, no. 2, pp. 216–235, 2012.
[19] M. Grupp, “evo: Python package for the evaluation of odometry and slam.” https://github.com/MichaelGrupp/evo, 2017.
[20] X. Niu, T. Liu, J. Kuang, Q. Zhang, and C. Guo, “Pedestrian trajectory estimation based on foot-mounted inertial navigation system for multistory buildings in postprocessing mode,” IEEE Internet Things J., vol. 9, no. 9, pp. 6879–6892, 2022.