TRACE: Learned Proprioceptive Odometry for Legged Robots under Unreliable Contact Conditions

arXiv:2608.05975 · cs.RO, cs.AI · Submitted 2026-08-06 · Read on arXiv

Taehyeon Kong, Woojin Kim, Jemin Hwangbo

Korea Advanced Institute of Science and Technology

cs.RO, cs.AI

Submitted: 2026-08-06

Comments: 8 pages, 7 figures. Submitted to IEEE Robotics and Automation Letters (RA-L)

License: http://creativecommons.org/licenses/by/4.0/

Importance score: 72/100

The gist: The paper presents TRACE (Tokenized Robust Attention for Contact-Aware Estimation), an end-to-end learned proprioceptive odometry estimator for legged robots operating under unreliable contact

Terminology

Summary

The paper presents TRACE (Tokenized Robust Attention for Contact-Aware Estimation), an end-to-end learned proprioceptive odometry estimator for legged robots operating under unreliable contact conditions. The authors are Taehyeon Kong, Woojin Kim, and Jemin Hwangbo from the Korea Advanced Institute of Science and Technology (KAIST). The work was submitted to IEEE for possible publication.

The paper addresses the challenge of reliable state estimation for legged robots, noting that "Existing approaches often use exteroceptive sensors such as cameras, LiDAR, and GPS to provide geometric or global information [2]. However, these sensors can degrade under poor illumination, motion blur, textureless scenes, adverse weather, or indoor and occluded environments [3], [4]. Proprioceptive odometry instead estimates ego-motion using onboard inertial and joint sensors, but accurate proprioceptive odometry remains challenging because noisy measurements and unreliable foot–ground contacts caused by slip, compliant or deformable terrain, and foot rolling can introduce persistent estimation errors that accumulate into substantial drift over time."

Classical filtering-based estimators (especially IEKF-based approaches) assume that stance feet have zero velocity relative to the ground, but accurate contact state is not directly observable and must be inferred from proprioceptive measurements. These methods often require carefully tuned thresholds and may become inaccurate under complex terrain or dynamic locomotion, and their reliance on manually tuned covariance settings also makes it difficult to maintain robust performance across diverse terrains and locomotion conditions.

Learning-based approaches are reviewed: hybrid methods such as Lin et al.'s learned contact estimates for IEKF, Youm et al.'s NMN-IEKF, Sun et al.'s CNN-based slip detector, Lee and Kim's AttenNKF, and Seo et al.'s GAIT remain coupled to filter backends and, depending on the method, may also require explicit contact or slip estimates and manually defined thresholds. In contrast, purely learning-based methods like Legolas "directly predict the robot's odometry from IMU and leg histories without analytical kinematic models or filter-based physical constraints. The absence of such constraints can make the estimator more vulnerable to out-of-distribution motions and contact conditions, which can lead to large drift and estimation errors."

The paper lists four main contributions:

  • Formulating quadruped proprioceptive odometry as an end-to-end learning problem that directly predicts relative motion and body-frame velocity from proprioceptive history.

  • Developing a contact-aware estimator that couples foot-aware cross-attention with physics-inspired auxiliary objectives to downweight unreliable leg information without explicit contact or slip thresholds.

  • Introducing a two-stage sim-to-real pipeline combining policy-randomized simulation pretraining with partial real-world fine-tuning using a closed-loop relative-error objective.

  • Demonstrating consistent reductions in position drift over filtering-based, hybrid, and purely learning-based baselines across diverse indoor and outdoor terrains.

The estimator receives a temporal window of proprioceptive observations with T = 30. The observation at each time step is:


ot = [ω t, a t, q t, q̇ t, τ t, θ̂ r,t−1, θ̂ p,t−1, v̂ x,t−1, v̂ y,t−1, Δt t] ∈ R 47

This includes IMU angular velocity ω t, linear acceleration a t, joint positions q t, joint velocities q̇ t, target joint torques τ t, previous roll/pitch estimates, previous horizontal velocity estimates, and the sampling interval. During training, previous estimates are replaced with noisy ground-truth values obtained from simulation, whereas the estimator's previous outputs are used during fine-tuning and deployment.

The network outputs a 9-dimensional prediction: [Δp̂ t, Δθ̂ t, v̂ t] comprising body-frame relative displacement, relative rotation in Lie algebra representation, and body-frame linear velocity.

The architecture consists of four components:

  1. Proprioceptive query CNN: a temporal CNN encodes recent body-motion signals into a compact query feature Q t using two 1D convolutional layers, temporal pooling, linear projection, and layer normalization.

  2. Foot-aware cross-attention module: attends to six sensor tokens constructed from the current proprioceptive measurements: linearly embedded acceleration and gyroscope tokens and four leg tokens. Each leg token embeds joint position, joint velocity, target joint torque, and a one-hot leg ID. A two-head cross-attention mechanism computes weights, allowing the network to adaptively emphasize different IMU and leg features depending on the current locomotion condition.

  3. GRU temporal encoder with hidden dimension 128.

  4. MLP prediction head with hidden dimensions [256, 128].

During deployment, a ZUPT-inspired output clamp sets the predicted motion to zero when the angular and joint velocities are small and the measured acceleration is close to gravity, thereby suppressing stationary drift.

The total objective combines three losses: L = w est L est + w model L model + w foot L foot.

  1. Estimation Loss (L est): Direct supervision of predicted displacement, rotation, and velocity using Smooth L1 loss.

  2. Kinematic Model Consistency Loss (L model): encourages consistency between the predicted displacement and the displacement reconstructed from predicted velocity using trapezoidal integration.

  3. Foot Velocity Loss (L foot): This loss addresses the issue that foot rolling shifts the instantaneous contact location even in the absence of slip and can lead to displacement underestimation. The loss computes contact-point velocity incorporating foot kinematics, contact normals, and the foot-to-contact offset. It is weighted by leg attention: "The objective penalizes large contact-point velocities in proportion to leg attention, encouraging reliance on kinematically reliable legs. The stop-gradient on A t prevents trivial loss reduction through collapse of the total leg attention."

To address overfitting to a single locomotion policy, the paper introduces policy randomization (PR): the action scale is sampled as 0.1 × U(0.7, 1.2) rad, the action mean is perturbed by a Gaussian bias sampled from N(0, (0.006 rad)2), and the target actions are low-pass filtered using a coefficient α ∼ U(0, 0.6). This diversifies foot-contact timing, step length, impact profiles, and body-motion distributions even under similar velocity commands, reducing dependence on the training policy.

After simulation pretraining, the estimator is fine-tuned on real-world outdoor trajectories (six FAST-LIO2-based 150 s training logs: three on grass, three on flat ground). Only the state GRU and MLP head are updated while the CNN query encoder and attention module are frozen to reduce overfitting. The fine-tuning uses a 1 s-window relative error objective instead of per-step supervision and includes L2-SP regularization that penalizes deviation from the simulation-pretrained weights. The model consistency loss is retained during fine-tuning, but Direct velocity supervision is excluded because real-world velocity labels are noisy and empirically did not improve performance.

The estimator is evaluated on a quadruped robot Raibo2 with IMU and joint encoders at 500 Hz. Indoor evaluation covers flat, rough, slippery, and soft terrains with Vicon ground-truth trajectories; outdoor evaluation covers grass, hard ground, stairs, and a full course with FAST-LIO2 reference trajectories. The proposed estimator's inference latency is 0.2774 ± 0.0188 ms per step on an Intel Core Ultra 7 255H CPU, sufficient for 500 Hz operation.

Baselines include:

  • IEKF-SR: a classic GRF contact-aided IEKF with slip rejection

  • Legolas: a purely learning-based odometry estimator trained in the same simulation environment

  • NMN-IEKF: a hybrid estimator that uses network-predicted contact probabilities and body-frame linear velocity within an IEKF

Metrics include absolute trajectory error (ATE) and 10-second relative error (RE) for position, velocity, and orientation.

the learned attention strongly aligns with contact state: the highest-attention foot is in contact in 96.21% of samples, and contact feet receive substantially higher mean and median attention than swing feet. The attention score distinguishes contact from swing with an AUC of 0.9637. Furthermore, attention decreases rapidly as contact-point velocity increases, indicating the foot velocity loss shapes attention into a soft reliability measure that downweights contact information contaminated by slip, deformation, or transient contact dynamics.

The proposed estimator achieves the lowest position and orientation errors across all terrain conditions. Compared with the strongest baseline per terrain, the proposed method reduces the position ATE by 50.7%, 39.2%, 44.1%, and 53.8% on flat, rough, slippery, and soft terrains, respectively, with 10-second position RE reductions of 30.0%, 50.9%, 39.9%, and 26.4%. The gains are especially meaningful on soft terrain, where the unmodeled foot sinkage and terrain deformation violate rigid-contact assumptions.

On the full outdoor course, TRACE achieves the lowest mean 10-s position RE and P90, reducing them by 37.4% and 30.7% relative to the strongest baseline, respectively. Terrain-wise, it reduces position ATE by 17.0%, 43.3%, and 63.2% on grass, hard ground, and stairs, respectively, and reduces mean 10-s position RE by 51.9%, 33.1%, and 3.2%. The substantial RE improvement on grass demonstrates robustness to compliant and deformable contacts, while the large ATE reduction on stairs indicates improved consistency under repeated impacts and rapid elevation changes.

Removing L model increases mean position and velocity ATE by 28.4% and 28.8% respectively. Adding L foot to the variant without both losses reduces the mean position ATE and RE by 83.8% and 87.0%, respectively, and the velocity ATE and RE by 30.5% and 48.5%, accompanied by a reduction in mean swing-foot attention from 0.0452 to 0.0060, confirming the losses provide complementary benefits.

The model without PR performs marginally better on the seen policy, whereas the proposed model achieves lower mean error and lower standard deviation across all unseen policies. Averaged over three unseen policies, policy randomization reduces the 10-s position RE from 0.5076 to 0.3516 m, corresponding to a 30.7% reduction. In zero-shot indoor evaluation, PR-trained model achieves mean 10-s position RE of 0.0907 m vs 0.1098 m without PR.

Partial fine-tuning (updating only GRU and MLP head) achieves lower position ATE across all indoor terrains compared to both w/o FT and full-network fine-tuning (Full FT). Compared to Full FT, the proposed partial fine-tuning strategy reduces the position ATE on slippery (48.7%) and soft (43.6%) terrains significantly, demonstrating that full-network fine-tuning overfits to the training distribution, whereas partial fine-tuning better preserves simulation-learned representations and generalizes to unseen contact conditions. Compared with Legolas-FT, the proposed estimator reduces the position ATE and RE by 73.8% and 61.8%, respectively, while using only 0.2M parameters versus Legolas's 1.4M.

The paper concludes that TRACE directly predicts relative motion and body-frame velocity without a filtering backend or manually defined contact and slip thresholds. The experiments demonstrate improved position accuracy over filtering-based, hybrid, and purely learning-based baselines. The ablation studies "further demonstrate that the auxiliary losses improve physical consistency, policy randomization enhances generalization to unseen locomotion policies and real-world conditions, and partial fine-tuning reduces the sim-to-real gap while preserving generalization to diverse terrains. Future work includes explicit IMU bias estimation and uncertainty prediction for improved long-horizon accuracy and extending the framework to other legged platforms, such as humanoid robots with different foot geometries and contact dynamics."

Improvements for AI systems

Improvements to AI systems:

  • Add contact-aware cross-attention over leg and IMU tokens. Instead of explicit contact classification or slip thresholds, the AI system learns to attend most strongly to feet that are actually planted and downweight legs with high contact-point velocity. This makes the system robust to slip, foot rolling, and deformable terrain without manual tuning.

  • Enforce physical consistency with a kinematic model loss. The AI system is trained to produce displacement predictions that agree with trapezoidal integration of its predicted body-frame velocity, reducing drift caused by inconsistent motion estimates.

  • Add a foot-velocity auxiliary loss weighted by leg attention. Penalize large contact-point velocity in proportion to attention, with stop-gradient on attention, so the network learns to rely on kinematically reliable legs while preventing attention collapse.

  • Apply policy randomization during simulated pretraining. Randomize action scale, action bias, and command low-pass filtering so the estimator generalizes to unseen locomotion policies and real-world motion distributions rather than overfitting to one gait.

  • Use partial real-world fine-tuning with relative-error objective and L2-SP. Freeze the CNN query encoder and attention module, update only the GRU and MLP head, and train on a 1-second-window relative error with regularization toward pretrained weights. This reduces sim-to-real gap while preserving generalized feature representations.

  • Add a ZUPT-inspired output clamp. Suppress predicted motion when angular velocity, joint velocity, and acceleration indicate the robot is stationary, eliminating stationary drift.

  • Combine these into a filter-free end-to-end estimator. Remove reliance on IEKF backends, manually tuned noise covariances, and contact thresholds, making the system simpler and more adaptive.

What the improved AI system can do:

  • Estimate legged-robot ego-motion from only IMU, joint encoders, and target torques — no cameras, LiDAR, GPS, or external infrastructure.

  • Run at 500 Hz on a standard CPU with ~0.28 ms inference latency, suitable for real-time control loops.

  • Achieve consistently lower position drift and orientation error than filtering-based IEKF, hybrid NMN-IEKF, and purely learning-based Legolas baselines.

  • Maintain accuracy on flat, rough, slippery, and soft terrain, including unmodeled foot sinkage and deformation.

  • Reduce position ATE by 39–54% indoors relative to strongest baseline per terrain, and by up to 63% on outdoor stairs/grass.

  • Generalize to unseen locomotion policies without retraining, reducing 10-second position RE by ~31% across unseen policies.

  • Avoid overfitting during real-world fine-tuning, preserving robustness to unseen contact conditions better than full-network fine-tuning.

  • Learn implicit contact reliability: highest-attention foot is in contact in 96.21% of samples, and attention gives 0.9637 AUC for distinguishing stance vs. swing.

Abstract

In this paper, we present TRACE (Tokenized Robust Attention for Contact-Aware Estimation), an end-to-end learned proprioceptive odometry estimator for legged robots under unreliable contact conditions. The proposed estimator directly predicts relative displacement, relative rotation, and body-frame velocity from a recent history of onboard inertial and joint measurements. To improve robustness under unreliable contact conditions, we introduce a foot-aware cross-attention module that adaptively weights IMU and leg-wise kinematic tokens without relying on manually defined contact or slip thresholds. The estimator is trained with direct supervision and two physics-inspired auxiliary losses that promote kinematic consistency and reliable use of leg information. To reduce policy-specific overfitting and consequently improve sim-to-real transfer, simulation training incorporates policy randomization, followed by partial real-world fine-tuning of the temporal encoder and prediction head. Experiments across diverse indoor and outdoor terrains demonstrate consistent reductions in position drift compared with classical filtering-based, hybrid, and purely learning-based baselines. Ablation studies further validate the contributions of the proposed training objectives, policy randomization, and real-world fine-tuning, particularly under unreliable contacts and sim-to-real mismatch.

Sources

Related papers