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

Robotics.world

> Legged robots need to know where they are, and on-board cameras, LiDAR, or GPS often fail indoors, in poor lighting, in bad weather, or in cluttered scenes.

**arXiv**: 2608.05975 · Preprint · not peer-reviewed

**Published**: 2026-08-06

**Authors**: Taehyeon Kong, Woojin Kim, Jemin Hwangbo

## In plain words

Legged robots need to know where they are, and on-board cameras, LiDAR, or GPS often fail indoors, in poor lighting, in bad weather, or in cluttered scenes. Proprioceptive odometry — using only the IMU and joint encoders — is the fallback, but it drifts badly when feet slip, sink into soft ground, or roll rather than stay planted, because classical filters assume stance feet are perfectly stationary.

## AI summary

## Overview

**Research area:** Legged robotics — proprioceptive state estimation (odometry) and sensor fusion for quadrupedal locomotion, combining deep learning with physics-inspired training objectives.

**Technical level:** Advanced. The paper assumes familiarity with invariant EKF state estimation, foot kinematics and Jacobians, Lie-algebra rotation representations, attention mechanisms, and sim-to-real transfer pipelines.

**Scope (one sentence):** The paper presents TRACE, an end-to-end learned estimator that predicts relative displacement, relative rotation, and body-frame velocity from a 30-sample history of IMU and joint measurements, and shows reduced position drift versus filtering-based, hybrid, and purely learning-based baselines across four indoor and four outdoor terrain conditions.

## What This Paper Is About

Legged robots need to know where they are, and on-board cameras, LiDAR, or GPS often fail indoors, in poor lighting, in bad weather, or in cluttered scenes. Proprioceptive odometry — using only the IMU and joint encoders — is the fallback, but it drifts badly when feet slip, sink into soft ground, or roll rather than stay planted, because classical filters assume stance feet are perfectly stationary.

The goal is to build an estimator that learns when leg information can be trusted, without anyone hand-tuning contact thresholds or slip detectors, and that survives the gap between simulation and the real robot.

## Key Contributions

1. **End-to-end formulation.** Quadruped proprioceptive odometry is cast as a single learning problem that directly outputs a 9-dimensional vector (body-frame relative displacement, relative rotation in Lie algebra form, and body-frame linear velocity) from proprioceptive history — no filtering backend and no explicit contact or slip thresholds.
2. **Foot-aware cross-attention with physics-inspired auxiliary losses.** A history-conditioned CNN query attends over six tokens (accelerometer, gyroscope, and four leg tokens), and two auxiliary objectives — a kinematic model consistency loss and a foot contact-point velocity loss — push the attention to downweight unreliable legs.
3. **Policy randomization for sim-to-real robustness.** During simulation data collection, action scale, action mean bias, and action low-pass filtering are randomized so the estimator does not overfit to one policy's gait timing and contact pattern.
4. **Two-stage training pipeline with partial real-world fine-tuning.** Simulation pretraining in RaiSim is followed by fine-tuning of only the GRU and MLP head on real outdoor logs using a 1-second relative-error objective with L2-SP regularization, leaving the CNN and attention module frozen.

## Main Findings

- **Indoor position accuracy:** The proposed estimator achieves the lowest position and orientation errors on all four indoor terrains. Position ATE is 0.0882 m (flat), 0.1656 m (rough), 0.1154 m (slippery), and 0.1530 m (soft). Against the strongest baseline per terrain, position ATE drops by 50.7%, 39.2%, 44.1%, and 53.8% respectively, and 10-second position RE drops by 30.0%, 50.9%, 39.9%, and 26.4%.
- **Soft terrain is the headline case:** Unmodeled foot sinkage into an air mat — a condition never seen in simulation — yields roughly a 53.8% position ATE reduction versus the best baseline (0.1530 m versus 0.3309 m for NMN-IEKF).
- **Velocity gains are smaller than position gains:** The authors attribute this to the fact that filter-based baselines couple velocity and position increments through propagation, whereas TRACE predicts them jointly and only enforces consistency via a soft loss. It still reports lower velocity error on most terrains.
- **Outdoor results:** Position ATE is 0.4831 m (grass), 0.1796 m (hard ground), 0.1629 m (stairs), and 0.7328 m (full course). ATE reductions versus the strongest per-metric baseline are 17.0%, 43.3%, and 63.2% on grass, hard ground, and stairs; mean 10-second position RE reductions are 51.9%, 33.1%, and 3.2%. On the full course, mean 10-second position RE falls by 37.4% and P90 by 30.7%.
- **P90 tail behavior improves too:** Lower P90 error on outdoor terrain is reported as evidence of robustness to large, infrequent errors from uneven ground and compliant contacts.
- **Attention behaves like a learned contact detector:** Across 2,000,000 per-foot samples (1,129,612 contact, 870,388 swing), the highest-attention foot is actually in contact in 96.21% of samples. Mean per-foot attention is 0.2106 on contact feet versus 0.0060 on swing feet (medians 0.1984 versus 0.0000), and attention separates contact from swing with an AUC of 0.9637 — with no threshold ever specified by hand.
- **Attention also tracks slip-like motion:** Binned mean attention decreases as contact-point velocity increases, so the module acts as a soft reliability measure rather than a binary contact classifier.
- **Auxiliary losses matter a lot:** Removing the kinematic consistency loss raises mean position and velocity ATE by 28.4% and 28.8%. Adding the foot velocity loss back to a model lacking both auxiliary losses reduces mean position ATE and RE by 83.8% and 87.0% and velocity ATE and RE by 30.5% and 48.5%, while mean swing-foot attention falls from 0.0452 to 0.0060.
- **Policy randomization generalizes across policies:** Without it, the model is marginally better on the training policy, but averaged over three independently trained unseen policies, 10-second position RE falls from 0.5076 m to 0.3516 m — a 30.7% reduction. In zero-shot indoor evaluation with no real-world fine-tuning, policy randomization gives 0.0907 m versus 0.1098 m mean 10-second position RE.
- **Partial fine-tuning beats full fine-tuning on unseen terrain:** Compared with full-network fine-tuning on the same real data, the partial strategy lowers position ATE by 48.7% on slippery and 43.6% on soft terrain — both far from the grass and hard-ground fine-tuning data. Full fine-tuning is reported to overfit the fine-tuning distribution.
- **Small model, high accuracy:** The estimator has 0.2M parameters versus 1.4M for Legolas, yet averaged over four indoor terrains it reduces position ATE by 73.8% and RE by 61.8% relative to a fine-tuned Legolas variant (Legolas-FT).
- **Computationally practical:** Inference latency measured over 10,000 sequential samples at batch size one on an Intel Core Ultra 7 255H CPU is 0.2774 ± 0.0188 ms per step, sufficient for 500 Hz operation.

## Methodology in Plain English

**What goes in.** The network looks at the last 30 sensor samples — gyroscope, accelerometer, 12 joint positions, 12 joint velocities, 12 target joint torques, previous roll/pitch and horizontal velocity estimates, and the sampling interval — packaged as a 47-dimensional vector per timestep.

**Two parallel views of the data.** A small 1D convolutional network compresses the recent body-motion stream into a single query vector summarizing "how the body has been moving." Separately, the current instant is broken into six tokens: one for acceleration, one for gyroscope, and four leg tokens (each leg's 13-dimensional joint state plus a one-hot leg ID). Cross-attention with two heads lets the body-motion query decide how much to listen to each leg right now — so a foot that is airborne or sliding can be quietly ignored.

**Temporal memory and output.** The attended context feeds a GRU with a 128-unit hidden state, and a small MLP combines the context, the hidden state, and the timestep to emit the 9 numbers describing motion since the previous step. A simple clamp inspired by zero-velocity updates zeroes out the prediction when angular and joint velocities are small and acceleration is close to gravity, killing drift while standing still.

**Three training signals.** The main loss is Smooth L1 on the ground-truth displacement, rotation, and velocity. A second loss checks that the predicted displacement agrees with the displacement you would get by integrating the predicted velocity (trapezoidal rule) — this keeps the three outputs physically coherent. A third loss computes where each foot's actual contact point is (using forward kinematics, foot Jacobians, and the ground normal from simulation) and penalizes that point's velocity, weighted by how much attention the leg is receiving. A stop-gradient on the total leg attention prevents the network from cheating by driving all attention to zero.

**Getting from simulation to reality.** Simulation training uses 400 parallel RaiSim environments with 4-second rollouts and heavy randomization of terrain, friction (μ ~ U(0.4, 1.2)), sudden slips (friction dropped to 0.3–0.4 with 1% probability), dynamics, sensors, timing, and external pushes. To avoid learning one policy's quirks, action scale, action bias, and action filtering are perturbed during data collection. Finally, only the GRU and MLP head are fine-tuned on six 150-second FAST-LIO2-referenced outdoor logs (three on grass, three on flat ground) using a 1-second relative-error loss plus an L2-SP penalty pulling weights back toward the simulation solution.

## Why This Matters

**Research impact.** The paper argues that you do not need a filter backend, explicit contact labels, or tuned covariance to get robust contact-aware odometry — a well-shaped auxiliary loss can teach attention to discover foot reliability on its own. The attention analysis (AUC 0.9637 against contact labels) is a concrete demonstration that physics-inspired losses can produce interpretable internal structure. The policy randomization result also reframes sim-to-real gap as partly a *policy-overfitting* problem rather than purely a sensor-modeling problem.

**Real-world applications:**

- **Indoor inspection and logistics robots** where cameras and LiDAR struggle with textureless walls, glare, or reflective warehouse floors.
- **Search-and-rescue and industrial response** in smoke-filled, dusty, or degraded-visibility environments where the robot must keep dead-reckoning through unreliable footing.
- **Agricultural and outdoor field robots** traversing grass, mud, and deformable soil — the paper's grass results (51.9% lower mean 10-second position RE) target exactly this.
- **Consumer and delivery quadrupeds** needing cheap, low-latency state estimation on embedded CPUs, given the 0.2774 ms inference time and 0.2M parameters.

**Industry relevance.** A 0.2M-parameter estimator running at sub-millisecond latency on a laptop-class CPU is attractive for cost-sensitive platforms, and the fact that the method improves steadily over a hybrid IEKF baseline suggests it can slot into existing navigation stacks as a drop-in odometry source — or as an additional measurement source for a downstream filter.

## Future Directions

- **IMU bias estimation.** The authors explicitly name explicit gyro/accelerometer bias estimation as future work, which is the standard missing ingredient for long-horizon dead reckoning.
- **Uncertainty prediction.** Also named explicitly: emitting per-prediction uncertainty so the odometry can be fused adaptively with exteroceptive sensors or a filter.
- **Other legged platforms.** Extending to humanoids with different foot geometries and contact dynamics is proposed, which would test whether the foot-token design generalizes beyond four legs and point-ish feet.
- **Open question — how far does partial fine-tuning stretch?** Fine-tuning used only grass and flat-ground logs, yet generalization was measured on indoor terrain. Whether the frozen CNN and attention module hold up after fine-tuning on a wider variety of real surfaces, or on a different robot, is untested here.
- **Open question — contact normals at deployment.** The foot velocity loss uses ground normals available in simulation; the paper's real-world fine-tuning retains only the model consistency and relative-error terms, so how the attention behaves without normal supervision in the wild is worth probing further.

## Target Audience

Robotics graduate students and researchers working on legged locomotion, proprioceptive state estimation, and sim-to-real transfer; engineers building navigation stacks for quadruped platforms who need a lightweight, filter-free odometry source; and machine learning researchers interested in how physics-inspired auxiliary losses can shape attention into an interpretable reliability signal. Readers without background in Lie algebra, foot Jacobians, or IEKF formulations will find the method sections demanding, though the experimental results and attention analysis are readable on their own.

## Authors’ 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…

[The full abstract on arXiv](https://arxiv.org/abs/2608.05975)

[Read the original paper](https://arxiv.org/abs/2608.05975)

## Related papers

- [RAIWAY: A Large-Wheeled Bipedal Robot with Contact-Informed Blind Locomotion](https://robotics.world/paper/raiway-a-large-wheeled-bipedal-robot-with-contact-informed-blind-2610.33172) 2026-10-23 · cs.RO · Also by Jemin Hwangbo, Woojin Kim
- [SG-ODOM: Event-Driven Proprioceptive State Estimation with Stability-Gated Contact Updates for Legged Robots](https://robotics.world/paper/sg-odom-event-driven-proprioceptive-state-estimation-with-stability-2611.20710) 2026-11-16 · cs.RO · Key terms of the title in common
- [StepTrigger: Contact-State-Triggered Backdoor Attacks on VLM-Powered Legged Robots](https://robotics.world/paper/steptrigger-contact-state-triggered-backdoor-attacks-on-vlm-powered-2609.26131) 2026-08-07 · cs.RO · Key terms of the title in common
- [DELTA: Deformable Elevation-Based Local Terrain Attention Encoder for Sparse-Terrain Quadrupedal Locomotion](https://robotics.world/paper/delta-deformable-elevation-based-local-terrain-attention-encoder-for-2608.22033) 2026-08-22 · cs.RO · Also by Jemin Hwangbo
- [CoPRE: Improving Sensitivity in Proprioceptive Contact Detection for Low-Cost Robot Arms](https://robotics.world/paper/copre-improving-sensitivity-in-proprioceptive-contact-detection-for-low-2609.27381) 2026-09-23 · cs.RO · Key terms of the title in common

---

Canonical: https://robotics.world/paper/trace-learned-proprioceptive-odometry-for-legged-robots-under-2608.05975
