Overview
This guide will walk you through the essential workflows of LeRobot:- Loading and exploring datasets
- Training a policy
- Evaluating a trained policy
- 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:- Downloads the dataset
- Configures the ACT policy with default settings
- Trains the model with automatic logging to Weights & Biases
- Saves checkpoints periodically
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:- 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: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:- 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
- Tutorial Space: Free hands-on robot learning course
- Example Scripts: GitHub examples directory
- Discord: Join the community
- Documentation: Full API reference