LeRobot Record and Export¶
This page stops at LeRobot dataset recording / export. It does not document training, online inference, or how a policy consumes the dataset.
Monorepo: lerobot_ros2 @ feature/sim-grasp-datagen
README: README.md on that branch
Isaac-side shared steps: examples/IsaacSim/README.md.
What recording uses¶
Piece |
Role |
|---|---|
|
Motion / state while an episode runs ( |
|
Same |
|
LeRobot robot plugin ( |
|
Camera plugin (images for the dataset) |
PyPI |
Dataset container ( |
Composer pyproject.toml extra [recording] is lerobot + lerobot-robot-ros2. Motion/queue does not need it; recording does.
examples/IsaacSim/record_datasets.py is a thin wrapper: it calls robot_action_composer.cli.record_main.run_record_datasets with isaac_dir set to that folder.
Install (scripts first)¶
From the lerobot_ros2 README. Python 3.12, ROS 2 Jazzy, uv recommended.
git clone --recursive git@github.com:fiveages-sim/lerobot_ros2.git
cd lerobot_ros2
./init.sh all
# motion / task queue only: ./init.sh all-motion
# recording plugins (if you skipped all): ./init.sh install-lerobot
source .venv/bin/activate
./init.sh all = submodules + env + task orchestration + LeRobot plugins. Bare pip install -e . at the repo root is not the install path.
Isaac example README also lists ./init.sh install-plugins for this checkout. Use the lerobot_ros2 ./init.sh, not a handwritten PyPI rclpy install.
Before you record¶
Isaac scene running (Isaac scenes and USD).
ROS 2 control + (if the task has
nav.*) official Nav2 viaros2-stack(orchestration).Example README: Isaac ROS 2 simulation state and prim services enabled so reset / object pose work.
Task YAML must include a non-empty
task_queue(the recorder raises otherwise).
Record¶
There is no record-datasets console script in composer pyproject.toml. The documented entry is the example wrapper:
cd examples/IsaacSim
python record_datasets.py
Interactive prompts (from record_main / dataset_recording.launcher on this branch):
Robot (registry under
examples/IsaacSim/robots; defaultdobot_cr5if present)Task folder / task (
task_key)Scene preset when the YAML has
scene_presetsRecord profile
Episode count
Optional depth+pointcloud at keypoints (only if
lerobot_config.pyhas depth topics)Optional manual review after return-to-home
Per-robot lerobot_config.py (LEROBOT_CFG) is the LeRobot side of the split documented in ROBOT_CONFIG.md; robot.yaml stays the motion/stack side.
Export (what lands on disk)¶
On this branch the runner creates a local LeRobot dataset:
<cwd>/lerobot_dataset/grasp_record_<unix_time>/
via LeRobotDataset.create (repo_id = that path, use_videos=True, fps from the record profile). Episodes are dataset.add_frame then dataset.save_episode. That is the export this chapter covers. Do not assume a Hugging Face upload CLI unless a README on this branch says so.
Stop here¶
Not in this chapter (they exist on the branch; use the example README if you need them later):
examples/IsaacSim/policy_training/train.pyexamples/IsaacSim/inference.py/online_infer/
Package pages: lerobot_ros2, robot_action_composer.