Skip to content
←Back to Papers

PAPER DEEP DIVE

ANYmalQuadruped robotsMotion priors

Motion Priors Reimagined: Adapting Flat-Terrain Skills for Complex Quadruped Mobility

Reinforcement learning (RL)-based motion imitation methods trained on demonstration data can effectively learn natural and expressive motions with minimal reward engineering but often struggle to generalize to novel environments. We address this by proposing a hierarchical RL framework in which a low-level policy is first pre-trained to imitate animal motions on flat ground, thereby establishing motion priors. A subsequent high-level, goal-conditioned policy then builds on these priors, learning residual corrections that enable perceptive locomotion, local obstacle avoidance, and goal-directed navigation across diverse and rugged terrains. Simulation experiments illustrate the effectiveness of learned residuals in adapting to progressively challenging uneven terrains while still preserving the locomotion characteristics provided by the motion priors. Furthermore, our results demonstrate improvements in motion regularization over baseline models trained without motion priors under similar reward setups. Real-world experiments with an ANYmal-D quadruped robot confirm our policy's capability to generalize animal-like locomotion skills to complex terrains, demonstrating smooth and efficient locomotion and local navigation performance amidst challenging terrains with obstacles.

Paper information: Zewei Zhang, Chenhao Li, Takahiro Miki, and Marco Hutter. arXiv:2505.16084, May 2025. Project page: anymalprior.github.io. The paper does not provide a public code repository. The experimental platform is ANYmal-D.

One-sentence summary: The authors freeze flat-ground animal-motion priors into a low-level skill policy, then train a high-level policy to output latent gait commands and constrained joint residuals, enabling ANYmal-D to preserve natural motion while navigating stairs, rugged slopes, boxes, and obstacles.

1. Background and Motivation

Legged-robot control has long faced two competing demands. A controller must move reliably over difficult terrain, and it must do so with motion that is smooth, efficient, and mechanically sensible. Reinforcement learning can already track commanded velocities or reach goal positions with impressive robustness, but high-quality motion usually requires extensive reward engineering. Typical pipelines penalize base acceleration, vertical velocity, joint torques, contact forces, action rates, and other quantities, then adjust their weights until task performance and motion quality reach an acceptable compromise. This approach works, but the resulting reward configuration is often task- and platform-specific.

Motion imitation offers an alternative. Instead of describing good motion through many penalty terms, a policy can imitate trajectories produced by teleoperation, motion capture, or trajectory optimization. Animal motion capture is especially attractive because it naturally encodes periodic gaits, phase relationships, and whole-body coordination. Canine walking, pacing, and cantering contain a style of movement that is difficult to design from scratch. The limitation is equally clear: animal data are usually collected on flat ground, and the reference trajectories become physically infeasible on stairs, rugged slopes, high obstacles, and random boxes.

This paper does not discard motion priors when the environment becomes difficult. Instead, it changes their role. The low-level policy first learns to execute several canine gaits in a latent space. During task training, that policy is frozen and treated as a motion prior. A high-level policy selects a latent gait command and adds small, penalized corrections to the low-level action. The prior contributes rhythm, style, and coordination; the residual contributes foot clearance, attitude adaptation, and obstacle avoidance. Complexity is decomposed rather than handed to a single policy trained from scratch.

The second motivation is local navigation. Conventional systems often separate navigation from locomotion: a planner generates waypoints or velocity commands, and a low-level controller tracks them. This interface is convenient, but it may not exploit the robot’s full motion capability. The paper integrates perceptive locomotion, local obstacle avoidance, and goal-directed navigation in one hierarchical policy, allowing the robot to choose actions directly from terrain observations.

The design goal is therefore threefold: reduce reward tuning by using real animal motions, extend flat-terrain skills through residual learning, and combine locomotion and local navigation in a single framework. Figure 1 shows ANYmal-D deployments across indoor and outdoor stairs, random blocks, and high obstacles.

ANYmal-D hardware experiments on complex terrain

Figure 1: ANYmal-D uses an animal-like gait to traverse uneven ground and reach goal positions in challenging environments.

2. Preliminaries

Hierarchical reinforcement learning. The low-level policy receives proprioceptive signals and a motion latent encoding, then outputs twelve joint actions. The high-level policy receives goals, perception scans, and privileged state, then outputs a sixteen-dimensional latent command and twelve joint residuals. Once task training begins, the low-level policy is frozen. It functions as an action grammar; the high-level policy chooses and modifies actions within that grammar.

Fourier Latent Dynamics. The paper uses an FLD representation for motion. An encoder compresses motion sequences into latent variables containing global periodic parameters and local phase states. A decoder reconstructs future motion, while a fixed-frequency propagation rule predicts how the latent state evolves. This creates a compact, structured space in which different canine gaits can be reused by a downstream policy.

Teacher-student distillation. The simulation teacher observes noiseless proprioception, exteroception, and privileged information such as contact states, friction, and disturbances. Real hardware does not provide those signals. A student policy with a GRU-based belief encoder is therefore distilled from the teacher using noisy observations, allowing the robust behavior learned in simulation to survive deployment.

3. Method

3.1 Motion retargeting. Raw canine motion-capture data cannot be mapped directly onto ANYmal-D. The authors use inverse kinematics based on neck, pelvis, and foot positions to convert animal motions into robot joint trajectories. The dataset includes walking, pacing, and cantering at different speeds, preserving animal timing while satisfying the robot’s kinematic configuration.

3.2 Low-level motion representation. The FLD model is first trained offline. Its encoder compresses motion segments, its decoder reconstructs future states, and its latent representation combines periodic parameters with phase. The propagation equation is:

$$z_t=(\theta_t,\phi_t)=\mathrm{enc}(s_t),\quad \hat z_{t+i}=(\theta_t,\phi_t+if_t\Delta t),$$

where $s_t$ is the original motion state, $z_t$ is the latent representation, $\theta_t=(f_t,a_t,b_t)$ contains frequency, amplitude, and offset, $\phi_t$ is phase, and $\Delta t$ is the discrete time step. Intuitively, the encoder compresses when limbs should move and how the motion repeats, while the propagation rule advances that periodic state through time.

Decoding and training use:

$$\hat s_{t+i}=\mathrm{dec}(\hat z_{t+i}),\quad L^{FLD}=\sum_i^N \mathrm{MSE}(s_{t+i},\hat s_{t+i}).$$

The reconstruction loss over consecutive segments forces the latent dynamics to preserve global periodic structure. The encoded state includes base linear and angular velocity, projected gravity, and joint positions, so the representation captures body attitude as well as joint configuration.

3.3 Modified low-level imitation. The authors do not simply run the original FLD pipeline during policy training. They remove the decoder, replace reconstructed trajectories with ground-truth references, bypass phase propagation, randomly sample motion clips, and let the encoder compute latent embeddings dynamically. This avoids accumulating decoder reconstruction errors while retaining the structured latent space. The low-level action $a_t^l$ is twelve-dimensional, and its observation combines proprioception with latent motion encoding.

3.4 High-level task policy. During task training, the low-level policy is frozen as a prior. The high-level teacher outputs latent commands $z_t$ and joint residuals $a_t^{res}$. Exteroception combines elevation scans around each foot with a downsampled sparse conical LiDAR scan. Privileged state includes leg contact, friction, and external disturbances. Task inputs are the goal position in the base frame and a forward velocity command.

Training framework overview

Figure 2: The four stages are motion retargeting, low-level pre-training, high-level residual learning, and student-policy distillation.

3.5 Goal rewards. The task objective combines a sparse reaching reward with a denser velocity reward. The reaching reward is active only near the end of an episode when the robot is sufficiently close:

$$r_{reach}=\frac{1}{T_r}\left(1-\frac{\|\mathbf d\|_2}{2}\right),$$

where $\mathbf d$ is the displacement from the robot base to the target and $T_r$ is the threshold time for reward computation. When the target is farther away, the velocity reward provides a denser signal:

$$r_{vel}=\min(v_{cmd},\langle\mathbf v,\mathbf d\rangle),$$

where $v_{cmd}$ is the velocity command and $\mathbf v$ is base linear velocity. Together, they reward both reaching the goal and making progress toward it through cluttered terrain.

3.6 Residual constraint. The residual penalty is the central mechanism for balancing style and adaptability. Without it, the high-level policy can drift away from canine motion; with too strong a penalty, the robot cannot lift its joints enough for stairs and slopes. The penalty is:

$$r_{res}=w_{res}\sum_{i=1}^{12}(a_{t,i}^{res})^2.$$

Here $w_{res}$ is a negative weight and $a_{t,i}^{res}$ is the residual for joint $i$. This single term replaces many manual motion-regularization terms because the low-level prior already supplies natural movement; the high level pays only for deviating from it.

3.7 Reward structure. The low-level reward includes linear and angular velocity tracking, joint-position tracking, projected-gravity tracking, action-rate penalties, collision penalties, torque limits, joint accelerations, foot accelerations, and contact forces. For example, joint tracking is:

$$1.4\exp\left(-2\sum_{i=1}^{12}(q_{t,i}-q_{t,i}^{ref})^2\right).$$

The high-level reward retains regularization terms but removes motion tracking and adds goal rewards plus the residual penalty. Compared with training from scratch, this reduces the need to repeatedly tune weights solely to make motion look natural.

3.8 Perception and belief encoding. The teacher sees ideal exteroception and privileged state. The student sees noisy proprioception and exteroception. A recurrent GRU belief encoder reconstructs a useful internal state from history, and behavior cloning matches the student’s actions to the teacher’s. This narrows the sim-to-real gap in perceptive locomotion.

flowchart TD
  A[Canine motion capture] --> B[Inverse-kinematics retargeting]
  B --> C[FLD encoder]
  C --> D[Low-level flat-terrain policy]
  D --> E[Frozen motion prior]
  F[Elevation and LiDAR scans] --> G[High-level teacher]
  H[Goal position and velocity command] --> G
  I[Privileged state] --> G
  G --> J[Latent gait command]
  G --> K[Joint residual]
  E --> L[Low-level action]
  J --> L
  K --> L
  L --> M[Complex-terrain navigation]
  G --> N[Distillation with noisy observations]
  N --> O[Student policy]
  O --> M
  

4. Experimental Analysis

Training is performed in Isaac Gym on ANYmal-D. The low-level policy is trained exclusively on flat ground, while the high-level policy trains across boxes, stairs, rugged slopes, and high obstacles. PPO uses 4096 parallel environments on one NVIDIA RTX 4090. The method therefore does not rely on an unusually large compute budget; its advantage comes from the decomposition.

Reference and actual joint trajectories for the low-level policy

Figure 3: The low-level policy closely follows reference joint trajectories and transitions between canter, walk, and pace.

The first experiment validates the prior itself. Dashed reference trajectories and solid actual trajectories align closely across joints. The policy can execute multiple animal-like gaits and switch smoothly between them when the latent command changes. This matters because the high-level policy needs a stable action interface, not merely a classifier over gait labels.

The high-level evaluation uses the student policy under noisy observations. Goals are placed five meters from the start in random directions, and each terrain type is evaluated over 100 trials. The policy reaches high success rates on 0.25-meter stairs, 24-degree slopes, random boxes, and high obstacles. The hardest combination—random boxes with high obstacles—still reaches 75%, indicating that residual corrections can handle combined terrain and perception uncertainty.

TerrainSuccess rate
0.25 m stairs, ascending84 / 100
0.25 m stairs, descending85 / 100
24-degree slope, ascending90 / 100
24-degree slope, descending95 / 100
Random boxes81 / 100
Random boxes with high obstacles75 / 100
Flat ground with high obstacles90 / 100

The residual analysis explains how adaptation works. The authors compare hip-flexion-extension residuals for the left and right front legs on stairs and rugged slopes. Residual peaks and variance increase with terrain difficulty. On flat ground, the canine prior is often sufficient; as terrain becomes harder, the high-level policy must adjust joints to avoid collisions and maintain body attitude. Figures 4 and 5 show this trend.

High-level joint residuals across terrain difficulty

Figure 4: Joint residual peaks continue to change as stairs and slopes become more difficult.

Training terrain and residual variance

Figure 5: Residual variance grows with terrain difficulty, showing increased high-level correction.

The residual-penalty ablation exposes the core trade-off. A very strong penalty suppresses corrections and reduces efficiency on higher steps and steeper slopes. A very weak penalty preserves success but allows residuals to grow without bound, causing the robot to abandon regularized motion even on near-flat terrain. The authors vary the weight from -100 to 0 and use $w_{res}=-0.1$ in the main model.

Compared with a baseline trained from scratch under the same reward setup, the proposed policy produces a more natural animal-like gait. The baseline can navigate difficult terrain but tends to jump. Making the baseline natural would require additional regularization on quantities such as base acceleration or vertical velocity. In this framework, the motion prior plus residual penalty achieves that effect without extra reward tuning.

Energetic efficiency provides an additional comparison. The paper measures Cost of Transport during forward walking:

$$CoT=\frac{\sum_i^{12}|\tau_{t,i}\dot q_{t,i}|}{mgv_b},$$

where $m$ is robot mass, $g$ is gravity, $v_b$ is forward velocity, and $\tau_{t,i}$ and $\dot q_{t,i}$ are joint torque and velocity. Although energy is not explicitly optimized, models with motion priors achieve lower CoT. The authors attribute this to reduced vertical motion in animal-like gaits. Removing residual regularization slightly increases CoT, suggesting that unconstrained residuals also introduce energetic cost.

Training configurationInterpretation
FLD latent channels: 4A compact representation of periodic canine motion
Propagation horizon: 30; segment length: 31Learns periodic propagation across time
PPO parallel environments: 4096Trains on one RTX 4090
Residual penalty $w_{res}=-0.1$Balances adaptability and gait style in the main model
Student truncation steps: 15Used for truncated backpropagation through the GRU

5. Code and Reproducibility

No public code repository is available. The project page contains a “Code” button, but its target is still the page template’s placeholder GitHub URL and cannot be treated as a released implementation. The page provides the paper, abstract, and supplementary videos, but not training scripts, network code, or simulation configuration.

Reproducing the system therefore requires reconstructing the Isaac Gym environment, retargeting the motion data, implementing the FLD encoder, low-level policy, residual action head, teacher-student distillation loop, and perception preprocessing. The appendix supplies detailed rewards and hyperparameters, which is helpful, while the most uncertain components are the exact LiDAR scan representation and noise augmentation.

6. Limitations and Discussion

The authors state that the high-level policy can suffer from mode collapse: it may rely habitually on one low-level gait and use residuals only for adaptation instead of exploiting the full range of motion skills. Exploration strategies or diversity-driving rewards may alleviate this issue.

Training scenarios remain somewhat constrained. The paper evaluates stairs, slopes, random boxes, and high obstacles, but not gaps, stepping stones, overhanging obstacles, severe low-friction surfaces, strong external disturbances, or dynamic obstacles. Such environments may require larger corrections or fundamentally different motion modes.

A further methodological limitation is that a residual penalty prices deviation from the prior. When the task genuinely requires a motion pattern unlike flat-ground canine movement—large jumps or crawling under low ceilings, for example—a single residual mechanism may be insufficient. The low-level skill library itself must expand.

Animal motion is also not automatically optimal for a robot. A dog and ANYmal-D differ in mass distribution, actuator power, and foot geometry. The reported natural gaits and lower transport cost are encouraging, but they should not be generalized to every platform and speed without revalidation.

7. Conclusion

This paper separates imitation from adaptation. A low-level policy learns motion priors from canine data on flat ground; a high-level policy chooses latent skills and adds constrained residuals for rough terrain; teacher-student distillation handles noisy perception for hardware deployment. Motion quality comes from demonstrated animal dynamics, while terrain adaptation comes from a penalized correction mechanism.

ANYmal-D reaches goals on stairs, slopes, boxes, and obstacle fields while preserving animal-like motion. Residual variance increases with terrain difficulty, confirming that the correction mechanism is actively used. The main remaining gaps are limited motion diversity, possible mode collapse, and absent public code. Future work should expand the skill library and investigate more automatic or adaptive residual constraints.

Golden sentence:A motion prior should not dictate every step; it should provide a good enough movement grammar so the robot knows when to stay faithful and when to deviate.

ANYmalQuadruped robotsMotion priorsReinforcement LearningMotion ImitationLocal Navigation

SOURCE LINKS

https://arxiv.org/abs/2505.16084https://anymalprior.github.io/

Related Papers

ScaleNav: Scalable Internet Video Pretraining for Language-Conditioned Local Navigation

ScaleNav: Scalable Internet Video Pretraining for Language-Conditioned Local Navigation

ScaleNav studies language-conditioned local navigation, where a robot must reach a text-specified target that is visible in its initial observation and stop near the described location. The method starts from action-free Internet egocentric videos, learns how observations evolve as a camera approaches an instructed target, aligns the resulting visual priors with executable action chunks using action-labeled simulation, and then jointly fine-tunes video and action prediction. The authors report 86.5% success on a single-view Short-Horizon OVON adaptation, 94.9% on HabitatGS-LN, and 83.3% overall success across 60 real-robot trials on a Unitree Go2 in three indoor environments.

Yihui Yang, Yuanhong Yu, Jiawei Wang · 106 views · Oct 19, 2026
Local NavigationVision-language-action (VLA)
Oct 19, 2026
Learning Multi-Phase Robot Loco-Manipulation via Phase-Conditioned Policy Optimization

Learning Multi-Phase Robot Loco-Manipulation via Phase-Conditioned Policy Optimization

Complex whole-body loco-manipulation requires executing diverse maneuvers, such as crouching, grasping, and locomotion, within a single long-horizon task. While performing simple pick-and-place behaviors is well-established, scaling to complex, long-horizon tasks remains difficult. Currently, this challenge is addressed by relying on human motion data and correspondingly humanoid platforms, which limits platform independence and introduces substantial data processing overhead. Instead, we extend proximal policy optimization (PPO) to train a single policy for multi-phase tasks across diverse robotic hardware, leveraging prior task structure to shape behavior. Our method adapts PPO using a phase-conditioned critic, phase-gated reward functions, and a multi-phase reset curriculum to guide exploration. To support varied hardware, we employ a decoupled hierarchical control architecture that separates lower-level balancing dynamics from high-level phase execution. We demonstrate multi-stage loco-manipulation skills on hardware on both the Unitree G1 and a Boston Dynamics Spot equipped with a manipulator arm, and validate our design choices through ablations. Our approach enables the acquisition of complex loco-manipulation behaviors purely through environment interaction while directly incorporating high-level task structure into policy learning.

Simone Manni, Annika Wollschläger, Dario Bellicoso · 288 views · Oct 26, 2026
Whole-Body Loco-ManipulationPhase-Conditioned PPO
Oct 26, 2026
SuperNav: An Agentic Navigation System for Any Task in Any Scene

SuperNav: An Agentic Navigation System for Any Task in Any Scene

General-purpose service robots need navigation systems that can handle diverse human requests in unfamiliar environments, combining task generality with scene generality. Some existing methods fine-tune multimodal large language models (MLLMs) to predict navigation actions, making their behavior dependent on the coverage of navigation training data and potentially limiting generalization to new requests and environments. Our key insight is to let the MLLM focus on interpreting requests, understanding scenes, and making decisions while preserving its general-purpose capabilities and delegating motion execution to navigation tools. To realize this idea, we introduce SuperNav, which equips a pretrained MLLM with a specialized agent harness without navigation-specific fine-tuning of the MLLM. Our harness supports these decisions with Navigation Skills, agent-oriented Tools for physical interaction, and task-progress and context management. A unified visual-point interface connects decision-making to motion by allowing the model to specify destinations directly in images and revise its decisions from execution feedback. Together, these components support sustained navigation across different task requirements and environments. SuperNav outperforms four evaluated baselines on instance-level, multi-object, and demand-driven tasks. Category-level evaluation on HM3D and deployment on a real quadruped robot further demonstrate its applicability across environments. Project Page: https://zju3dv.github.io/SuperNav/

Jinkai Zhang, Jingyi Xu, Yuanhong Yu · 460 views · Oct 8, 2026
Object NavigationEmbodied Agent
Oct 8, 2026
Agile and Generalized Legged Locomotion via Attention-Based Neural Map Encoding

Agile and Generalized Legged Locomotion via Attention-Based Neural Map Encoding

Achieving agile and generalized legged locomotion across terrains requires tight integration of perception and control, especially under occlusions and sparse footholds. Existing methods have demonstrated agility on parkour courses but often rely on end-to-end sensorimotor models with limited generalization and interpretability. By contrast, methods targeting generalized locomotion typically exhibit limited agility and struggle with visual occlusions. We introduce a unified reinforcement learning (RL) framework for agile and generalized locomotion that incorporates a novel attention-based map encoder in the control policy. This encoder extracts local and global mapping features and uses attention mechanisms to focus on salient regions, producing an interpretable and generalized embedding for RL-based control. We further propose a learning-based mapping pipeline that provides fast, uncertainty-aware terrain representations robust to noise and occlusions, serving as policy inputs. It uses neural networks to convert depth observations into local elevations with uncertainties, and fuses them with odometry. The pipeline also integrates with parallel simulation so that we can train controllers with online mapping, aiding sim-to-real transfer. We validate our framework with the proposed mapping pipeline on a quadruped and a biped robot, and the resulting controllers demonstrate strong agility and generalization to unseen terrains in simulation and in real-world experiments.

Chong Zhang, Victor Klemm, Fan Yang · 512 views · Jan 13, 2026
Legged LocomotionReinforcement Learning
Jan 13, 2026

As an Amazon Associate, we earn from qualifying purchases.