Skip to content

LeRobot Dataset Logger

SUMMARY

LeRobotDatasetLogger records episodic robot demonstrations into writable LeRobot datasets. It manages dataset creation and resumption, episode recording, frame logging, and dataset finalization.

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 LeRobotDatasetLogger

Use the logger to:

  • Record teleoperated demonstrations
  • Collect imitation learning demonstrations
  • Capture observations and actions from a real robot
  • Collect simulation rollouts
  • Continue data collection in an existing LeRobot dataset

To inspect, analyse or process an existing dataset, use LeRobotDataset instead.

What does LeRobotDatasetLogger provide?

LeRobotDatasetLogger supports two recording workflows:

WorkflowDescription
RecordCreate a dataset and record episodes containing feature-complete frames.
ResumeReopen an existing dataset and continue recording new episodes.

The resulting LeRobotDataset contains a sequence of episodes, where each episode contains a sequence of frames recorded at the configured dataset frequency.

For more details on the dataset representation, see LeRobotDataset.

How Does Logging Workflow Work?

LeRobotDatasetLogger manages the recording lifecycle while your application supplies the observations and actions to be logged.

A recording session typically follows this flow:

Observation
Camera• RGB• RGB-D
Robot State• Joint State• Gripper State• End-Effector State
Action
Robot Command• Joint Position Targets• Velocity Targets• Cartesian Pose• Gripper Command
LeRobotDatasetLogger
1 · Instantiate logger
createoverwriteresume
2 · Start episode
start_episode()
3 · Log frames
log(frame)
4 · Stop or discard episode
stop_episode()discard_episode()
5 · Close logger
close()
LeRobot Dataset
Episode 0├─ Frame 0├─ Frame 1└─ ...
Episode 1└─ ...

The logger can create, overwrite, or resume a dataset, then records frames into an active episode. To learn how to use these modes, see the record workflow class reference and resume workflow class reference.

A completed episode is persisted with stop_episode(), while interrupted or invalid episodes can be removed with discard_episode(). When data collection is complete, close() finalizes the logger.

To learn how to represent observations and actions, see the LeRobot Dataset overview and Feature Schema.

Guides

Select a workflow below to create and record a new dataset or append episodes to an existing dataset.