Developing natural and diverse locomotion controllers for quadruped robots that can adapt to complex terrains while preserving motion style remains a significant challenge. Existing imitation-based methods face a fundamental optimization trade-off: strict adherence to motion capture (mocap) references penalizes the geometric deviations required for terrain adaptability, whereas terrain-centric policies often compromise stylistic fidelity. We introduce LatentMimic, a novel locomotion learning framework that decouples stylistic fidelity from geometric constraints. By minimizing the marginal latent divergence between the policy's state-action distribution and a learned mocap prior, our approach provides a conditional relaxation of rigid pose-tracking objectives. This formulation preserves gait topology while permitting independent end-effector adaptations for irregular terrains. We further introduce a terrain adaptation module with a dynamic replay buffer to resolve the policy's distribution shifts across different terrains. We validate our method across four locomotion styles and four terrains, demonstrating that LatentMimic enables effective terrain-adaptive locomotion, achieving higher terrain traversal success rates than state-of-the-art motion-tracking methods while maintaining high stylistic fidelity.
Figures & tables
Fig. 1 : Left to right: Stair terrain, Noisy terrain, Wavy terrain.
Fig. 2 : Overview of LatentMimic: a) We first pretrain a motion encoder to encode the motion transitions into a latent space and a motion predictor to predict the future motion transitions based on a mocap dataset. These two networks together form our Latent Prior Module . b) We then perform imitation policy learning using a mimic reward that measures the KL-divergence between the simulated and target transition in the latent space to learn the desired motion style. c) We introduce an anchor reward and a terrain adaptation replay buffer to enhance terrain traverse while preserving the desired motion style. These components aid learning and enable effective adaptation across diverse terrains. Note: The latent prior module is trained in both b) and c).
Fig. 3 : A target motion predicted from flat terrain data may result in collisions when applied to stairs.
Fig. 4 : The input of our policy consists of proprioceptive observation, historical data, and encoded target motion ztarget .
Fig. 5 : The latent mimic reward: both the simulated and the predicted target motions are encoded into the latent space, and their KL-divergence is computed.
Fig. 6 : Terrain Adaptation Module: the current policy πθ and the style policy πθstyles takes the same observation to output the action distribution. Transitions with top 10% rewards are stored to fine-tune the motion predictor.
Parameter
Randomization Range
Terrain Friction
[0.5,1.25]
Additional Base Mass
[−1.0kg,1.0kg]
COM Displacement
[−0.15m,0.15m]
Motor Strength Factor
[0.9,1.1]
KP Gain Factor
[0.8,1.3]
KD Gain Factor
[0.5,1.3]
TABLE I : Domain Randomization Parameters applied during the training process to ensure sim-to-real robustness.
Metric
Method
Pace
Pace Backwards
Trot
Trot Backwards
Base Position (m)↓
Our
0.0338
0.0734
0.1437
0.3445
LIA
0.5838
0.3523
0.3519
0.6876
AMP
0.4684
0.4547
1.4965
4.9182
Joint Angles (rad)↓
Our
0.1386
0.1061
0.1474
0.1511
LIA
0.2712
0.1624
0.3611
0.1786
AMP
0.0842
0.1772
0.1952
0.1702
TABLE II : Tracking errors of four different locomotion styles on flat terrain. The best performance is in bold. Errors are measured using mean squared errors (MSE). Joint angle and velocity errors are computed per joint.
Fig. 7 : The figure shows the t-SNE visualization of latent motion features of four different motion styles.
Fig. 8 : The left figure depicts a frame of pace in which the robot moves its legs laterally (left front and left hind together). The right figure shows a trotting frame in which the robot moves its legs diagonally (left front and right hind).
TABLE III : Robots’ success rate of traversing different terrains. Each row shows the maximum level the robot can reach with a specific success rate. Note: All methods achieve a 100% success rate on flat terrain.
Pace max level
our
w/o TA
Stairs
45
18
Noise
64
64
Waves
64
43
TABLE IV : Ablation Study: Our model can achieve the maximum level with and without the terrain adaptation module for locomotion style pace.
Learning-based quadrupedal locomotion typically relies on complex reward formulations that entangle task specification, operational limits, gait preference, and terrain adaptation within a single optimization objective. We instead treat these functions through distinct mechanisms: rewards for task specification, constraints for operational limits, energy minimization for gait preference, and exteroceptive perception for adapting energy use to terrain difficulty. We show that these components jointly enable efficient, terrain-adaptive locomotion, and that removing each component exposes a distinct failure mode. Our formulation removes explicit gait priors (including air-time, contact-count, and foot-clearance targets) in favor of emergent behavior. Compared to a conventional complex-reward baseline, our formulation achieves comparable terrain traversal while reducing cost of transport by 56% and operational-limit violations by 96%. The resulting policies transfer zero-shot to a physical Unitree Go2 using LiDAR-based elevation mapping. Project website with videos: https://tinyurl.com/locomposition.
Loukas Kordos, Leonard T. Franz, Simon Rappenecker +4
Technical University of Munich. · University of Tübingen. · Hertie Institute for Clinical Brain Research & Center for Integrative Neuroscience. +1
Humans primarily rely on walking and running to traverse complex terrains. Similarly, humanoid robots should be able to smoothly transition between walking and running while maintaining natural and stable locomotion. However, unifying gait transition and multi-terrain adaptation within a single policy remains challenging due to gradient interference between tasks and the distribution shift caused by terrain variations. Although Mixture-of-Experts (MoE) architectures can mitigate multi-skill interference, direct joint training often fails to achieve clear expert specialization. To address these challenges, we propose CoRe-MoE, a two-stage reinforcement learning framework that decouples gait generation from terrain adaptation. In the first stage, a stable locomotion policy is learned to produce natural walking and running behaviors with smooth transitions. In the second stage, a terrain-aware MoE branch is introduced, and the gating network is trained with a contrastive objective to learn structured terrain representations and promote expert specialization. The final action is obtained through weighted fusion of the base gait policy and the terrain-aware branch, enabling the policy to preserve stable locomotion while adapting to complex terrains. Extensive simulation results demonstrate that the proposed method outperforms baseline approaches in terms of success rate, locomotion stability, and multi-terrain adaptability. Furthermore, zero-shot deployment on a Unitree G1 humanoid robot validates the effectiveness of our framework, achieving robust walking and running across stairs, slopes, steps, obstacles, and unstructured outdoor terrains while maintaining accurate foothold control and dynamic stability.
Kailun Huang, Zikang Xie, Yanzhe Xie +8
Hong Kong University of Science and Technology · Hong Kong University of Science and Technology (Guangzhou) · Guangdong University of Technology +3
Achieving quadruped robot locomotion across diverse and dynamic terrains presents significant challenges, primarily due to the discrepancies between simulation environments and real-world conditions. Traditional sim-to-real transfer methods often rely on manual feature design or costly real-world fine-tuning. To address these limitations, this paper proposes the DreamTIP framework, which incorporates Task-Invariant Properties learning within the Dreamer world model architecture to enhance sim-to-real transfer capabilities. Guided by large language models, DreamTIP identifies and leverages Task-Invariant Properties, such as contact stability and terrain clearance, which exhibit robustness to dynamic variations and strong transferability across tasks. These properties are integrated into the world model as auxiliary prediction targets, enabling the policy to learn representations that are insensitive to underlying dynamic changes. Furthermore, an efficient adaptation strategy is designed, employing a mixed replay buffer and regularization constraints to rapidly calibrate to real-world dynamics while effectively mitigating representation collapse and catastrophic forgetting. Extensive experiments on complex terrains, including Stair, Climb, Tilt, and Crawl, demonstrate that DreamTIP significantly outperforms state-of-the-art baselines in both simulated and real-world environments. Our method achieves an average performance improvement of 28.1% across eight distinct simulated transfer tasks. In the real-world Climb task, the baseline method achieved only a 10\ success rate, whereas our method attained a 100% success rate. These results indicate that incorporating Task-Invariant Properties into Dreamer learning offers a novel solution for achieving robust and transferable robot locomotion.
Junyang Liang, Yuxuan Liu, Yabin Chang +5
Shenzhen University, Shenzhen, China · Peng Cheng Laboratory, Shenzhen, China