Skip to content

Visualize a LeRobot Dataset

SUMMARY

Use LeRobotDataset.visualize() to open a local dataset in Rerun and inspect synchronized camera observations, robot state, and actions.

Learn about LeRobot datasets
Review the dataset structure, feature schema, storage layout, and workflow.
View overview →

Method

Load the dataset from its local path before starting visualization:

python
from telekinesis.dataengine import datasets

dataset = datasets.LeRobotDataset(
    repo_id="lerobot/aloha_sim_insertion_scripted",
    local_path="results/lerobot/aloha_sim_insertion_scripted",
)

If the dataset is not available locally yet, follow Load a LeRobot Dataset first.

Parameter Configuration

visualize() has no parameters and returns None.

LOCAL DATASET REQUIRED

The dataset must exist locally; load or download it before visualization.

What to Inspect

Visualization is useful for checking:

  • Camera observations across an episode
  • Robot state and action changes over time
  • Temporal alignment between features
  • Unexpected or incomplete demonstrations
  • Whether recorded data is suitable for training

Example

python
"""Example script demonstrating how to visualize a LeRobot dataset using the Telekinesis Data Engine."""

from pathlib import Path

from telekinesis.dataengine import datasets

def visualize_lerobot_dataset_example():
    """Load and visualize a LeRobot dataset."""

    # 1. Define the dataset identity and local dataset path.
    repo_id = "lerobot/aloha_sim_insertion_scripted"
    local_path = (
        Path(__file__).resolve().parent.parent.parent.parent
        / "results"
        / repo_id
    )
    # 2. Load the LeRobot dataset from the local path.
    dataset = datasets.LeRobotDataset(
        repo_id=repo_id,
        local_path=local_path,
    )

    # 3. Visualize the dataset using Rerun.
    dataset.visualize()


if __name__ == "__main__":
    visualize_lerobot_dataset_example()

Next Steps