feat: add SO101 recording and ACT workflow with progress tracking

This commit is contained in:
ylhan
2026-09-10 16:46:58 +08:00
parent 2e33355a9c
commit cbf51facff
16 changed files with 604 additions and 7 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
# Shared task configuration; source from a launcher.
set -eo pipefail
TASK_SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
source "$TASK_SCRIPT_DIR/../env/activate_lerobot.sh"
set -u
TASK_TEXT='Pick up the block and place it in the white box.'
DATASET_ID="${DATASET_ID:-local/block_white_box_v1}"
DATASET_ROOT="${DATASET_ROOT:-$LEROBOT_PROJECT_DIR/data/block_white_box_v1}"
TASK_CAMERAS='{"wrist": {"type": "opencv", "index_or_path": "/dev/v4l/by-id/usb-ZSKJ-260319-K_Integrated_Webcam_HD-video-index0", "width": 640, "height": 480, "fps": 30, "fourcc": "MJPG"}, "front": {"type": "opencv", "index_or_path": "/dev/v4l/by-id/usb-Sonix_Technology_Co.__Ltd._USB2.0_CAM1_USB2.0_CAM1-video-index0", "width": 640, "height": 480, "fps": 25, "fourcc": "MJPG"}}'
ROBOT_ARGS=(--robot.type=so101_follower "--robot.port=$FOLLOWER_PORT" --robot.id=zihao_follower_arm "--robot.cameras=$TASK_CAMERAS")
run_task() {
if [[ "${DRY_RUN:-0}" == 1 ]]; then
printf '%q ' "$@"
printf '\n'
return
fi
exec "$@"
}
check_task_devices() {
[[ "${DRY_RUN:-0}" == 1 ]] && return 0
local device
for device in "$FOLLOWER_PORT" "/dev/v4l/by-id/usb-ZSKJ-260319-K_Integrated_Webcam_HD-video-index0" "/dev/v4l/by-id/usb-Sonix_Technology_Co.__Ltd._USB2.0_CAM1_USB2.0_CAM1-video-index0"; do
[[ -r "$device" && -w "$device" ]] || { echo "设备未连接或缺少读写权限:$device" >&2; exit 1; }
done
}