GR00T 是 NVIDIA 面向通用人形机器人 inference 与技能的基础模型系列。它是一种跨具身 policy,接受多模态输入(包括语言、图像和本体感觉),以在多样化的环境中执行操作任务。
LeRobot 通过 groot policy 类型集成 GR00T N1.7。
破坏性变更: LeRobot 已移除对 GR00T N1.5 的支持,当前版本仅支持 GR00T N1.7。N1.5 的 checkpoint 和配置会被拒绝,并附有迁移说明。要继续使用 N1.5 checkpoint,请固定到最后一个支持它的版本:
pip install 'lerobot==0.5.1'。要使用当前版本,请迁移到 GR00T N1.7(基础模型nvidia/GR00T-N1.7-3B)。
GR00T N1.7 使用 Cosmos-Reason2/Qwen3-VL 主干网络,并为 SimplerEnv、DROID 和 LIBERO 提供 checkpoint。
开发者和研究人员可以使用自己的真实或合成数据对 GR00T 进行后训练,以适应特定的人形机器人或任务。
GR00T 使用预训练的视觉和语言编码器,配合流匹配 action Transformer,对以视觉、语言和本体感觉为条件的一串 action 进行建模。
它之所以性能强劲,是因为在广泛而多样的人形 dataset 上训练,其中包括:
这种方法使模型能够通过后训练对特定的具身形式、任务和环境具有很高的适应性。
GR00T 面向 NVIDIA GPU 加速系统。安装带 GR00T 可选依赖的 LeRobot:
pip install "lerobot[groot]"对于源码检出(source checkout):
pip install -e ".[groot]"要使用 GR00T N1.7:
--policy.type=groot
以下是在你自己的 dataset 上 fine-tune GR00T 基础模型的完整训练命令:
此命令使用了 new_embodiment 标志,该标志用于 SO-101 机器人,了解更多关于 GR00T 如何处理不同具身形式的信息。。
# install extra deps for training
pip install "lerobot[training]"
hf auth login
wandb login
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 \
--wandb.enable=true \
--wandb.disable_artifact=true
在运行
lerobot-eval之前,请先遵循 LIBERO 的安装说明。
GR00T N1.7 在 LIBERO benchmark 套件上展现了强劲的性能。要复现 LeRobot 的结果,请遵循 LIBERO 一节中的说明。
针对某个 LIBERO 套件的示例训练命令(此处为 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 \
--wandb.enable=true \
--wandb.project=lerobot \
--wandb.mode=online \
--wandb.disable_artifact=true \
--num_workers=4 \
--prefetch_factor=2 \
--persistent_workers=true \
--output_dir=$OUTPUT_DIR \
--job_name=$JOB_NAME这将遵循此处找到的方案。
LeRobot 集成的初步结果(GR00T-LeRobot,每个套件 eval.n_episodes >= 50):
| 套件 | 成功率 | checkpoint |
|---|---|---|
| LIBERO Spatial | 95% | nvidia/gr00t17-lerobot-libero_spatial-640 |
| LIBERO Object | 100% | nvidia/gr00t17-lerobot-libero_object-640 |
| LIBERO Goal | 98% | nvidia/gr00t17-lerobot-libero_goal-640 |
| LIBERO 10 (Long) | 93% | nvidia/gr00t17-lerobot-libero_10-640 |
| 平均值 | 96.5% |
export MODEL_ID=your_trained_model_on_huggingface
lerobot-eval \
--policy.type=groot \
--policy.base_model_path=$MODEL_ID \
--policy.embodiment_tag=libero_sim \
--env.type=libero \
--env.task=libero_spatial \
--eval.n_episodes=50报告成功率时,每个套件使用 eval.n_episodes >= 50。
使用你的参数训练好模型后,你就可以在下游任务中运行 inference。请遵循policy deployment(lerobot-rollout)中的说明。例如:
# 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
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 \ # set to False if it causes inference instability
--inference.rtc.execution_horizon=8 \
--inference.queue_threshold=0为确保 inference 稳定,
inference.queue_threshold的值不应超过 5。
GR00T N1.7 根据 NVIDIA 开放模型许可协议发布。
在 GitHub 上更新