diff --git a/docs/source/il_robots.mdx b/docs/source/il_robots.mdx index dc2e02737..c0e6b80a5 100644 --- a/docs/source/il_robots.mdx +++ b/docs/source/il_robots.mdx @@ -647,5 +647,6 @@ The `--strategy.type` flag selects the execution mode: - `sentry`: Continuous recording with auto-upload (useful for large-scale evaluation) - `highlight`: Ring buffer recording with keystroke save (useful for capturing interesting events) - `dagger`: Human-in-the-loop data collection (see [HIL Data Collection](./hil_data_collection)) +- `legacy`: Episode-oriented policy recording with reset phases, mirrors the old `lerobot-record` inference path All strategies support `--inference.type=rtc` for smooth execution with slow VLA models (Pi0, Pi0.5, SmolVLA). diff --git a/docs/source/inference.mdx b/docs/source/inference.mdx index b2874d823..89260d9c1 100644 --- a/docs/source/inference.mdx +++ b/docs/source/inference.mdx @@ -157,6 +157,42 @@ Foot pedal input is also supported via `--strategy.input_device=pedal`. Configur | `--strategy.input_device` | Input device: `keyboard` or `pedal` (default: keyboard) | | `--teleop.type` | **Required.** Teleoperator type | +### Legacy (`--strategy.type=legacy`) + +Episode-oriented recording that mirrors the old `lerobot-record` inference path. The policy drives the robot for each episode; an optional teleoperator can drive the robot during the reset phase between episodes. + +```bash +lerobot-rollout \ + --strategy.type=legacy \ + --policy.path=${HF_USER}/my_policy \ + --robot.type=so100_follower \ + --robot.port=/dev/ttyACM0 \ + --teleop.type=so100_leader \ + --teleop.port=/dev/ttyACM1 \ + --dataset.repo_id=${HF_USER}/my_eval_data \ + --dataset.num_episodes=20 \ + --dataset.episode_time_s=30 \ + --dataset.reset_time_s=10 \ + --dataset.single_task="Pick up the red cube" +``` + +Teleop is optional — if omitted the robot holds its position during the reset phase. + +**Keyboard controls:** + +| Key | Action | +| ----------- | -------------------------------- | +| `→` (right) | End the current episode early | +| `←` (left) | Discard episode and re-record it | +| `ESC` | Stop the recording session | + +| Flag | Description | +| -------------------------- | ------------------------------------------------------- | +| `--dataset.num_episodes` | Number of episodes to record | +| `--dataset.episode_time_s` | Duration of each recording episode in seconds | +| `--dataset.reset_time_s` | Duration of the reset phase between episodes in seconds | +| `--teleop.type` | Optional. Teleoperator to drive the robot during resets | + --- ## Inference Backends diff --git a/src/lerobot/scripts/lerobot_rollout.py b/src/lerobot/scripts/lerobot_rollout.py index 8ff2071db..d1bed58c7 100644 --- a/src/lerobot/scripts/lerobot_rollout.py +++ b/src/lerobot/scripts/lerobot_rollout.py @@ -115,11 +115,12 @@ Usage examples # Legacy mode — episode-oriented recording, mirrors old lerobot-record lerobot-rollout \\ --strategy.type=legacy \\ + --policy.path=user/my_policy \\ --robot.type=so100_follower \\ --robot.port=/dev/ttyACM0 \\ --teleop.type=so100_leader \\ --teleop.port=/dev/ttyACM1 \\ - --dataset.repo_id=user/grab_cube \\ + --dataset.repo_id=user/rollout_legacy_data \\ --dataset.num_episodes=20 \\ --dataset.single_task="Grab the cube"