Data Export: MCAP to LeRobot#
In this lesson, we’ll convert recorded MCAP sessions into a LeRobot dataset for GR00T fine-tuning.
To do that, we’ll:
Install the MCAP-to-LeRobot converter on the host.
Convert one or more recording sessions into a single LeRobot dataset.
Verify that output paths and dataset metadata are valid for training.
Install the Converter#
Note
The converter is pure Python and does not require a GPU or a ROS installation. It can run on either an x86_64 workstation or Jetson AGX Thor.
The MCAP-to-LeRobot converter does not require a ROS installation. You can run it either inside the Isaac ROS container or directly on the host.
Tip
If you want to skip data collection and train from precollected data, start from the provided real robot dataset, nvidia/GR00T-N1.7-AppleToPlate, which is already published in LeRobot format.
The asset flow is:
dataset -> training -> checkpoint
dataset + checkpoint -> LEAPP export -> model (ONNX)
hf download \
nvidia/GR00T-N1.7-AppleToPlate \
--repo-type dataset \
--local-dir ${ISAAC_ROS_WS}/recordings/lerobot_output
Install the Converter With uv#
The isaac_ros_data_tools repository is cloned during Isaac ROS Setup on Thor.
Note
If you run the converter on an x86 workstation instead of Thor, run the clone step from Isaac ROS Setup on Thor in your workstation workspace before continuing.
Install the converter:
cd ${ISAAC_ROS_WS}/src/isaac_ros_data_tools/isaac_ros_mcap_lerobot_converter curl -LsSf https://astral.sh/uv/install.sh | sh uv venv --python 3.12 .venv source .venv/bin/activate uv pip install -e .
Convert a Recording Session#
Run the following script to convert the rosbags of your recording sessions. Replace
<session_name>with the name of your recording session.To combine multiple recording sessions, pass multiple
--rosbags-dirarguments to convert all sessions into a single LeRobot dataset. Episodes are numbered sequentially across sessions in the order listed.mcap-to-lerobot \ --rosbags-dir ${ISAAC_ROS_WS}/recordings/<session_name> \ --output-dir ${ISAAC_ROS_WS}/recordings/lerobot_output \ --task "move the apple to the plate" \ --fps 30 \ --robot-type unitree_g1
Tip
mcap-to-lerobotfails if the directory specified by--output-diralready exists.In that case, remove the existing output directory first:
rm -r ${ISAAC_ROS_WS}/recordings/lerobot_output
See also
Refer to the isaac_ros_mcap_lerobot_converter reference for full CLI details and
--fps/sync_rateguidance.
Validate Output for Fine-Tuning#
Check the dataset directory and metadata before training:
ls ${ISAAC_ROS_WS}/recordings/lerobot_output
Confirm the output is ready:
Output directory contains four folders:
data/,meta/,videos/, andimages/.Output directory contains
new_embodiment_config_defaults.pyfor GR00T fine-tuning.data/,meta/, andvideos/contain data.images/exists but is empty.Episode count aligns with source sessions.
fpsin metadata matches the recordersync_rate(30 Hz by default).
Key Takeaways#
You converted MCAP sessions into a LeRobot dataset and prepared it for GR00T fine-tuning. The next step is policy fine-tuning on this converted dataset.