Skip to content

LeRobot

What it is

LeRobot is an open-source end-to-end robotics learning framework developed by Hugging Face (v0.4.0+). It provides real-world and simulated robotics data collection tools, pretrained imitation learning and reinforcement learning policy models, standard sensor and actuator interface adapters, and hardware control loops designed for physical AI applications.

What problem it solves

Robotics development historically suffered from extreme fragmentation, proprietary hardware abstraction layers, and a lack of standardized dataset formats for AI training loops. LeRobot standardizes dataset schema ingestion, policy model architectures (such as Diffusion Policy, ACT, and VQ-BeT), and real-time inference loops on consumer or edge computing hardware.

Where it fits in the stack

Category: Frameworks / Physical AI & Robotics. It sits at the Execution & Control Layer, bridging high-level LLM and VLM reasoning agent architectures with low-level actuator motor commands and sensor teleoperation loops.

Typical use cases

  • Streaming Data Collection & Teleoperation: Logging streaming camera frames and arm joint states into standard Hugging Face LeRobot dataset formats.
  • Imitation Learning Policy Training: Training neural policies to perform complex dexterous manipulation tasks using physical demonstration data.
  • Edge Deployment & Real-Time Inference: Running optimized policy control loops at 30-100Hz on local NVIDIA Jetson, Mac Studio, or edge AI gateways.
  • Multimodal Agent Control Integration: Connecting frontier vision-language models (e.g. Gemini 4.0 Pro, Claude 5.1) to physical robotic arms via FastMCP 3.1 action primitives.

Strengths

  • Native Hugging Face Ecosystem Integration: Directly streams datasets and model weights to and from the Hugging Face Hub.
  • Broad Model Policy Zoo: Includes built-in implementations of Action Chunking with Transformers (ACT), Diffusion Policy, and Vision-Language Action (VLA) models.
  • Lightweight Hardware Requirements: Operates on low-cost open hardware arms (e.g., SO-ARM100, Koch v1.1) as well as commercial industrial manipulators.
  • Modular Data Format: Enforces rigid dataset schemas with built-in video decoding, state chunking, and spatial coordinate transforms.

Limitations

  • Hardware Calibration Required: High precision physical actions require careful motor joint calibration and hardware-specific latency tuning.
  • Real-Time Latency Sensitivity: Real-world teleoperation requires low-latency local execution loops, making network-dependent architectures challenging.
  • Continuous Domain Gap: Sim-to-real transfer requires fine-tuning or domain randomization when trained purely in synthetic simulation environments.

When to use it

  • When training, evaluating, or deploying physical AI and imitation learning policies for robotic manipulators.
  • When collecting streaming sensor and action teleoperation datasets for open-source sharing.
  • When orchestrating physical robotics execution workflows alongside LLM planning agents.

When not to use it

  • For purely web-based, software-only software automation (use Browser Use or Playwright).
  • For classical industrial PLC ladder logic control with fixed deterministic motion trajectories.

Getting started

Installation

Install LeRobot via pip from source or PyPI:

pip install lerobot torch torchvision

Basic Hardware Initialization & Policy Evaluation

Evaluate a pretrained policy on local hardware or simulation environment:

import lerobot
from lerobot.common.policies.act.modeling_act import ACTPolicy

# Load pretrained policy model from Hugging Face Hub
policy = ACTPolicy.from_pretrained("lerobot/act_so100_real")
policy.eval()
print("LeRobot ACT Policy successfully loaded.")

CLI examples

Recording Teleoperation Dataset

Record 50 episodes of motor manipulation demonstrations to a local dataset repository:

lerobot-record \
  --robot.type=so100 \
  --fps=30 \
  --repo-id=user/so100-button-press \
  --num-episodes=50

Training Imitation Policy

Train a Diffusion Policy on recorded dataset using CUDA acceleration:

lerobot-train \
  --policy.type=diffusion \
  --dataset.repo_id=user/so100-button-press \
  --env.type=real \
  --batch-size=64 \
  --steps=100000

API examples

Python Integration & Pydantic v2 Action Telemetry Verification

The following script demonstrates logging real-time robotics frame telemetry and verifying motor command outputs using strict Pydantic v2 schemas:

import time
from typing import List
from pydantic import BaseModel, Field, conlist

class JointState(BaseModel):
    joint_positions: conlist(float, min_length=6, max_length=6) = Field(
        ..., description="6-DOF motor joint angles in radians"
    )
    joint_velocities: conlist(float, min_length=6, max_length=6) = Field(
        ..., description="Motor joint velocities in rad/s"
    )
    gripper_open: bool = Field(..., description="Boolean status of end-effector gripper")

class TeleoperationFrame(BaseModel):
    timestamp: float = Field(..., description="Unix timestamp of sensor reading")
    episode_index: int = Field(..., ge=0, description="Active demonstration episode ID")
    robot_state: JointState = Field(..., description="State telemetry")
    action_command: JointState = Field(..., description="Target action state")

# Simulate sensor reading & policy output evaluation
sample_payload = {
    "timestamp": time.time(),
    "episode_index": 12,
    "robot_state": {
        "joint_positions": [0.0, -0.45, 1.2, 0.0, 0.8, 0.0],
        "joint_velocities": [0.01, 0.02, -0.01, 0.0, 0.0, 0.0],
        "gripper_open": True,
    },
    "action_command": {
        "joint_positions": [0.05, -0.42, 1.18, 0.0, 0.8, 0.0],
        "joint_velocities": [0.05, 0.03, -0.02, 0.0, 0.0, 0.0],
        "gripper_open": False,
    }
}

frame = TeleoperationFrame.model_validate(sample_payload)
print(f"Verified Episode {frame.episode_index} frame at {frame.timestamp}")
print(f"Target positions: {frame.action_command.joint_positions}")

Sources / references


Contribution Metadata

  • Last reviewed: 2027-01-07
  • Confidence: high