LeRobot documentation
GR00T Policy
GR00T Policy
GR00T là một họ mô hình nền tảng của NVIDIA dành cho suy luận và kỹ năng tổng quát cho robot hình người. Đây là một chính sách xuyên thân (cross-embodiment) nhận đầu vào đa phương thức, bao gồm ngôn ngữ, hình ảnh và cảm giác vị giác (proprioception), để thực hiện các thao tác trong nhiều môi trường khác nhau.
LeRobot tích hợp GR00T N1.7 thông qua kiểu chính sách groot.
Thay đổi lớn: Hỗ trợ GR00T N1.5 đã bị loại bỏ khỏi LeRobot, và các bản phát hành hiện tại chỉ hỗ trợ GR00T N1.7. Các checkpoint và cấu hình N1.5 sẽ bị từ chối kèm theo ghi chú về việc di chuyển. Để tiếp tục sử dụng checkpoint N1.5, hãy cố định phiên bản phát hành cuối cùng hỗ trợ nó:
pip install 'lerobot==0.5.1'. Để sử dụng bản phát hành hiện tại, hãy di chuyển sang GR00T N1.7 (mô hình cơ sởnvidia/GR00T-N1.7-3B).
Tổng quan về Mô hình
GR00T N1.7 sử dụng backbone Cosmos-Reason2/Qwen3-VL và cung cấp các checkpoint cho SimplerEnv, DROID và LIBERO.
Nhà phát triển và nhà nghiên cứu có thể huấn luyện lại GR00T bằng dữ liệu thực hoặc tổng hợp của riêng họ để điều chỉnh mô hình cho các robot hình người hoặc tác vụ cụ thể.
GR00T sử dụng các bộ mã hóa thị giác và ngôn ngữ được huấn luyện trước cùng với một transformer hành động khớp dòng (flow matching) để mô hình hóa một cụm hành động có điều kiện dựa trên thị giác, ngôn ngữ và cảm nhận vị trí cơ thể (proprioception).
Hiệu suất vượt trội của nó đến từ việc được huấn luyện trên một bộ dữ liệu humanoid rộng lớn và đa dạng, bao gồm:
- Dữ liệu thực tế được thu thập từ robot.
- Dữ liệu tổng hợp được tạo bằng NVIDIA Isaac GR00T Blueprint.
- Dữ liệu video ở quy mô Internet.
Cách tiếp cận này cho phép mô hình có khả năng thích ứng cao thông qua huấn luyện sau cho các cấu hình, tác vụ và môi trường cụ thể.
Yêu cầu cài đặt
GR00T được thiết kế cho các hệ thống tăng tốc bằng GPU của NVIDIA. Cài đặt LeRobot với phần mở rộng GR00T:
pip install "lerobot[groot]"Đối với việc kiểm tra mã nguồn:
pip install -e ".[groot]"Cách sử dụng
Để sử dụng GR00T N1.7:
--policy.type=groot
Huấn luyện
Ví dụ lệnh huấn luyện
Dưới đây là lệnh huấn luyện hoàn chỉnh để tinh chỉnh mô hình GR00T cơ sở trên bộ dữ liệu của bạn:
Lệnh này sử dụng cờ new_embodiment, được dùng cho robot SO-101, đọc thêm về cách GR00T xử lý các dạng thân robot khác nhau..
# install extra deps for training
pip install "lerobot[training]"
hf auth login
# Trackio needs no login for local runs; pass --trackio.space_id=<user>/<space> to sync runs to a Hugging Face Space.
export DATASET_NAME=your_data_set
export HF_USER=your_hf_username
export DATASET=$HF_USER/$DATASET_NAME
export REPO_ID="${DATASET}_GR00T17" #this is the model that will be uploaded to huggingface
export OUTPUT_DIR=outputs/train/$REPO_ID
lerobot-train \
--dataset.repo_id=$DATASET \
--dataset.image_transforms.enable=true \
--policy.type=groot \
--policy.device=cuda \
--policy.base_model_path=nvidia/GR00T-N1.7-3B \
--policy.embodiment_tag=new_embodiment \
--policy.chunk_size=16 \
--policy.n_action_steps=16 \
--policy.use_relative_actions=true \
--policy.relative_exclude_joints='["gripper"]' \
--policy.use_bf16=true \
--policy.push_to_hub=true \
--policy.repo_id=$REPO_ID \
--seed=42 \
--batch_size=64 \
--steps=20000 \
--save_checkpoint=true \
--save_freq=5000 \
--use_policy_training_preset=true \
--env_eval_freq=0 \
--eval_steps=0 \
--log_freq=10 \
--output_dir=$OUTPUT_DIR \
--job_name=$DATASET \
--trackio.enable=true \
--trackio.disable_artifact=true
Kết quả Hiệu năng
Kết quả Benchmark LIBERO
Thực hiện các hướng dẫn thiết lập LIBERO trước khi chạy
lerobot-eval.
GR00T N1.7 đã thể hiện hiệu suất mạnh mẽ trên bộ benchmark LIBERO. Để tái tạo kết quả của LeRobot, hãy làm theo các hướng dẫn trong phần LIBERO.
Huấn luyện trên LIBERO
Lệnh huấn luyện mẫu cho một bộ LIBERO (ở đây là libero_spatial):
IMAGE_TRANSFORMS='{
"brightness": {"weight": 1.0, "type": "ColorJitter", "kwargs": {"brightness": [0.7, 1.3]}},
"contrast": {"weight": 1.0, "type": "ColorJitter", "kwargs": {"contrast": [0.6, 1.4]}},
"saturation": {"weight": 1.0, "type": "ColorJitter", "kwargs": {"saturation": [0.5, 1.5]}},
"hue": {"weight": 1.0, "type": "ColorJitter", "kwargs": {"hue": [-0.08, 0.08]}}
}'
lerobot-train \
--dataset.repo_id=IPEC-COMMUNITY/libero_spatial_no_noops_1.0.0_lerobot \
--dataset.root=/datasets/libero_spatial \
--dataset.revision=main \
--dataset.video_backend=pyav \
--dataset.image_transforms.enable=true \
--dataset.image_transforms.max_num_transforms=4 \
--dataset.image_transforms.tfs="$IMAGE_TRANSFORMS" \
--policy.type=groot \
--policy.base_model_path=nvidia/GR00T-N1.7-3B \
--policy.embodiment_tag=libero_sim \
--policy.push_to_hub=false \
--policy.use_relative_actions=false \
--policy.max_steps=20000 \
--batch_size=320 \
--steps=20000 \
--save_freq=2000 \
--env_eval_freq=0 \
--eval_steps=0 \
--log_freq=10 \
--trackio.enable=true \
--trackio.project=lerobot \
--trackio.disable_artifact=true \
--num_workers=4 \
--prefetch_factor=2 \
--persistent_workers=true \
--output_dir=$OUTPUT_DIR \
--job_name=$JOB_NAMEĐiều này sẽ làm theo công thức được tìm thấy tại đây.
Kết quả LIBERO của GR00T N1.7
Kết quả tích hợp LeRobot sơ bộ (GR00T-LeRobot, eval.n_episodes >= 50 mỗi bộ):
| Bộ | Tỷ lệ thành công | Checkpoint |
|---|---|---|
| LIBERO Spatial | 95% | nvidia/gr00t17-lerobot-libero_spatial-640 |
| LIBERO Object | 100% | nvidia/gr00t17-lerobot-libero_object-640 |
| Mục tiêu LIBERO | 98% | nvidia/gr00t17-lerobot-libero_goal-640 |
| LIBERO 10 (Dài) | 93% | nvidia/gr00t17-lerobot-libero_10-640 |
| Trung bình | 96.5% |
export MODEL_ID=your_trained_model_on_huggingface
lerobot-eval \
--policy.path=$MODEL_ID \
--policy.embodiment_tag=libero_sim \
--env.type=libero \
--env.task=libero_spatial \
--eval.n_episodes=50Sử dụng eval.n_episodes >= 50 cho mỗi bộ bài kiểm tra khi báo cáo tỷ lệ thành công.
Đánh giá trên cấu hình phần cứng của bạn
Sau khi bạn đã huấn luyện mô hình của mình bằng các tham số, bạn có thể chạy suy luận trong tác vụ hạ nguồn của mình. Làm theo các hướng dẫn trong Policy Deployment (lerobot-rollout). Ví dụ:
# install extra deps for roullout and real hardware
pip install "lerobot[feetech,viz]"
export MODEL_ID=your_trained_model_on_huggingface
# make sure that camera index matches your setup!
# find index using `uv run lerobot-find-cameras opencv`
WRIST_CAM='wrist: {type: opencv, index_or_path: 2, width: 640, height: 480, fps: 30, fourcc: "MJPG"}'
FRONT_CAM='front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: "MJPG"}'
export ROBOT_CAMERAS="{ $WRIST_CAM, $FRONT_CAM }"
export ROBOT_ID=follower_robot
export ROBOT_PORT=/dev/ttyACM0
# Set --inference.rtc.enabled=False if RTC causes inference instability
uv run lerobot-rollout \
--strategy.type=base \
--policy.path=$MODEL_ID \
--policy.base_model_path=nvidia/GR00T-N1.7-3B \
--policy.n_action_steps=8 \
--robot.type=so101_follower \
--robot.port=$ROBOT_PORT \
--robot.id=$ROBOT_ID \
--robot.cameras="$ROBOT_CAMERAS" \
--task="place the vial in the rack" \
--duration=60 \
--device=cuda \
--display_data=true \
--inference.type=rtc \
--inference.rtc.enabled=True \
--inference.rtc.execution_horizon=8 \
--inference.queue_threshold=0Giá trị của
inference.queue_thresholdkhông nên vượt quá 5 để đảm bảo suy luận ổn định.
Giấy phép
GR00T N1.7 được phát hành theo Thỏa thuận Giấy phép Mô hình Mở của NVIDIA.
Update on GitHub