Generalized Animal Imitator: Agile Locomotion with Versatile Motion Prior

Ruihan Yang, Zhuoqun Chen, Jianhan Ma, Chongyi Zheng, Yiyu Chen, Quan Nguyen, Xiaolong Wang

TL;DR

The Versatile Instructable Motion prior (VIM) is a reinforcement learning framework that enables legged robots to learn a wide variety of agile locomotion skills—such as running, turning, jumping, and backflipping—simultaneously within a single controller. By decoupling skill functionality from style and introducing a novel reward scheduling mechanism, VIM allows a quadruped robot to execute diverse behaviors and transition smoothly between them in the real world without task-specific fine-tuning.

What Problem Does This Paper Address?

Replicating the fluid, explosive agility of animals (like a dog chasing a ball or leaping over obstacles) remains a major challenge in robotics. Traditional approaches typically train separate, specialized controllers for individual skills or rely on heavy reward engineering tailored to a single task.

While recent work has explored "motion priors"—low-level controllers that learn reusable skills from reference data—they generally struggle to master highly agile behaviors simultaneously or fail to transition smoothly between them. The core difficulty lies in concurrently teaching a robot functionality (what objective to achieve, like moving at a target velocity) and style (how to achieve it naturally, matching the gait of the reference motion) without causing training instability or mode collapse.

Methods

VIM tackles this problem using a hierarchical reinforcement learning framework structured into a low-level motion prior and a high-level task policy.

Figure 2: Our system learns a single instructable motion prior, from a diverse reference motion dataset.

1. Motion Prior Architecture

  • Reference Motion Encoder ($E_{ref}$): Maps segments of future reference trajectories into a condensed, temporally consistent latent skill space ($z_t$). It utilizes an information bottleneck with an auto-regressive prior to ensure smooth transitions in the latent space.
  • Low-Level Policy ($\pi_{low}$): Takes the latent command $z_t$ and the robot’s proprioceptive state $s_t$ to output target joint angles, trained end-to-end via Proximal Policy Optimization (PPO).

2. Functionality vs. Style Rewards

The reward function explicitly separates the tracking objectives:

  • Functionality Reward: Tracks the reference motion's root position and orientation. Crucially, it places a high penalty on vertical root discrepancies ($z$-axis), which is vital for airborne maneuvers.
  • Stylization Reward Scheduling: Pure adversarial rewards (using a discriminator to distinguish robot motion from reference data) often suffer from mode collapse. VIM introduces a "coach" mechanism: it dynamically balances the adversarial style reward with a fine-grained joint angle tracking reward based on the discriminator's current satisfaction.
VIM Architecture and Reward Framework

3. Downstream Task Execution

For complex downstream applications (e.g., navigating obstacle courses), the low-level prior is frozen. A high-level policy ($\pi_{high}$) is then trained to output latent commands ($z_t$) to guide the robot based on task-level observations.

Datasets

The authors compiled a diverse dataset consisting of 11 reference motions spanning various locomotion skills:

  • Quadruped Motion Capture (Mocap): Real-world animal data for steady gaits (walking, trotting, pacing, cantering, and turning).
  • Synthesized Motions: Generated from a generative model to enhance gait diversity.
  • Trajectory Optimization: Mathematically optimized trajectories for highly dynamic, physically demanding maneuvers that are difficult to capture from live animals (such as forward jumps and backflips).

Key Insights and Ideas

  • The Vertical Dimension is Crucial: Standard locomotion rewards focus heavily on horizontal velocity tracking. VIM highlights that explicitly prioritizing vertical root height tracking is the secret ingredient for mastering explosive, airborne skills like backflips and hurdles.
  • The Discriminator as a Dynamic Coach: Instead of letting an adversarial discriminator dominate the style reward (which leads to instability), VIM uses the discriminator's average return as a metric of performance. When the robot struggles, the system dials up detailed kinematic guidance (joint tracking), allowing the robot to grasp the broad "essence" of a motion before refining the nuances.
  • Semantic Latent Clustering: t-SNE visualizations of VIM’s latent space revealed that semantically similar skills (e.g., left and right turns, or different types of jumps) naturally cluster together. This continuous, structured space is what enables zero-shot, fluid transitions between distinct behaviors.

Key Results

  • Simulation Superiority: In simulation benchmarks, VIM significantly outperformed competitive baselines (including GAIL and WASABI). VIM achieved a joint angle tracking error of just $0.08 \text{ rad}^2$ (compared to $0.25$ for standard Motion Imitation) and maintained much longer episode lengths without falling.
  • Zero-Shot Sim-to-Real Transfer: The exact same VIM controller was deployed directly onto a physical Unitree A1 quadruped robot. Without any real-world fine-tuning, the single policy successfully executed running, sharp turning, forward jumping (clearing a 0.44m height and 0.76m distance), and a complete, stable backflip.
  • Downstream Efficiency: When tackling high-level tasks like "Follow Command + Jump Forward," hierarchical controllers leveraging the pre-trained VIM prior converged drastically faster and achieved higher rewards than baseline methods training from scratch.

Limitations and Future Work

  • Safety Guarantees: The framework lacks explicit safety constraints during training, occasionally leading to risky behaviors or hardware-straining landings during aggressive maneuvers.
  • Hardware Boundaries: The physical limits of the robot's actuators prevented it from fully replicating highly explosive animal capabilities, such as high-speed cantering.
  • Perception Integration: The low-level motion prior relies strictly on proprioception. Incorporating exteroceptive sensors (like depth cameras or LiDAR) directly into the prior is a logical next step for traversing unmapped, complex terrains.
  • Environmental Adaptation: The current system does not adapt online to changing surface dynamics, such as moving from a rigid floor to slippery ice or soft sand.

Summary updated

Abstract

The agility of animals, particularly in complex activities such as running, turning, jumping, and backflipping, stands as an exemplar for robotic system design. Transferring this suite of behaviors to legged robotic systems introduces essential inquiries: How can a robot learn multiple locomotion behaviors simultaneously? How can the robot execute these tasks with a smooth transition? How to integrate these skills for wide-range applications? This paper introduces the Versatile Instructable Motion prior (VIM) - a Reinforcement Learning framework designed to incorporate a range of agile locomotion tasks suitable for advanced robotic applications. Our framework enables legged robots to learn diverse agile low-level skills by imitating animal motions and manually designed motions. Our Functionality reward guides the robot's ability to adopt varied skills, and our Stylization reward ensures that robot motions align with reference motions. Our evaluations of the VIM framework span both simulation and the real world. Our framework allows a robot to concurrently learn diverse agile locomotion skills using a single learning-based controller in the real world. Videos can be found on our website: https://rchalyang.github.io/VIM/
BibTeX
@inproceedings{yang2024generalized,
  author = {Ruihan Yang and Zhuoqun Chen and Jianhan Ma and Chongyi Zheng and Yiyu Chen and Quan Nguyen and Xiaolong Wang},
  title = {{Generalized Animal Imitator: Agile Locomotion with Versatile Motion Prior}},
  booktitle = {Conference on Robot Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=9XV3dBqcfe},
}
Figure