Skip to content

LeRobot Dataset

SUMMARY

LeRobotDataset is the Telekinesis Data Engine interface for working with LeRobot v3 datasets. It supports creating, writing, loading, inspecting, and visualizing robot datasets containing synchronized observations, robot state, actions, and task annotations.

Install Telekinesis Skill Library
Create an API key, install telekinesis-ai and module-specific installations and dependencies in a Python environment.
Open installation →

Install

Install the LeRobot dependencies for the Data Engine:

bash
pip install "telekinesis-ai[dataengine-lerobot]"

When to Use LeRobotDataset

Use LeRobotDataset when you want to:

  • Create a LeRobot v3 dataset programmatically
  • Write robot observations, actions, and task data into episodes
  • Load an existing local or Hugging Face dataset
  • Read frames for training or analysis
  • Inspect dataset metadata and feature definitions
  • Visualize recorded robot demonstrations
  • Resume writing to an existing writable dataset

For live episode-based data collection, use LeRobotDatasetLogger instead.

What Does LeRobotDataset Provide?

LeRobotDataset provides the dataset layer for LeRobot v3 data, handling storage, metadata, frame access, and writable dataset operations through a single interface.

CapabilityDescription
CreateCreate a new LeRobot dataset from a frame rate and feature schema.
ReadAccess individual frames through the dataset interface.
LoadOpen datasets from a local path or supported remote repository.
WriteAdd frames and save episodes to a writable dataset.
InspectRead metadata, features, episode information, and dataset properties.
VisualizeInspect recorded observations and actions visually.
ResumeReopen an existing dataset for additional writes.

How a LeRobot Dataset Is Structured

A LeRobot dataset stores robot demonstrations as a collection of episodes.

Each episode contains a time-ordered sequence of frames.

Each frame follows the dataset's feature schema and can contain synchronized values such as:

  • camera observations
  • robot state
  • actions
  • additional sensor observations
  • task information

Conceptually, the dataset is organized as:

LeRobot Dataset

├── Episode 0
│   ├── Frame 0
│   ├── Frame 1
│   ├── ...
│   └── Frame N

├── Episode 1
│   ├── Frame 0
│   ├── Frame 1
│   └── ...

└── Episode N

The feature schema defines what every frame contains, including each feature's data type, shape, and dimension names.

python
{
    "observation.camera_rgb": {
        "dtype": "video",
        "shape": [3, 64, 64],
        "names": ["channels", "height", "width"],
    },
    "observation.state": {
        "dtype": "float32",
        "shape": [7],
        "names": [
            "joint_1",
            "joint_2",
            "joint_3",
            "joint_4",
            "joint_5",
            "joint_6",
            "gripper_state",
        ],
    },
    "action": {
        "dtype": "float32",
        "shape": [7],
        "names": [
            "joint_1",
            "joint_2",
            "joint_3",
            "joint_4",
            "joint_5",
            "joint_6",
            "gripper",
        ],
    },
}

Storage Layout

On disk, LeRobot separates frame data, visual streams, and dataset metadata:

text
dataset_name/
├── .cache/
├── data/
│   └── chunk-000/
├── meta/
│   ├── episodes/
│   │   └── chunk-000/
│   │       ├── file-000.parquet
|   |       ├── ... 
│   │       └── file-00n.parquet
│   ├── info.json
│   ├── stats.json
│   └── tasks.parquet
├── videos/
│   ├── observation.images.camera1/
│   │   └── chunk-000/
|   |   ├── ... 
│   └── observation.images.camera3/
│       └── chunk-000/
├── .gitattributes
└── README.md
LocationPurpose
data/Stores frame-level non-visual data in Parquet shards.
videos/Stores encoded visual observations, organized by camera feature.
meta/info.jsonStores dataset-level information such as the feature schema, frame rate, and storage layout.
meta/stats.jsonStores dataset statistics used for inspection and normalization.
meta/episodes/Stores per-episode metadata such as episode lengths and task associations.
meta/tasks.parquetStores task descriptions and their dataset mappings.

Guides

Use the guides below depending on whether you want to create, write, load, inspect, or visualize a LeRobot dataset.