Policy Inference
1. Policy Inference
Run inference with a trained policy model and automatically record the results:
/isaac-sim/python.sh src/lerobot/scripts/lerobot_record.py \
--robot.type=walker_s2_sim \
--robot.headless=false \
--task=Part_Sorting \
--policy.path=your_checkpoint_dir \
--dataset.repo_id=your_org/eval_Part_Sorting \
--dataset.single_task="Part Sorting" \
--dataset.num_episodes=2 \
--dataset.push_to_hub=false \
--dataset.episode_time_s=100000000 \
--dataset.num_image_writer_processes=4 \
--dataset.root=${workspaceFolder}/datasets/Part_Sorting/your_policy_type \
--dataset.video=true \
--play_sounds=false
| Argument | Description | Default / Notes |
|---|---|---|
--robot.type | Robot type | walker_s2_sim |
--robot.headless | Whether to run in headless mode | false |
--task | Task name (Part_Sorting, Conveyor_Sorting, Foam_Inlaying, Packing_Box) | Foam_Inlaying |
--policy.path | Policy checkpoint path (local or Hugging Face) | Required |
--dataset.repo_id | Dataset identifier; in inference it should follow xx/eval_xx | Required |
--dataset.single_task | Task description | Required (or auto-set by task) |
--dataset.num_episodes | Number of inference episodes | 50 |
--dataset.root | Output path for inference results | Required |
--dataset.video | Whether to record video | true |
--dataset.fps | FPS | 30 |
--dataset.episode_time_s | Episode duration (seconds) | 60 |
--dataset.push_to_hub | Upload to Hugging Face | false |
--play_sounds | Play audio prompts | true |
Notes:
- Policy inference uses the
lerobot_record.pyscript. Specify the policy model path via--policy.path. The script will load the model, run inference in the simulation environment, and record the resulting data automatically. - In inference mode,
--dataset.repo_idshould use thexx/eval_xxformat (e.g.,your_org/eval_Part_Sorting) to distinguish it from dataset naming in data-collection mode. - Replace
${workspaceFolder}with your actual working directory path.