C402 Lab: Trace the Actions in a LeRobot Dataset
Every policy trained on human data depends on one decision that is easy to get wrong: what the numbers in the action column mean. Public datasets do not share one convention (How public datasets store state and action). In this lab you open a public egocentric dataset of human hand motion in LeRobot format, find its action definition, check that definition against the data, and work out what a training loader would have to do with it. Part B compares a handheld-gripper dataset that stores its actions differently.
The loading code is LeRobot’s own, from its dataset documentation and its loading example. The checks you add on top use NumPy and SciPy only. Square brackets mark values you fill in. Work through Lessons 1 to 4 first, and keep the checklist next to you.
The datasets
Section titled “The datasets”| Part A: RoboX lerobot-dataset | Part B: UMI-Live | |
|---|---|---|
| What it records | Egocentric human hand demonstrations, tracked from video | Two handheld grippers with wrist cameras |
| Scale (card) | 28 episodes, 7,730 frames, 15 tasks, 53.6 MB | 3,255 episodes, 39.705 hours |
| Format | LeRobot v3.0 | LeRobot v3 |
| Access | Gated: accept the conditions on the page while logged in | Open |
| Licence | robox-commercial-nonexclusive-v1; the card says commercial use is allowed |
Apache-2.0 |
| Card | RoboXTechnologies/lerobot-dataset | brandonyang/umi-live-dataset |
Neither dataset involves a robot at capture. Part A is a person’s bare hand seen from an egocentric camera. Part B is a person holding gripper devices; its cameras are on the grippers. Keep the two kinds of capture, and any robot you later train for, in separate columns of your notes.
RoboX’s licence is not an open-source licence. Its card states: “This dataset is distributed under its stated commercial terms, not an open-source licence, despite the Hub license: other tag.” Full terms are in meta/robox_export.json; read them before using the data for anything beyond this exercise (Dataset Licences and Access).
Part A: an egocentric hand dataset
Section titled “Part A: an egocentric hand dataset”Step 1: Install LeRobot
Section titled “Step 1: Install LeRobot”LeRobot needs Python 3.12 or later. Its installation guide lists a dataset extra for “Loading & creating datasets”. In a fresh virtual environment:
pip install 'lerobot[dataset]'Write down the version you installed (pip show lerobot). The code in this lab follows LeRobot’s repository at commit d490e47 (version 0.7.1, November 2026); the import path from lerobot.datasets import LeRobotDataset is the one its current docs use.
Step 2: Get access
Section titled “Step 2: Get access”Open the dataset page while logged in to Hugging Face and accept its conditions. Then log in from the command line, as LeRobot’s dataset tools guide says to for “a private or gated dataset”:
hf auth loginIf it fails: a 401 or 403 error when loading means the conditions were not accepted for the account whose token you used.
Step 3: Read the card before the data
Section titled “Step 3: Read the card before the data”Fill in this table from the card, before you load anything:
| Question | What the card says |
|---|---|
| Where do the state values come from? | |
| What frame are positions in? | |
What does action[t] hold? |
|
| How is the wrist rotation change written? | |
| Was any robot retargeting applied? | |
| What frame rate, and is it verified? | |
| Which frames are imputed, and where is that recorded? |
You should have: state from MediaPipe hand tracking, with about 3.7% of frames imputed and flagged in meta/robox_frame_masks.parquet; wrist position “in the egocentric camera frame”; an action that is “the per-channel delta to the next frame, where the wrist rotation delta is a 3-D relative rotation vector rotvec(q[t+1] . inverse(q[t])) rather than a quaternion subtraction”; and no retargeting: “No robot retargeting is applied. target_embodiment is null and no robot telemetry is present.” The card adds: “FPS is declared, not independently verified.” The field guide’s schema table lists the 15 state and 14 action channels.
Step 4: Read the metadata
Section titled “Step 4: Read the metadata”LeRobotDatasetMetadata reads only the lightweight metadata files. From LeRobot’s loading example, with the repo id changed:
from pprint import pprintfrom lerobot.datasets import LeRobotDataset, LeRobotDatasetMetadatarepo_id = "RoboXTechnologies/lerobot-dataset"ds_meta = LeRobotDatasetMetadata(repo_id)print(f"Total number of episodes: {ds_meta.total_episodes}")print(f"Frames per second used during data collection: {ds_meta.fps}")print(f"Robot type: {ds_meta.robot_type}")print(f"keys to access images from cameras: {ds_meta.camera_keys=}\n")pprint(ds_meta.features)You should see values that match the card: 28 episodes, 30 fps, the robot type label robox_ego_hand, one camera key, and observation.state and action with shapes 15 and 14. Write down any that differ.
If it fails with “Your dataset must be tagged with a codebase version”, the repository has no version tag such as v3.0, which LeRobot looks up by default. Pass revision="main" to LeRobotDatasetMetadata and LeRobotDataset; LeRobot skips the tag lookup when the revision is not a version number (get_safe_version in datasets/utils.py and the metadata loader). The tag-creating code in the error message needs write access to the repository and is for its owner, not for you.
Step 5: Load one episode
Section titled “Step 5: Load one episode”The dataset is small, so load it whole, then take the frame range of episode 0 from the episode metadata, as the loading example does:
import numpy as npdataset = LeRobotDataset(repo_id)episode_index = 0from_idx = dataset.meta.episodes["dataset_from_index"][episode_index]to_idx = dataset.meta.episodes["dataset_to_index"][episode_index]state = np.stack([dataset[i]["observation.state"].numpy() for i in range(from_idx, to_idx)])action = np.stack([dataset[i]["action"].numpy() for i in range(from_idx, to_idx)])print(state.shape, action.shape)You should see two arrays with the same number of rows, 15 and 14 columns wide. Each dataset[i] also decodes the video frame, so this takes a little while.
Step 6: Check the action definition against the data
Section titled “Step 6: Check the action definition against the data”Rebuild the action the card describes from the state, and compare. SciPy’s Rotation.from_quat takes quaternions in scalar-last order, (x, y, z, w), the order the card lists them in (SciPy Rotation):
from scipy.spatial.transform import Rotation as Rpos, quat, rest = state[:, 0:3], state[:, 3:7], state[:, 7:15]exp_pos = pos[1:] - pos[:-1]exp_rot = (R.from_quat(quat[1:]) * R.from_quat(quat[:-1]).inv()).as_rotvec()exp_rest = rest[1:] - rest[:-1]expected = np.concatenate([exp_pos, exp_rot, exp_rest], axis=1)diff = np.abs(action[:-1] - expected)print("max |diff| wrist position:", diff[:, 0:3].max())print("max |diff| wrist rotation:", diff[:, 3:6].max())print("max |diff| fingers and pinches:", diff[:, 6:14].max())print("action at the episode's last frame:", action[-1])R.from_quat(q1) * R.from_quat(q0).inv() applies the inverse of the first rotation, then the second, which is q[t+1] · inverse(q[t]).
Write down the three maximum differences and what the last frame’s action holds; the card does not say what an episode’s last action contains. If the differences are not near zero, check the channel order against meta/robox_feature_semantics.json before concluding anything, and note which channels disagree.
Step 7: Ask which frame the action lives in
Section titled “Step 7: Ask which frame the action lives in”The wrist position is in the egocentric camera frame, and the camera moves with the wearer’s head. The card’s feature list has no camera pose. So a position delta mixes hand motion with head motion: a head turn with a still hand still produces a non-zero action (Removing head motion from hand actions).
Write down your answer to this question: with this dataset alone, can a loader express future wrist positions in the camera frame at the current timestep, as EgoMimic and EgoVerse do? Name what would be needed (Express actions in the current camera frame).
Step 8: Build action chunks
Section titled “Step 8: Build action chunks”A policy predicts a chunk of future actions. LeRobot builds chunks with delta_timestamps, offsets in seconds that must be multiples of 1/fps. From the loading example:
H = 16 # chunk length, your choicedelta_timestamps = {"action": [t / dataset.fps for t in range(H)]}dataset = LeRobotDataset(repo_id, delta_timestamps=delta_timestamps)sample = dataset[from_idx]print(sample["action"].shape) # (H, 14)print(sample["action_is_pad"]) # True where the window ran past the episode's endNear the end of an episode the window runs past the last frame. LeRobot then repeats the episode’s last row and marks those positions in action_is_pad (the delta_window function in LeRobot’s datasets/utils.py). Check it on a sample a few frames before the end.
Each row of this chunk is a per-frame delta. Exercise: turn one chunk into a trajectory relative to the frame at t0, by summing position deltas and composing rotation vectors in order. Write down why errors accumulate along the chunk, and compare with the delta row of UMI’s comparison, where delta actions scored 16/20 against 20/20 for relative trajectories. LeRobot’s action representations guide explains the same difference.
Step 9: Find the imputed frames
Section titled “Step 9: Find the imputed frames”The imputation flags are a separate file. Fetch it with the Hugging Face Hub client’s hf_hub_download and open it with pandas:
import pandas as pdfrom huggingface_hub import hf_hub_downloadpath = hf_hub_download(repo_id=repo_id, filename="meta/robox_frame_masks.parquet", repo_type="dataset")masks = pd.read_parquet(path)print(masks.columns.tolist())print(masks.head())Write down the column names, then count the imputed frames in episode 0 and check whether any of them fall inside the chunk you built in step 8. The card puts imputed frames at about 3.7% overall. An action computed across an imputed frame is a delta between estimates, not between measurements.
Step 10: Write the action note
Section titled “Step 10: Write the action note”Write one paragraph that a training engineer could rely on: state layout and units; what action[t] holds and what it holds at an episode’s last frame; the frame positions are in and whether head motion can be removed; how rotations are written; the imputed share; the licence; and that no retargeting was applied, so a robot needs the steps in Lesson 2 before it can use these actions.
Part B: a handheld-gripper dataset with a different convention
Section titled “Part B: a handheld-gripper dataset with a different convention”UMI-Live is open and Apache-2.0, but 3,255 episodes is too much to download for an exercise, so this part reads the card and the metadata and views one episode in the browser.
B1: Read the card
Section titled “B1: Read the card”UMI-Live’s card defines its convention in plain terms. State is 14 values, two grippers in the order left then right, each [x, y, z, rx, ry, rz, gripper], as poses relative to that gripper’s own episode start, with orientation as a rotation vector and grippers normalised from 0 (closed) to 1 (open). Its action is a same-frame copy of the state: “It is not the previous or next row, a velocity, or a precomputed action chunk. Training loaders must select future target frames, respect episode boundaries, and convert them to the desired policy representation.” It also warns that its grippers were normalised over different travel ranges: “These calibration ranges are source-specific, not interchangeable.” (UMI-Live card).
B2: Read the metadata and view an episode
Section titled “B2: Read the metadata and view an episode”Run step 4’s metadata code with repo_id = "brandonyang/umi-live-dataset", passing revision="main": on 2026-11-08 the repository had no v3.0 tag, so the default lookup fails. Checked that day with LeRobot 0.7.0, the call returned 3,255 episodes at 30 fps, no robot type, two camera keys (observation.images.umi1 and observation.images.umi2) and 14-value state and action. Then open episode 0 in the LeRobot Dataset Visualizer, the in-browser viewer LeRobot’s dataset tools guide describes, which plays the cameras and charts state and action together.
You should see two wrist-camera videos, and state and action charts with the same shape, since one is a copy of the other. If the viewer does not load, the metadata output and the card are enough for B3.
B3: Compare the two conventions
Section titled “B3: Compare the two conventions”| RoboX (Part A) | UMI-Live (Part B) | |
|---|---|---|
| What is tracked | A bare hand, from video | Two gripper devices |
| Position frame | The egocentric camera at each frame | Each gripper’s own episode start |
| Rotation in state | Unit quaternion | Rotation vector |
action[t] |
Delta to the next frame | Same-frame copy of the state |
| Finger or grip channel | 5 curls and 3 pinch distances | Normalised width, 0 closed to 1 open |
| What a loader must do | Undo or keep the deltas; deal with head motion | Pick future frames and convert them, as UMI’s relative-trajectory actions do |
Exercise: for UMI-Live, write the steps a loader would take to build a relative-trajectory chunk for one gripper at index t0, without crossing an episode boundary. The UMI policies page has a prompt that drafts the code; check its output against your steps.
Sources
Section titled “Sources”- RoboX Technologies: lerobot-dataset card, read 2026-11-08.
- brandonyang: UMI-Live dataset card, read 2026-11-08.
- Hugging Face LeRobot: installation, LeRobotDataset v3.0, using dataset tools, action representations; repository huggingface/lerobot at commit
d490e47: load_lerobot_dataset.py and datasets/utils.py. - Hugging Face Hub client: download files from the Hub.
- SciPy: scipy.spatial.transform.Rotation.
- Field guide: From Gripper Demonstrations to Robot Policies, Training Formats: LeRobot and RLDS, Co-Training on Human and Robot Data, Dataset Licences and Access.