第八步:pi0.5 推論命令列
部署統一使用
lerobot-rollout,用法和參數見命令列說明。
Ubuntu
- 刪除原有的數據集(如有)
Shell
sudo chmod 666 /dev/ttyACM*
sudo rm -rf /home/<你的使用者名稱>/.cache/huggingface/lerobot/<你的使用者名稱>/rollout_lerobot_my_dataset_shake_hands
export TOKENIZERS_PARALLELISM=false- 部署命令列
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/<你的使用者名稱>/Downloads/lerobot_output/shake/pi05/50K/pretrained_model \
--task="Shake Hands" \
--duration=60 \
--display_data=falseMac
- 刪除原有的數據集(如有)
Shell
sudo rm -rf /Users/<你的使用者名稱>/.cache/huggingface/lerobot/<你的使用者名稱>/rollout_lerobot_my_dataset_shake_hands- 部署命令列
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/<你的使用者名稱>/Downloads/7-lerobot/shake/pi05/50K/pretrained_model \
--task="Shake Hands" \
--duration=60 \
--display_data=false

推理很慢的原因
數據集太小了
顯卡顯存不夠,需要上50系顯卡

