GitHub - huggingface/lerobot: ๐ค LeRobot: Making AI for Robotics more accessible with end-to-end learning
Key Points
- 1LeRobot is an open-source framework developed by Hugging Face, designed to democratize AI for robotics by providing PyTorch-based models, datasets, and tools to lower the barrier to entry for real-world robotic applications.
- 2It offers a hardware-agnostic control interface for diverse robots, a standardized `LeRobotDataset` format for scalable data hosted on the Hugging Face Hub, and implementations of state-of-the-art policies across imitation learning, reinforcement learning, and vision-language-action models.
- 3The platform streamlines data collection, training, and evaluation with extensive support for various hardware, seamless integration with the Hugging Face Hub for sharing assets, and resources for community contributions and learning.
LeRobot is an open-source project designed to democratize AI for robotics by lowering the barrier to entry through standardized models, datasets, and tools in PyTorch, targeting real-world applications. Its core methodology revolves around a three-pronged approach: a hardware-agnostic control interface, a standardized data format, and implementations of state-of-the-art machine learning policies.
Firstly, LeRobot introduces a unified Robot & Control interface, conceptualized as a Robot Python class. This class effectively decouples control logic from hardware specifics, allowing for a single programmatic interface to interact with diverse robotic platforms. The interface standardizes fundamental robotic operations such as connect(), get_observation(), and send_action(). For example, retrieves sensor data, and robot.send_action(action) dispatches control commands. This abstraction supports a wide range of hardware, including low-cost arms (e.g., SO100, OpenARM), humanoids (Unitree G1), and various teleoperation devices (Gamepads, Keyboards, Phones), while remaining extensible for custom robot implementations by adhering to the Robot interface.
Secondly, to address the prevalent data fragmentation problem in robotics, LeRobot proposes the LeRobotDataset format. This standardized, scalable format combines synchronized MP4 videos (or image sequences) for visual observations with Parquet files for state and action data. This structure facilitates efficient storage, streaming, and visualization of massive robotic datasets, which are hosted and accessible directly from the Hugging Face Hub. The LeRobotDataset class provides functionalities for seamless data access, such as , allowing direct indexing (e.g., dataset[episode_index]['action']) for retrieving specific modalities. Furthermore, the framework includes robust tools for dataset manipulation, including deleting episodes, splitting datasets by indices or fractions, adding or removing features, and merging multiple datasets.
Thirdly, LeRobot provides implementations of State-of-the-Art (SoTA) Models, or policies, in pure PyTorch, covering various machine learning paradigms applicable to robotics. These policies are designed for direct training and deployment, demonstrating real-world transfer capabilities. The supported categories include:
- Imitation Learning: Policies like ACT (Action Chunking with Transformers), Diffusion Models, and VQ-BeT.
- Reinforcement Learning: Including HIL-SERL (Hierarchical Imitation Learning with Structured Exploration and Regularization Learning), with upcoming support for TDMPC (Temporal Difference Model Predictive Control) and QC-FQL (Q-value Constrained Fitted Q-Learning).
- Vision-Language-Action (VLA) Models: Such as Pi0.5, GR00T N1.5, SmolVLA, and XVLA.
lerobot-eval) compatible with standard benchmarks like LIBERO and MetaWorld, enabling rigorous assessment of policy performance in both simulation and real-world environments.LeRobot fosters an open-source ecosystem, leveraging the Hugging Face Hub for dataset and model distribution, and promoting community contributions for feature development, documentation, and bug fixes.