TL;DR
This paper introduces DiffuseLoco, a novel framework that uses diffusion models to learn real-time, multi-skill locomotion for legged robots entirely from offline datasets. This approach enables a single policy to perform diverse agile skills, including bipedal and quadrupedal gaits, with impressive robustness and smooth transitions, even when deployed on edge computing devices.
What Problem Does This Paper Address?
Scaling up legged robot locomotion control, especially to achieve a single policy capable of diverse, agile skills, has been a significant challenge for traditional online reinforcement learning (RL) methods. These methods often struggle with the vast data requirements and computational demands of real-time control, particularly when dealing with multiple skills. While offline learning has shown great promise in other domains like computer vision and NLP, applying it effectively to the complex, high-dimensional dynamics of legged robots, and achieving robust real-world performance, remains an open problem. The authors aim to bridge this gap by leveraging the power of diffusion models to learn from diverse offline data sources, enabling a unified, robust, and real-time locomotion controller.
Methods
DiffuseLoco employs a three-stage framework:
- Data Source: It begins by collecting or utilizing an offline dataset containing demonstrations of various locomotion skills. Crucially, these skills can be gathered using different methods and may not require explicit skill labels. The framework is designed to handle diverse data sources by focusing on source-agnostic state-action-goal triplets.
- Training: A diffusion model, specifically a Denoising Diffusion Probabilistic Model (DDPM) with a transformer backbone, is trained end-to-end on this offline dataset. The model learns to predict a sequence of future actions conditioned on past states and goals. Key design choices for real-time control include:
- Receding Horizon Control (RHC): Instead of executing a full predicted action sequence, only the first action is executed, and the process is repeated at each time step. This allows for rapid replanning with updated state information.
- Delayed Inputs: To overcome the inference latency of large transformer models, the policy uses delayed inputs from previous timesteps to predict current actions, enabling parallel inference.
- Goal-Conditioning: Distinct attention mechanisms are used to process robot state and goal information separately, improving the policy's ability to adapt to dynamic environments and achieve goals.
- Deployment: The trained DiffuseLoco policy is deployed on a robot, where it generates actions in real-time by denoising random noise conditioned on the robot's current state and desired goal.
Datasets
The paper utilizes a combined offline dataset for training, which can be sourced from various existing RL frameworks or collected from new simulations. For quadrupedal robots, they collected 4 million state-action-goal pairs, and for bipedal robots, 10 million transitions. The data generation process incorporates dynamics randomization (including motor PD gains, robot mass, ground friction, and base velocity) to enhance the dataset's diversity and the resulting policy's robustness.
Key Insights and Ideas
- Diffusion Models for Dynamic Control: Diffusion models, traditionally used for image generation, prove highly effective at capturing the multi-modal nature of legged locomotion skills and learning complex, dynamic behaviors.
- Scalability through Offline Learning: By leveraging large-scale offline datasets, DiffuseLoco bypasses the limitations of online RL, enabling the training of more complex models and the acquisition of a wider range of skills.
- Unified Multi-Skill Policy: The framework successfully trains a single policy capable of performing diverse skills (e.g., trotting, pacing, hopping, bouncing, and bipedal walking) and transitioning smoothly between them, a feat challenging for prior RL methods.
- Real-World Robustness: DiffuseLoco demonstrates impressive zero-shot transfer to real-world robots and exhibits robustness to varying ground conditions and environmental variations.
- Edge Deployment Feasibility: Through inference acceleration techniques, the diffusion model can be deployed on edge computing devices, enabling real-time control directly on the robot.
Key Results
- Performance: DiffuseLoco achieved superior stability and lower velocity tracking errors compared to state-of-the-art RL and non-diffusion behavior cloning baselines in real-world experiments. For instance, it demonstrated 10.40% less body oscillation magnitude and 38.97% less tracking error compared to a Transformer with Receding Horizon Control (TF w/ RHC).
- Stability: In challenging tasks, DiffuseLoco consistently achieved 100% stability, while baselines like AMP struggled significantly, with some failing 100% of trials.
- Skill Diversity: The policy successfully learned five diverse skills (trotting, pacing, hopping, bouncing, and bipedal walking) within a single model.
- Skill Transitioning: The policy demonstrated free and stable transitions between skills, even for skills not explicitly trained together.
- Robustness: The policy showed good performance across various ground conditions, including turf, bare floor, and half-padded floors.
- Inference Speedup: An acceleration framework achieved approximately a 7x speedup in inference computation time, enabling real-time control at up to 116.5 Hz on an edge device.
Limitations and Future Work
- Robustness to Large Perturbations: While robust to ground variations, DiffuseLoco's performance against large external perturbations is noted as subpar compared to specialized single-skill RL policies.
- Sim-to-Real Gap for Complex Systems: For more complex robots like Cassie, the sim-to-real gap remains a challenge, with the policy only sustaining a few steps on hardware after successful simulation transfer.
- Future Work: The authors suggest exploring control-specific sampling techniques to accelerate diffusion models without compromising stability. They also hypothesize that DiffuseLoco could adapt to datasets with different robot morphologies, enabling broader deployment. Integrating vision and language instructions into the goal-conditioning dataset is another promising avenue for enhancing versatility.
Summary updated