Visual-Inertial-Leg SLAM for Legged Robots

AirLeg: A Robust and Accurate Self-Supervised
Visual-Inertial-Leg SLAM System

Kuan Xu1 Tianxin Hu1 Ruofei Bai1,2 Ruimeng Liu1 Yuefan Hao3 Zeyu Jiang1 Zitong Zhan3 Shenghai Yuan1 Chen Wang3 Lihua Xie4

1CARTIN, Nanyang Technological University 2A*STAR IAIC 3SAIR Lab, University at Buffalo 4NTU-VinUni Joint Research Laboratory for Robotics and Embodied AI

Anonymous Author(s)

Abstract

Visual-inertial-leg (VIL) state estimation offers cost-effective localization for legged robots, adding only a camera to the onboard IMU and joint encoders. However, learning-based leg odometry is limited by its supervision: networks trained in simulation suffer from the sim-to-real gap, while real-world labels require costly sensors or inherit the errors of visual estimates. To address this, we present AirLeg, a self-supervised VIL SLAM system in which vision and leg proprioception improve each other from training to deployment. We pre-train the leg odometry network in simulation and adapt it to the robot without ground truth through imperative learning, where multi-sensor bundle adjustment uses the leg odometry to refine the visual map, which in turn supervises the network. During deployment, the fused estimates adapt the network online. To improve both localization and this supervision, a dual-window estimator fuses vision, IMU, and leg odometry, relates loaded feet to the visually reconstructed terrain through a deformation-aware constraint, and weights the constraints by variance component estimation. AirLeg completes all 17 GrandTour sequences with the lowest average error (0.19 m) among 19 methods. On a low-cost quadruped, it achieves the lowest drift (0.6%) with only 0.5 h of unlabeled data, in real time on an embedded computer.

Videos

AirLeg on the public GrandTour dataset and on our low-cost Unitree Go2. Choose a platform, then click a sequence to play it.

Snowfield · SNOW-3, 145 m · Snow-covered glacier under a low sun

Experiments

AirLeg against 18 open-source methods on the public GrandTour dataset, then on a low-cost quadruped of our own.

01GrandTour: 17 test sequences

GrandTour was recorded by an ANYmal D quadruped across alpine trails, forests, riverbanks, construction sites, railways and city streets. We test on 17 sequences: 8 normal and 9 challenging ones, where the conditions degrade vision (V), the leg odometry (L), or both. All methods use only the robot's built-in IMU, and loop closure is disabled. Click a sequence to view it full size.

The color images come from the HDR front camera and look much brighter and clearer than what the algorithm sees. Square mosaic blocks are the anonymization (faces, license plates) applied in the dataset release; some are false detections, e.g., on the ground. ATE: RMSE of the absolute trajectory error of AirLeg without loop closure.

What AirLeg actually sees

AirLeg uses the grayscale front stereo pair of the Alphasense camera bundle. In the five sequences with low light or abrupt lighting changes, these frames are often almost black or largely overexposed, and the leg odometry has to carry the estimate through. The frames below are not always taken at the same moments as the color images above.

Comparison with 18 open-source methods

ATE RMSE [m] after SE(3) alignment, without loop closure, against leg-inertial, visual, visual-inertial and visual-inertial-leg methods.

0.09 best 0.13 second best F failure (lost track or drifted excessively) † late initialization or re-initialization, partial trajectory, not ranked * some sequences excluded from the average – RGB-D images not recorded

02Real robot: a low-cost Unitree Go2

Many legged robots carry only consumer-grade sensors. We mount an Intel RealSense D455 and an NVIDIA Jetson AGX Orin on a Unitree Go2, record about 0.5 h of unlabeled data for the adaptation, and test on ten sequences with a total length of 1.8 km. AirLeg stays within about 1% drift on all of them, while the body IMU, shaken by the legs, makes the visual-inertial methods end with rotation errors of 3.5° to 13.4° (AirLeg: 2.0°).

Unitree Go2 with an Intel RealSense D455 on a mast and an NVIDIA Jetson AGX Orin on its back. 1 2 3 4

Test platform

  1. 1
    Stereo cameraIntel RealSense D455, infrared stereo pair, 640×480 at 10 Hz
  2. 2
    Onboard computerNVIDIA Jetson AGX Orin, runs AirLeg and its online adaptation
  3. 3
    Body IMUBuilt into the Go2, 500 Hz
  4. 4
    Joint encoders12 joints, 500 Hz
0.5 h unlabeled data for adaptation10 test sequences1.8 km in total

Test scenes

ThicketDense vegetation
CorridorTextureless walls
StairsUp to 32°
SlopeLong incline
PebblesLoose stones
CrowdMoving pedestrians
GrassRepetitive texture
NightLow light
MixedChanging terrain
Multi-lap521 m route

Comparison on the Go2

End-point drift [% of the path length] against nine methods that run in real time, from leg-inertial to visual-inertial-leg.

0.22% best 0.47% second best F failure * failed sequences excluded from the average

Crowded shopping mall: map with AirLeg trajectory and pedestrians, views at two points, and the trajectory near start and end.
Crowded shopping mall. Map with the trajectory of AirLeg and the pedestrians; drift of 1.01% over 124 m, where every other method drifts by at least 1.25% or fails, even with the same pedestrian masks.

Runtime on a Jetson AGX Orin

Non-keyframe latency
38 ms
Leg odometry network
4.9 ms @ 125 Hz
CPU usage
1.4 of 12 cores
GPU memory
2.6 GB
Online adaptation round
1.9 s, every ~9 s

With online adaptation running in a separate process. The expensive modules (dense stereo, long-window optimization) run at low rates in their own threads and hardly block the front end.

03How much data does the adaptation need?

Composition of nested training sets by scene category and ATE on the 17 test sequences versus hours of adaptation data.
Data-efficient. Without real-world data the mean ATE is 0.54 m. With only 0.5 h from five sequences it drops to 0.23 m, recovering 88% of the improvement obtained with all 3.5 h (0.19 m).
(a) t-SNE of foot-terrain interaction per stride by scene category. (b) Mean ATE of networks adapted on one scene and tested on each scene category.
Transfers across scenes. A network adapted on a single scene category reaches 0.21–0.29 m on all test scenes. Much of the adaptation corrects the gap between the simulated and the real robot, which is present on every terrain; the amount and variety of data matter more than the scene.

Method

Two parts, one for each technical contribution: how the leg odometry is learned without ground truth, and how it is fused with vision at run time.

01Self-supervised sim-to-real adaptation of the leg odometry

The leg odometry should not only learn from vision but also help to correct it. AirLeg trains its leg odometry network in three stages, with fewer trainable parameters in each stage, so that most of the network keeps a motion prior of legged locomotion instead of copying the visual estimates. No stage needs real-world ground truth or extra sensors.

Leg odometry network: IMU, joint states and foot forces are embedded, encoded by a Transformer, and three MLP heads predict a gyro correction, the linear velocity and the twist log-variance.

Learn the motion prior where labels are free

From a causal window of 50 samples of IMU readings, joint positions and velocities and foot forces, a Transformer encoder predicts the body linear velocity, a correction to the gyroscope and the log-variance of the twist. Foot forces are estimated from joint torques, so robots without foot sensors work the same way.

The training data come from Isaac Lab: gait policies that trot, pace, bound and pronk under random commands, and terrain policies on slopes, stairs, gaps, hurdles and parkour courses, on rigid, gravel and soft ground. Robot mass, actuator gains and delays, disturbances and sensor noise and biases are randomized.

  • 80 h simulated data per robot
  • 4 gaits
  • 50-sample window

02Dual-window visual-inertial-leg estimator

During deployment, the legs are coupled with vision through both motion and geometry:

  • Dual-window estimator. A short window runs a leg-aided stereo VO; a long window (50 keyframes) jointly optimizes about 100 high-quality landmarks with the proprioceptive motion constraints, while the remaining map points are marginalized into relative-pose constraints.
  • Deformation-aware foot-terrain constraint. The terrain is reconstructed from the stereo images, and the leg kinematics places each loaded foot on it. A slowly varying contact offset absorbs foot sinkage, which limits the vertical drift.
  • Online variance component estimation. The weights of the leg odometry and foot-terrain constraints are re-estimated online, so slipping or sinking feet are down-weighted.
Foot-terrain constraint: a loaded foot at keyframe i rests on terrain reconstructed from superframe j; the residual is the signed distance to a local plane, corrected by foot radius and contact offset.
Foot-terrain constraint. (a) A loaded foot at keyframe i rests on the terrain reconstructed earlier from superframe j, relating the two poses directly. (b) The residual is the signed distance to a local plane, corrected by the foot radius and a contact offset.
System overview: leg odometry network with LoRA, integration, foot-terrain constraint, short-window optimization, long-span landmark and marginalized relative-pose constraints, VCE and long-window optimization with online adaptation.
Online system. The leg odometry network turns IMU and joint measurements into relative motions between keyframes to aid the short-window stereo VO. The long-window fusion combines visual relative-pose, long-span landmark, leg odometry, foot-terrain and inertial factors, weighted by online VCE. The matured fused estimates supervise the online update of the low-rank adapters.

BibTeX

@misc{xu2026airleg,
  title  = {{AirLeg}: A Robust and Accurate Self-Supervised Visual-Inertial-Leg {SLAM} System},
  author = {Xu, Kuan and Hu, Tianxin and Bai, Ruofei and Liu, Ruimeng and Hao, Yuefan and Jiang, Zeyu and Zhan, Zitong and Yuan, Shenghai and Wang, Chen and Xie, Lihua},
  year   = {2026},
  eprint = {2611.32523},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2611.32523}
}