snippet · growing
Komut kartı
Kayıt, Colab eğitimi, Mac RTC rollout, sağlama ve sim komutları; tek yerde.
Hepsi so101/ içinden, source .venv/bin/activate sonrası. Portlar
değişirse ls /dev/cu.usbmodem*. Kameralar: top index 1 (C310), wrist
index 0.
Ortak parçalar
ROBOT="--robot.type=so101_follower --robot.port=/dev/cu.usbmodem5AB01794851 --robot.id=follower --robot.calibration_dir=calibration"
LEADER="--teleop.type=so101_leader --teleop.port=/dev/cu.usbmodem5A7C1232561 --teleop.id=leader --teleop.calibration_dir=calibration"
CAMS='--robot.cameras={ top: {type: opencv, index_or_path: 1, width: 640, height: 480, fps: 30}, wrist: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30}}'
Kayıt
lerobot-record $ROBOT $LEADER "$CAMS" \
--dataset.repo_id=fport/so101_xox_v1 --dataset.root=$PWD/data/xox-v1 \
--dataset.single_task="put the red X in the top left cell" \
--dataset.num_episodes=10 --dataset.episode_time_s=30 --dataset.reset_time_s=20 \
--dataset.streaming_encoding=true --dataset.encoder_threads=2 \
--dataset.push_to_hub=false --display_data=true
# sonraki bloklar: --resume=true
Eğitim (Colab)
pip install -q "lerobot[smolvla]==0.6.1" && hf auth login --token $HF_TOKEN
lerobot-train \
--policy.path=HashtagRobotics/smolvla-tic-tac-toe-games-1-15-120k \
--dataset.repo_id=fport/so101_xox_v1 \
--rename_map='{"observation.images.top":"observation.images.camera1","observation.images.wrist":"observation.images.camera2"}' \
--policy.empty_cameras=1 --policy.device=cuda --policy.use_amp=false \
--policy.scheduler_decay_steps=20000 \
--policy.repo_id=fport/smolvla_xox_v1 --policy.push_to_hub=true --policy.private=true \
--batch_size=32 --steps=20000 --save_freq=5000 --save_checkpoint_to_hub=true \
--num_workers=4 --seed=42 \
--output_dir=/content/drive/MyDrive/so101/smolvla_xox_v1 --job_name=smolvla_xox_v1 --wandb.enable=false
Robotta (Mac, RTC)
hf download fport/smolvla_xox_v1 --local-dir policies/smolvla_xox_v1
lerobot-rollout --strategy.type=base $ROBOT "$CAMS" \
--policy.path=policies/smolvla_xox_v1 --policy.device=mps \
--inference.type=rtc --inference.rtc.execution_horizon=10 --inference.rtc.max_guidance_weight=10.0 \
--task="put the red X in the top left cell" --duration=40 --display_data=true
Sağlama ve sim
python sim_check/act_offline_check.py --device mps
../.venv/bin/python sim_check/mujoco_replay.py --npz outputs/sim_check/ep000.npz --gif
../.venv/bin/mjpython sim_check/xox_sim.py --viewer
python scripts/smolvla_latency.py --path policies/smolvla_xox_v1 --device mps
Kalibrasyon sorusunda Enter. Teleop açıkken porta dokunma. max_relative_target verme.
Komutlar tam yolla.