# Residual-Based Adaptive Kalman Filtering for Legged Robot State Estimation

Robotics.world

> A Kalman filter's accuracy depends heavily on two noise matrices, Q (how much it trusts the motion model/IMU) and R (how much it trusts the leg-kinematics measurement).

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

**Published**: 2026-08-03

**Authors**: Mihaela Popescu, Dennis Mronga, Shivesh Kumar, Frank Kirchner

## In plain words

A Kalman filter's accuracy depends heavily on two noise matrices, Q (how much it trusts the motion model/IMU) and R (how much it trusts the leg-kinematics measurement). These are normally hand-tuned once by an expert and then frozen, which is a poor fit for walking robots whose contact conditions change constantly as feet strike, slip on stones, or cross rocky ground.

## AI summary

## Overview

- **Research area:** Legged robotics / proprioceptive state estimation (sensor fusion for quadruped robots).
- **Technical level:** Intermediate — assumes familiarity with Kalman filtering and basic Lie-group notation, but the central idea (adapt noise weights online instead of hand-tuning them) is easy to grasp.
- **Scope:** The paper proposes and benchmarks an online adaptation scheme for the process noise covariance **Q** and measurement noise covariance **R** inside an Invariant Extended Kalman Filter (InEKF) that fuses IMU and leg kinematics on a Unitree Go2 quadruped, evaluated on new indoor and outdoor datasets.

## What This Paper Is About

A Kalman filter's accuracy depends heavily on two noise matrices, **Q** (how much it trusts the motion model/IMU) and **R** (how much it trusts the leg-kinematics measurement). These are normally hand-tuned once by an expert and then frozen, which is a poor fit for walking robots whose contact conditions change constantly as feet strike, slip on stones, or cross rocky ground. The authors ask whether these matrices can instead be adjusted automatically, every filter iteration, using only quantities the filter already computes internally (the innovation and the residual) — and whether that matches an existing method that needs extra foot-force sensors and manual scale factors.

## Key Contributions

1. **New application of residual/innovation-based adaptation to legged state estimation.** The authors apply and extend an existing adaptive-Kalman-filter technique (innovation- and residual-based covariance adaptation) inside an InEKF for legged robots, which they state has not previously been explored in this form for IMU plus leg kinematics.
2. **Ablation of Q versus R adaptation.** They adapt **Q** alone, **R** alone, and both together, showing that adapting **R** (the leg-odometry measurement noise) alone is sufficient for their use case.
3. **Real-world validation and an open dataset.** Experiments on a Unitree Go2 across indoor flat/stony floor and outdoor rocky terrain on Vulcano Island, covering 680 m indoors and 530 m outdoors (the highlights describe the dataset as covering over 1200 m), released open source via Zenodo.
4. **Reported accuracy gains.** An average improvement of 15% overall and up to 25% during trotting compared with a fixed-tuned InEKF, achieved without foot-force measurements or additional hyperparameter tuning.

## Main Findings

- **Adapting Q alone does almost nothing.** In both indoor and outdoor scenarios, **Q**-only adaptation had a negligible effect for both the proposed and baseline methods.
- **Adapting R is the main lever.** **R**-only adaptation consistently beat the fixed-tuned InEKF, with a mean position RMSE reduction of approximately 15%.
- **Adapting both is no better than adapting R.** Joint **Q** and **R** adaptation performed comparably to **R**-only, consistent with the fact that the Kalman gain depends on their relative weighting.
- **Proposed method wins indoors, baseline wins slightly outdoors on RMSE.** The filter-residual method had better position RMSE on the flat indoor floor, while the IMU/foot-force approach was slightly better on rocky outdoor terrain.
- **Proposed method wins on drift.** The residual-based adaptation produced the largest reduction in drift per distance travelled on both datasets, except for the z-axis indoors.
- **Outdoor median error is slightly higher.** The authors attribute this to more variable contact conditions and terrain irregularities, plus the fact that initial noise parameters were tuned on indoor data.
- **No extra hardware needed.** Residual-based adaptation reached performance comparable to the foot-force approach without foot-force measurements and without tuning scale factors — the foot-force baseline required grid-searched gains (α₁ = 0.1, α₂ = 0.1, α₃ = 10).
- **A 1-second window worked best.** The sliding window for computing innovation/residual covariance was set empirically to 1 second, chosen in seconds rather than samples so it transfers across filter rates.

## Methodology in Plain English

The estimator is an InEKF: it predicts the robot's orientation, velocity, position, and foot-contact positions from IMU readings, then corrects that prediction using foot positions computed from joint encoders (leg odometry). The state is represented on the Lie group SE_{N+2}(3) with the error on the corresponding Lie algebra; the authors adopt the left-invariant, world-centric formulation.

Two internal signals drive the adaptation. The **innovation** is the mismatch between a measurement and the filter's prediction *before* the update; the **residual** is the mismatch *after* the update. Averaging these over a short sliding window gives an empirical estimate of how noisy the data actually is right now.

- To adapt **Q**, a scaling factor is computed from the innovation covariance relative to the predicted state uncertainty, averaged over all feet in contact, and applied to the nominal hand-tuned **Q** as **Q**·√α. Notably, the authors deliberately do *not* rescale the previous **Q** recursively, to stay stable at high update rates. Only the gyroscope and accelerometer terms are adapted.
- To adapt **R**, the residual covariance is used, because it preserves the symmetric-positive-definite property. Since the InEKF keeps **P** in the body frame while **R** is in the world frame, the state-uncertainty term is rotated using the updated orientation before being added, giving R per contacting leg.
- Adaptation is restricted to diagonal elements to preserve positive definiteness and avoid divergence.
- The baseline instead inflates the IMU noise terms using the absolute frame-to-frame change in gyro and accelerometer readings (a proxy for impact-induced disturbances), and inflates leg noise using leg-odometry spread combined with frame-to-frame foot-force differences, computed per leg rather than averaged across legs.
- A departure from the original InEKF: instead of propagating joint-encoder uncertainty through the forward-kinematics Jacobian, the authors model foot-position uncertainty directly as a diagonal **R**, allowing independent tuning per Cartesian axis.
- Initial noise values came from a "gold-standard" tuning procedure using motion-capture ground truth on two indoor trajectories (L1 random trotting, L5 adaptive), then transferred unchanged to the outdoor data to test generalization.
- Evaluation used two metrics: percentage improvement in Euclidean position RMSE relative to the fixed-tuned InEKF, and drift per distance travelled (final position error normalized by trajectory length). Ground truth was Vicon motion capture at 100 Hz indoors and GNSS/RTK at 10 Hz outdoors, with IMU and encoders logged at 1000 Hz.

## Why This Matters

- **For research:** It shows that a classical, interpretable adaptive-filtering trick from the INS/GPS literature transfers usefully to legged robots, and it supplies an open 27-trajectory dataset (9 indoor, 18 outdoor) with motion-capture and RTK ground truth for reproducible comparison.
- **For practice:** It removes two common burdens at once — expert hand-tuning of noise parameters and the extra sensing/tuning needed by foot-force-based contact adaptation.

Real-world applications:

- **Search-and-rescue and disaster response**, where quadrupeds traverse rubble and irregular contact surfaces that break fixed noise assumptions.
- **Industrial inspection** of plants and infrastructure, where long traverses make drift-per-distance the metric that matters.
- **Outdoor field robotics** such as environmental monitoring or agriculture on sand, rock, and mixed terrain — the same conditions as the Vulcano Island trials.
- **Reduced sensor suites:** since foot-force sensors are not required, cheaper or lighter robot configurations can still get comparable estimation quality.

**Industry relevance:** legged robot commercialization depends on state estimators that work out of the box across gaits and sites without per-deployment retuning. A method that needs no additional sensor data and no manual scale factors lowers integration cost and speeds deployment, and the reported 15% average / up to 25% trotting improvement is the kind of margin that matters for model-based controllers consuming the estimate.

## Future Directions

- **Cross-platform generalization:** the paper notes that learned alternatives may not transfer across robots; the same question applies here, since all experiments used a single Unitree Go2 with one controller stack.
- **Adapting the remaining noise terms:** Table 1 marks the foot-slip term σ_{p_c} and IMU bias term σ_θ as adaptable but not adapted in this work — natural next targets, especially since slip handling is currently pushed entirely into **R**.
- **Harder terrain and other gaits:** the authors' own explanation for weaker outdoor medians (terrain variability, indoor-tuned initial parameters) points to testing on soft, slippery, or non-stationary ground, and to gaits beyond trotting, adaptive trotting, and adaptive walking.
- **Removing dependence on motion capture for initialization:** the gold-standard tuning step still relies on Vicon data and linear-KF assumptions that do not fully capture InEKF nonlinearities, so how to obtain good nominal parameters without a motion-capture lab is an open question.

## Target Audience

Robotics researchers and graduate students working on legged locomotion and state estimation; control engineers integrating quadrupeds or humanoids who need a filter that survives gait and terrain changes without retuning; and practitioners who want a sensor-fusion baseline plus a public dataset with indoor motion-capture and outdoor RTK ground truth for benchmarking their own estimators.

## Authors’ abstract

State estimation is a key component in model-based control of walking robots and, more broadly, applicable wherever hidden variables must be inferred. The Kalman filter is widely used to estimate floating-base position and velocity by fusing multiple sensing modalities. However, tuning noise parameters is challenging and typically requires expert knowledge. Moreover, fixed noise parameters are unsuitable for varying gaits and environments. We propose an online adaptation…

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

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

## Related papers

- [Hardware-Accelerated Instance Segmentation for Resource-Constrained Space Robotics with Criticality Analysis](https://robotics.world/paper/hardware-accelerated-instance-segmentation-for-resource-constrained-2609.02219) 2026-09-02 · cs.RO · Also by Frank Kirchner
- [Open-Set Ego-Noise Separation for Legged-Robot Audition via Annotation-Free Adaptation and Pretrained-Model Transfer](https://robotics.world/paper/open-set-ego-noise-separation-for-legged-robot-audition-via-annotation-2609.07440) 2026-09-07 · cs.RO · Key terms of the title in common
- [Adaptive-MHE : A Sampling-Based Adaptive MPC for Legged Loco-Manipulation via Moving Horizon Estimation](https://robotics.world/paper/adaptive-mhe-a-sampling-based-adaptive-mpc-for-legged-loco-manipulation-2609.17832) 2026-09-15 · cs.RO · Key terms of the title in common
- [LLA-MPPI: Rapidly Adaptive Whole-body Control of Legged Robots with GPU-Accelerated Parallel Simulations](https://robotics.world/paper/lla-mppi-rapidly-adaptive-whole-body-control-of-legged-robots-with-gpu-2610.10465) 2026-10-07 · cs.RO · Key terms of the title in common
- [SHOES: Sim-to-real Hardware-adaptation via On-policy Expansion of Skills for Legged Robots](https://robotics.world/paper/shoes-sim-to-real-hardware-adaptation-via-on-policy-expansion-of-skills-2610.16457) 2026-10-12 · cs.RO · Key terms of the title in common

---

Canonical: https://robotics.world/paper/residual-based-adaptive-kalman-filtering-for-legged-robot-state-2608.02316
