Skip to main content

Overview

This guide will walk you through the essential workflows of LeRobot:
  1. Loading and exploring datasets
  2. Training a policy
  3. Evaluating a trained policy
  4. Running inference on real hardware
Make sure you have installed LeRobot before proceeding.

Working with Datasets

Loading a Dataset

LeRobot datasets are hosted on Hugging Face Hub and can be loaded with a single line:

Exploring Dataset Metadata

Before downloading the full dataset, you can explore its metadata:

Accessing Dataset Items

Loading Temporal Data

For robot learning, you often need sequences of past observations and future actions:

Using with PyTorch DataLoader

Streaming Large Datasets

For very large datasets, use streaming mode to avoid downloading everything:

Training Your First Policy

Using the Command-Line Interface

The simplest way to train a policy:
This command:
  • Downloads the dataset
  • Configures the ACT policy with default settings
  • Trains the model with automatic logging to Weights & Biases
  • Saves checkpoints periodically
Run lerobot-train --help to see all available options and configurations.

Training Programmatically

For more control, train policies programmatically:
1

Import Dependencies

2

Configure Training

3

Create Policy

4

Prepare Dataset

5

Training Loop

6

Save Model

The complete training example is available in the repository at examples/training/train_policy.py.

Evaluating Policies

Evaluation in Simulation

Evaluate your trained policy in a simulation environment:
Supported simulation environments:
  • ALOHA: Bimanual manipulation tasks
  • PushT: 2D pushing task
  • LIBERO: Benchmark for lifelong robot learning (Linux only)
  • MetaWorld: Meta-learning benchmark with 50 tasks

Evaluation Results

The evaluation script outputs:
  • Success rate across episodes
  • Average reward per episode
  • Episode lengths
  • Videos of policy rollouts (saved to output directory)

Running on Real Hardware

Basic Inference Loop

Deploy a trained policy on real hardware:
Always test your policy in simulation before deploying on real hardware. Start with slow speeds and ensure emergency stops are accessible.

Hardware-Specific Setup

For hardware-specific configuration:

Data Collection

Collect your own demonstrations:
1

Set Up Teleoperation

2

Record Demonstrations

3

Replay and Verify

4

Push to Hub (Optional)

Visualizing Datasets

Visualize datasets to understand their structure:
This opens a Rerun viewer showing:
  • Camera feeds synchronized across time
  • Robot state trajectories
  • Action commands
  • Episode boundaries

Example Workflows

Workflow 1: Train on Existing Dataset

Workflow 2: Collect Data and Train

Workflow 3: Fine-tune Pretrained Model

Next Steps

Hardware Integration

Set up your robot hardware and cameras

Policy Documentation

Learn about available policies and their configurations

Dataset Tools

Advanced dataset manipulation and tools

Examples

Explore more examples in the GitHub repository

Common Patterns

Pattern: Load, Train, Save

Pattern: Load and Infer

Additional Resources

Explore the examples/ directory in the repository for complete, runnable examples covering ACT, Diffusion Policy, VQ-BeT, and more.