# ProtoMotions 3
**一个用于模拟人形机器人的 GPU 加速框架**
[](LICENSE.md)
[](https://protomotions.github.io/)
[](https://github.com/newton-physics/newton/commit/e7a737c)
[](https://github.com/isaac-sim/IsaacLab/releases/tag/v2.3.0)
[](https://developer.nvidia.com/isaac-gym)
[](https://github.com/Genesis-Embodied-AI/Genesis)
[](https://github.com/google-deepmind/mujoco)
[](https://deepwiki.com/NVlabs/ProtoMotions) (未经验证的 AI 生成内容)
## 概述
**ProtoMotions3** 是一个 GPU 加速的模拟和学习框架,用于训练基于物理模拟的数字人和人形机器人。我们的使命是为**动画**、**机器人技术**和**强化学习**领域的研究人员和从业者提供一个用于各种模拟人形机器人学习任务和环境的**快速原型设计平台**——以此连接不同社区的努力。
**模块化**、**可扩展性**和**伸缩性**是 ProtoMotions3 的核心理念。它是**社区驱动**的,并在 [Apache-2.0 license](LICENSE.md) 下获得许可。
此外,还可以查看 **[MimicKit](https://github.com/xbpeng/MimicKit/tree/main)**,这是我们的兄弟仓库,提供了一个用于动作模仿学习的轻量级框架。
## 使用 ProtoMotions3 你可以做什么
### 🏃 大规模动作学习
在 4 张 A100 上,只需 **12 小时**,即可训练你完全基于物理模拟的角色,从整个公开的 [**AMASS**](https://amass.is.tue.mpg.de/) 人类动画数据集(**40 多小时**)中学习动作技能。
### 📈 可扩展的多 GPU 训练
通过让每个 GPU 处理一部分动作,将训练扩展到更大的数据集。例如,我们使用了 **24 张 A100**,在 [**SOMA**](https://github.com/NVlabs/SOMA-X) 骨骼格式下结合 [**BONES**](https://huggingface.co/datasets/bones-studio/seed) 数据集,在每个 GPU 上训练了 **1.3 万个动作**。查看 [快速开始](https://protomotions.github.io/getting_started/quickstart.html) 和 [SEED BVH 数据准备](https://protomotions.github.io/getting_started/seed_bvh_preparation.html),立即体验该数据集和预训练模型。
### 🔄 一键重定向
使用内置的基于 [**PyRoki**](https://github.com/chungmin99/pyroki) 的优化器,只需一条命令即可将整个 [AMASS](https://amass.is.tue.mpg.de/) 数据集转移(重定向)到你最喜欢的机器人。
### 🤖 训练任何机器人
只需更改一个命令参数,即可在 **12 小时**内训练你的机器人执行 AMASS 运动技能:
`--robot-name=smpl` → `--robot-name=h1_2`,并准备重定向的动作(参见[此处](https://protomotions.github.io/tutorials/workflows/retargeting_pyroki.html))
### 🔬 Sim2Sim 测试
在 **H1_2** 或 **G1** 上,只需一键测试(`--simulator=isaacgym` → `--simulator=newton` → `--simulator=mujoco`),即可在不同的物理引擎(NVIDIA Newton, MuJoCo CPU)中测试机器人控制策略。下面展示的策略仅使用你可以从真实硬件实际获取的观测值。
### 🤖 从仿真到现实
在模拟中训练,部署到真实硬件。ProtoMotions 在整个 [**BONES-SEED**](https://huggingface.co/datasets/bones-studio/seed) 数据集(约 14.2 万个动作)上训练了一个通用跟踪策略,并直接 zero-shot 转移到 Unitree G1 人形机器人上。
我们的部署 pipeline 导出一个单一的 ONNX 模型(内置观测计算),因此部署框架只需提供原始传感器信号——无需重写 obs 函数或匹配训练内部结构。我们通过出色的 [**RoboJuDo**](https://github.com/HansZ8/RoboJuDo) 框架在 Unitree G1 上进行了测试,仅添加了一个策略文件,无需对 RoboJuDo 核心进行任何强制性更改。
📖 [**完整部署教程**](https://protomotions.github.io/tutorials/workflows/g1_deployment.html) —— 从数据准备到真实机器人,完全可复现。
### 🎨 高保真渲染
在 [**IsaacSim 5.0+**](https://developer.nvidia.com/isaac-sim) 中测试你的策略,它允许你加载精美渲染的 Gaussian splatting 背景(使用 [**Omniverse NuRec**](https://developer.nvidia.com/blog/reconstruct-a-scene-in-nvidia-isaac-sim-using-only-a-smartphone/) —— 此渲染场景目前尚不支持物理交互)。
### 🎬 使用 Kimodo 进行动作创作
借助 [**Kimodo**](https://research.nvidia.com/labs/sil/projects/kimodo/)(NVIDIA 的 text-to-motion 生成模型),你可以从文本 prompt 生成任何动作,并使用 ProtoMotions 训练一个执行该动作的基于物理的策略——适用于 SOMA 动画角色和 Unitree G1 机器人。以这种方式训练的策略可以直接部署在真实硬件上。
有关如何将 Kimodo 输出转换为 ProtoMotions 格式,请参见 [Kimodo 数据准备](https://protomotions.github.io/getting_started/kimodo_preparation.html)。
### 🏗️ 程序化场景生成
程序化生成大量场景,用于可扩展的**合成数据生成 (SDG)**:从种子动作集开始,使用 RL 将动作适应到增强的场景中。
### 🎭 生成式策略
训练一个生成式策略(例如 [**MaskedMimic**](https://research.nvidia.com/labs/par/maskedmimic/)),使其能够自主选择“移动”来完成任务。有关可重用的离散 latent 先验和 PEFT 任务适配器,请参见 [**GPC 和 PEFT 指南**](https://protomotions.github.io/user_guide/gpc.html)。
### ⛰️ 地形导航
训练你的机器人攀登充满挑战的地形!
### 🎯 自定义环境
有新任务?从模块化组件构建它——不需要庞大的 env 类。以下是 **steering** 任务的组成方式:
| 层级 | 文件 | 功能描述 |
|-------|------|-------------|
| **Control** | [`steering_control.py`](protomotions/envs/control/steering_control.py) | 管理任务状态(目标方向、速度、朝向)。定期采样新的航向目标。 |
| **Observation** | [`obs/steering.py`](protomotions/envs/obs/steering.py) | 纯 tensor kernel —— 将目标转换为机器人本地坐标系 → 5D 特征向量。 |
| **Reward** | [`rewards/task.py`](protomotions/envs/rewards/task.py) | `compute_heading_velocity_rew` —— 混合方向匹配 (0.7) 和朝向匹配 (0.3) 奖励。 |
| **Experiment** | [`steering/mlp.py`](examples/experiments/steering/mlp.py) | 通过 context paths 将组件作为 `MdpComponent` 实例连接在一起。 |
每个部分都是一个独立的函数或类——实验配置使用 [`MdpComponent`](protomotions/envs/mdp_component.py) 和 [`FieldPath`](protomotions/envs/context_views.py) 描述符将它们绑定成一个完整的任务。
### 🧪 新的 RL 算法
想尝试新的 RL 算法?利用我们的模块化设计,只需约 50 行代码即可在 ProtoMotions 中实现诸如 **ADD** 之类的算法:
📄 [`protomotions/agents/mimic/agent_add.py`](protomotions/agents/mimic/agent_add.py)
### 🔧 自定义模拟器
想使用你自己的模拟器?实现这些在不同模拟器之间进行接口交互的 API:
📄 [`protomotions/simulator/base_simulator/`](protomotions/simulator/base_simulator/)
请参考这个社区贡献的示例:
📄 [`protomotions/simulator/genesis/`](protomotions/simulator/genesis/)
### 🤖 添加你自己的机器人
想添加你自己的机器人?请按照以下步骤操作:
1. 将你的 `.xml` MuJoCo 规范文件添加到 [`protomotions/data/assets/mjcf/`](protomotions/data/assets/mjcf/)
2. 填写配置字段(参见如 [`protomotions/robot_configs/g1.py`](protomotions/robot_configs/g1.py) 的示例)
3. 在 [`protomotions/robot_configs/factory.py`](protomotions/robot_configs/factory.py) 中注册
然后你就可以开始了!
## 文档
📚 **[完整文档](https://protomotions.github.io/)**
- [安装指南](https://protomotions.github.io/getting_started/installation.html)
- [快速开始](https://protomotions.github.io/getting_started/quickstart.html)
- [GPC 和 PEFT](https://protomotions.github.io/user_guide/gpc.html)
- [AMASS 数据准备](https://protomotions.github.io/getting_started/amass_preparation.html)
- [PHUMA 数据准备](https://protomotions.github.io/getting_started/phuma_preparation.html)
- [SEED BVH 数据准备](https://protomotions.github.io/getting_started/seed_bvh_preparation.html)
- [SEED G1 CSV 数据准备](https://protomotions.github.io/getting_started/seed_g1_csv_preparation.html)
- [Kimodo 数据准备](https://protomotions.github.io/getting_started/kimodo_preparation.html)
- [教程](https://protomotions.github.io/tutorials/)
- [API 参考](https://protomotions.github.io/api_reference/)
- [G1 部署:从数据到真实机器人](https://protomotions.github.io/tutorials/workflows/g1_deployment.html)
## 许可证
ProtoMotions3 采用 [**Apache-2.0 License**](LICENSE.md) 发布。
第三方软件和捆绑资产声明列在 [legal/](legal/) 中,包括 Unitree、BeyondMimic、Isaac Lab 以及 SMPL/SMPL-H 的归属和许可证声明。
## 引用
如果你在研究中使用 ProtoMotions3,请引用:
```
@misc{ProtoMotions,
title = {ProtoMotions3: An Open-source Framework for Humanoid Simulation and Control},
author = {Tessler*, Chen and Jiang*, Yifeng and Peng, Xue Bin and Coumans, Erwin and Shi, Yi and Zhang, Haotian and Rempe, Davis and Chechik†, Gal and Fidler†, Sanja},
year = {2025},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/NVLabs/ProtoMotions/}},
}
```