Robotics
LeRobot
English
lelab
so-100
imitation-learning
education
act
diffusion-policy
smolvla
gr00t
van-i's picture
Imitation learning test stand write-up
c68846b verified
Raw History Blame Contribute Delete
1.38 kB
#!/usr/bin/env bash
# Run one GR00T N1.7 trial on the follower. Usage: ./run-groot.sh [checkpoint_step] [seconds] ["task text"]
# ./run-groot.sh -> 018000, 60 s, the trained task
# ./run-groot.sh 012000 30
# ./run-groot.sh 018000 30 "grab roll and move it to left spot"
# GR00T needs chunked (RTC) inference; the flags below are the ones LeLab uses for it.
set -euo pipefail
STEP=${1:-018000}
DUR=${2:-60}
TASK=${3:-pick r2d2 and put to box}
RUN=$HOME/.cache/huggingface/lerobot/outputs/train/groot_van-i_r2d2_to_box_bg_2026-10-04_14-17-34
LOG=$HOME/.cache/huggingface/lerobot/inference_logs/$(date +%s)_groot_${STEP}.log
"$(dirname "$0")/camera-setup.sh" >/dev/null
echo "GR00T ${STEP}, ${DUR}s, task: ${TASK} -> ${LOG}"
source "$(dirname "$0")/rollout-common.sh"
run_rollout "$LOG" "$DUR" -- \
--strategy.type=base \
--policy.path="$RUN/checkpoints/$STEP/pretrained_model" \
--policy.device=cuda \
--inference.type=rtc --inference.rtc.execution_horizon=40 --inference.queue_threshold=0 \
--robot.type=so101_follower --robot.port=/dev/ttyACM1 --robot.id=so-100 \
--robot.cameras="{left: {type: opencv, index_or_path: 2, width: 640, height: 480, fps: 30}, grip: {type: opencv, index_or_path: 4, width: 640, height: 480, fps: 30}, right: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30}}" \
--task="$TASK" \
--duration="$DUR"