rfx record collects demonstration episodes from a robot and saves them as a LeRobot-compatible dataset.
Basic Usage
- Connects to the robot hardware
- Records 10 demonstration episodes
- Saves them to
datasets/my-org/demos/as a LeRobot dataset - Prints summary: episodes recorded, total frames, output path
Arguments
Required
Robot type to record from. Examples:
so101, go2, g1HuggingFace dataset repository ID. Can be
username/dataset-name or just dataset-name for local-only.Optional
Output root directory where datasets are saved.
Number of episodes to record.
Maximum duration per episode in seconds. If not specified, each episode continues until manually stopped.
Task label to attach to episodes. Useful for multi-task datasets.
Recording frame rate (frames per second).
Push dataset to HuggingFace Hub after collection completes.
Also log an MCAP sidecar file for replay and debugging.
State dimension override. Normally auto-detected from robot config.
Examples
Record 10 episodes for SO-101 arm
Record and push to HuggingFace Hub
Record with 60 FPS and 30-second episodes
Record multi-task dataset with task labels
Record with MCAP sidecar for debugging
Output Format
Recorded datasets follow the LeRobot dataset structure:- LeRobot training pipelines
- HuggingFace datasets library
- rfx training tools
Stopping Recording
Press Ctrl+C to stop recording gracefully:Output Information
After successful recording, rfx prints:- episodes: Number of complete episodes recorded
- frames: Total observation frames across all episodes
- path: Location of the saved dataset
Python API
You can also record from Python:Troubleshooting
Robot not found
If the robot isn’t detected:Permission denied on serial port
On Linux, add your user to thedialout group:
Low frame rate
If actual FPS is lower than requested:- Check USB connection quality
- Reduce
--fpsvalue - Ensure robot firmware is up to date
See Also
- Deploy command - Run policies on hardware
- Doctor command - Check environment setup
- Robot API - Robot configuration and interface
