🧪 New tutorials are being published — build from robot arms to sensors step by step
Skip to content

Step 8: Inference — pi0.5 Command ​

Deployment uniformly uses lerobot-rollout; for usage and parameters, see Command line reference.

Ubuntu ​

  • Delete the existing dataset (if any)
Shell
sudo chmod 666 /dev/ttyACM*
sudo rm -rf /home/<username>/.cache/huggingface/lerobot/<username>/rollout_lerobot_my_dataset_shake_hands
export TOKENIZERS_PARALLELISM=false
  • Deployment command
Shell
lerobot-rollout  \
  --strategy.type=base \
  --robot.type=so101_follower \
  --robot.port=/dev/ttyACM0 \
  --robot.cameras="{ front: {type: opencv, index_or_path: 0, width: 1280, height: 720, fps: 30, fourcc: "MJPG"}}" \
  --robot.id=my_follower_arm \
  --policy.path=/home/<username>/Downloads/lerobot_output/shake/pi05/50K/pretrained_model \
  --task="Shake Hands" \
  --duration=60 \
  --display_data=false

Mac ​

  • Delete the existing dataset (if any)
Shell
sudo rm -rf /Users/<username>/.cache/huggingface/lerobot/<username>/rollout_lerobot_my_dataset_shake_hands
  • Deployment command
Shell
lerobot-rollout  \
  --strategy.type=base \
  --robot.type=so101_follower \
  --robot.port=/dev/tty.usbmodem5AAF2193061 \
  --robot.cameras="{front: {type: opencv, index_or_path: 0, width: 1280, height: 720, fps: 30, fourcc: "MJPG"}}" \
  --robot.id=my_follower_arm \
  --policy.freeze_vision_encoder=false \
  --policy.dtype=bfloat16 \
  --policy.compile_model=true \
  --policy.device=cpu \
  --policy.path=/Users/<username>/Downloads/7-lerobot/shake/pi05/50K/pretrained_model \
  --task="Shake Hands" \
  --duration=60 \
  --display_data=false

image.png

image.png

Reasons inference is very slow ​

  • The dataset is too small

  • The GPU VRAM is insufficient; you need a 50-series GPU