⏱ ~49 min
里程碑
⭐ 为何重要

把 guided diffusion 作为 motion tracking 策略的指导信号,让真机人形从大规模人类动捕中直接学会跳/旋转/冲刺/翻筋斗等高难全身技能,是『diffusion 生成动作 + RL tracking』在真机上的代表作。承上 DeepMimic/AMP 的 motion-imitation 范式与 ExBody/HOVER/ASAP/HiLo 的 whole-body control,启下 SONIC 等 scaling 工作,标志着 humanoid 动作学习从『跟踪单条参考轨迹』走向『从分布中采样并物理执行』。

建立在
催生
  • general humanoid motor skills
机器人humanoid
数据集AMASS
上真机
物理感知
实时
输入模态proprioception

P-BeyondMimic-2025 · Humanoid Control via Guided Diffusion

作者 / 机构:Qiayuan Liao¹, Takara E. Truong², Xiaoyu Huang¹, Yuman Gao¹, Guy Tevet², Koushil Sreenath¹‡, C. Karen Liu²‡(¹UC Berkeley Hybrid Robotics · ²Stanford)。†Liao/Truong/Huang 共同一作(掷硬币定序);‡Sreenath/Liu 共同指导。
发表:arXiv:2508.08241 [cs.RO](v1 2025-08-11,v4 2025-11-13)。papers.jsonl 标 paper_type=preprint,arXiv comments 字段仅含项目页链接,未明示会议录用。
arxiv:2508.08241 · 代码:已开源 github.com/HybridRobotics/whole_body_tracking(tracking 训练)+ HybridRobotics/motion_tracking_controller(C++ ONNX CPU 推理);PDF 原文载明 BeyondMimic "已被 MJLab、Unitree RL Lab 作为 default method 收录"(即被这两个第三方 RL 仓库采用,而非本文引用它们)· 项目页:beyondmimic.github.io(arXiv comments 字段收录,非推测)
在线索中的位置:T12 (agile locomotion) 转折 8 终点;T04 (motion prior) + T05 (diffusion policy) + T08 (action gen) 的交汇。
一句话定位:把"可扩展 RL motion tracking"(一段参考一个 policy,但所有 motion 共享一套 reward + 超参)和"latent state-action diffusion + classifier guidance"两阶段串起来——第一阶段从约 2.5 小时人类动捕学得数十种原子动作(30 段代表共 15 分钟 zero-shot 上真机),第二阶段用 diffusion 在推理时合成任意 task(joystick / waypoint / obstacle avoidance / motion inpainting),全部 zero-shot 部署到 Unitree G1 完成 aerial cartwheel、turn kick、连续翻滚等高动态动作。


动机

2025 年前 humanoid RL 有两个互斥的极端:

  1. 单 policy 多 skill(PHC、ASE、AMP 系列):scalable 但 RL 探索不足,动作不自然;
  2. 一 motion 一 policy + 手工 reward(DeepMimic、HuB 等传统 motion tracking):自然但每加一个 skill 都要 reward tuning,无法 scale 到几百技能。

更关键:即使学到了一堆 atomic skill,怎么让机器人在推理时按 task 自由组合、切换、过渡?现有 goal-conditioned controller 必须训练时枚举所有 goal,对 obstacle avoidance、waypoint navigation 这类隐式 / 难定义目标就失效。

BeyondMimic 的两个关键洞察:

  • Insight 1:scalable motion tracking 不需要复杂 reward 和重 domain randomization只要 actuator 建模精准 + reward 极简,单一 reward/超参就能 cover 几百种 motion。
  • Insight 2:diffusion model(不是 VAE/GAN)学的是 data 分布的梯度场(score function),所以可在推理时用任意可微 cost 做 classifier guidance——不需要重训就能朝新目标优化。这恰好解决了"task 组合"问题。

方法核心

所有数字来自 PDF 正文 Materials and Methods + Supplementary S1(页码 12–21、S1–S4)。

1. 总览:两阶段 + 零调优


Stage 1: Scalable Motion Tracking (RL)
  对每段参考 motion 单独训一个 tracking policy,但 reward / 超参 / domain randomization 全共享
  → 数十个 atomic-skill policies(约 2.5h 动捕、30 段代表 zero-shot 上真机),全部 sim-to-real ready

Stage 2: Versatile Control via Guided Diffusion
  (a) 用 DAgger 训一个 conditional VAE,把所有 tracking policies 蒸馏成 latent
  (b) 在 VAE rollout 上训一个 state-action latent diffusion model (LDM)
  推理:classifier guidance 用任意可微 cost 引导 LDM 生成 → VAE decode 出 action

部署:纯 C++/CPU + 移动 GPU无 robot/motion-specific tuning,zero-shot。

2. Stage 1:Scalable Motion Tracking via RL(Sec."Scalable Human Motion Tracking")

2.1 Anchor-centered tracking(关键创新)

参考 motion 在世界系,但训练/真机有 global drift。直接全息 tracking 会让 policy 脆弱。BeyondMimic 定义一个 anchor body(典型 root/torso):

  • anchor 本身直接 track reference $T_{\text{anchor}}^{\text{des}} = T_{\text{anchor}}^{\text{ref}}$;
  • 其他 body 的目标在 anchor-centered 系下表达:$T_b^{\text{des}} = A(T_b^{\text{ref}}, T_{\text{anchor}})$,其中 $A(\cdot)$ 是 yaw-aligned + height-preserving 变换(即丢掉 anchor 的 yaw 和 z 漂移,但保留 body 相对 anchor 的姿态)。

这等价于"允许整体 yaw/height 漂移但保 style",是 sim-to-real 的关键工程化。

2.2 Reward:极简 4 项(Sec. Rewards + Supp. S1)

$$r = r_{\text{task}} - \lambda_l r_{\text{limit}} - \lambda_s r_{\text{smooth}} - \lambda_c r_{\text{contact}}$$

权重:$\lambda_l = -10$,$\lambda_s = \lambda_c = -0.1$。可选 global tracking $r_g$ 权重 $\lambda_g = 0.5$。

task reward:4 个 Gaussian-shaped 指数项求和(沿用 DeepMimic 风格但极简化):

$$r_{\text{task}} = \sum_{s \in \{p, R, v, \omega\}} \exp\!\left(-\bar e_s / \sigma_s^2\right)$$

  • $\bar e_s$:position / orientation / linear-vel / angular-vel 在所有 target bodies 上的 MSE
  • $\sigma_s$:每项的 nominal error(empirically tuned,论文未给精确值,复现需查 S1 Table S1)。
  • target bodies $\mathcal{B}_{\text{target}}$ 是从全身体里选的紧凑子集(包含 end-effector $\mathcal{B}_{ee}$ = 两 ankle + 两 hand),避免近邻 link 冗余。

只有 3 个 regularization:joint-limit penalty、action-rate smoothness、self-collision contact count(仅非 end-effector body 计)。对比 prior work 一堆 stumble/slip/contact-force 项,这是论文的"reward 极简主义"卖点。

2.3 Observation / Action(Sec. Observation)

observation $o = [\psi,\ e_{\text{anchor}},\ V_{\text{imu}},\ \theta - \theta_0,\ \dot\theta,\ a_{\text{last}}]$:

  • $\psi = [\theta^{\text{ref}}, \dot\theta^{\text{ref}}]$:reference phase(注意只是 progress cue,policy 不直接 track 这俩 joint 状态);
  • $e_{\text{anchor}} \in \mathbb{R}^9$:anchor pose error = position error + 6D orientation error(取 rotation error matrix 前两列,Rot6D 表示,避免 quaternion/axis-angle 不连续——ablation 证明 Rot6D 关键);
  • $V_{\text{imu}} \in \mathbb{R}^6$:IMU 系下的 IMU twist(线+角速度);
  • $\theta - \theta_0$、$\dot\theta$:joint 角度(相对 default)、关节速度;
  • $a_{\text{last}}$:上一步 action(与 action-smoothness penalty 一起抑制高频抖动)。

Critic 看更多:asymmetric actor-critic,critic 额外看每个 body 相对 anchor 的位姿 $T_{\text{anchor}}^{-1} T_b,\ \forall b \in \mathcal{B}$,直接在 Cartesian 空间估 tracking error。

Action归一化 joint position setpoint $\theta^{\text{sp}} = \theta_0 + \alpha \odot a$,其中 $\alpha$ 是 per-joint action scale(论文给精确 heuristic:$\alpha = 0.25 \tau_{\max} / k_{p,j}$,即 1/4 最大扭矩除以 joint stiffness)。clip 到 joint limit——是 torque shaping 的中间变量。

2.4 PD gains heuristic(Supp. S1,关键工程)

每关节 $j$:$k_{p,j} = I_j \omega^2,\ k_{d,j} = 2 I_j \zeta \omega$,其中 $I_j = k_g^2 I_{\text{rotor},j}$(reflected inertia = gear ratio² × rotor inertia,忽略 subtree inertia);$\zeta = 2$(overdamped,因为 $I$ 被低估);$\omega = 2\pi \times 10$ Hz(10 Hz 自然频率,promotes compliance)。

关键论点:prior work 用高 PD gain 让关节像 stiff position servo("kinematic playback"),真机不可行——会放大噪声、降低 impact 吸收的被动柔顺、掩盖 torque 信息。BeyondMimic 用低 impedance + action scale heuristic,是 sim-to-real 自然度的关键。

2.5 Domain randomization(Supp. S1,最小集)

只随机 3 类(论文反对过重 DR):

  • contact friction(static $\mu \sim U(0.3, 1.6)$、dynamic $\mu \sim U(0.3, 1.2)$、restitution $e \sim U(0, 0.5)$);
  • default joint position offset(模拟 calibration error,多数 joint $\Delta\theta_0 \sim U(-0.01, 0.01)$ rad,ankle 较大 $U(-0.1, 0.1)$);
  • torso CoM offset($\Delta x \in [-0.025, 0.025]$ m,$\Delta y, \Delta z \in [-0.05, 0.05]$ m)。

加随机 velocity 扰动(间隔 $\Delta t \sim U(1, 3)$ s;平动 $\pm 0.5$ m/s,转动 $\pm 0.52 \sim 0.78$ rad/s)。

2.6 Adaptive sampling(Sec. Adaptive Sampling)

长 motion 不同段难度差很大。论文把参考按 1 秒切 bin,每个 bin 维护一个 failure rate(exponential moving average),采样时优先难 bin。难段熟练后 EMA 衰减,渐回 uniform。这是 RSI 的自适应强化版(DeepMimic 是均匀 RSI,BeyondMimic 是 failure-rate-weighted RSI)。

2.7 Termination

anchor body 或任一 end-effector 偏离过大即终止:$|e_{p,z,b}| > 0.25$ m 或 $\|e_{R,\text{anchor}}\| > 0.8$ rad。

3. Stage 2:Guided Latent State-Action Diffusion(Sec."Versatile Humanoid Control via Guided Diffusion")

3.1 为什么 diffusion 而非 VAE/GAN(论文论点)

  • VAE/GAN 学 explicit distribution,只能 sample 不能优化;
  • Diffusion 学 score function $\nabla_\tau \log p(\tau)$,可在推理时用 Bayes 反推 conditional score $\nabla_\tau \log p(\tau | \tau^*) = \nabla_\tau \log p(\tau) + \nabla_\tau \log p(\tau^* | \tau)$,把 conditional likelihood 用可微 cost $G(\tau)$ 近似($p(\tau^*|\tau) \propto \exp(-G(\tau))$),则 $\nabla_\tau \log p(\tau^*|\tau) = -\nabla_\tau G(\tau)$——任意可微 cost 都能引导,无需重训

3.2 两阶段架构

(a) Conditional VAE(compress motion tracking policy 到 latent)

不是对 raw PD action 做 VAE(action 尖锐不稳),而是对 reference-motion componentsencoder

  • encoder $z = E(\psi, e_{\text{anchor}})$(只吃 reference phase + anchor error);
  • decoder $\hat a = D(z, [g, V_{\text{imu}}, \theta, \dot\theta, a_{\text{last}}])$(latent + 其他 proprio → action);
  • DAgger 训(在 tracking policy rollout 上 imitation),loss = modified ELBO

$$\mathcal{L}_{\text{VAE}} = \mathbb{E}_{q_E(z|\psi, e_{\text{anchor}})}\|\hat a - a\|^2 + \beta D_{KL}(q_E(z|\psi, e_{\text{anchor}}) \| \mathcal{N}(0, I))$$

(b) State-Action Latent Diffusion

在 VAE rollout 上采 trajectory $\tau = [s_{t-N}, z_{t-N}, \ldots, s_t, z_t, \ldots, s_{t+H}, z_{t+H}]$(N 步历史 + H 步未来,论文未给精确 N/H 值)。每步 state 用 character-yaw-centric 表示:root pose 和 twist 都相对当前 root frame;body position/vel 相对各自 local root。

DDPM noise schedule $\{\alpha_k, \gamma_k, \sigma_k\}_{k=1}^K$,denoiser 学 $\hat\tau = z_\phi(\tau^k, k)$,最小化 $\|\hat\tau - \tau\|^2$。每个 state 和 latent 各有自己的 denoising step $k$——这样可以在 horizon 上做 inpainting(部分 step 清晰、部分 step noised)。

推理:从 Gaussian noise 开始,迭代 denoise 到 clean trajectory,当前 action 由当前 denoised latent $z_t$ 经 VAE decoder 用最新 observation decode

3.3 Classifier guidance(推理时优化)

给定任务 cost $G(\tau)$(如 joystick velocity error、waypoint distance、SDF obstacle),在每个 denoising step 用 $\nabla_\tau G(\tau)$ 引导 denoise 方向。receding-horizon MPC 风格

关键设计:state-action joint modeling(不是 action-only diffusion)。这样 cost 定义在 state 空间(如未来位置),但生成对应 action;causal consistency 保证 action 真的能产生 desired state。这避免了 forward dynamics model 的高维/实时难题。

4. 实验:真机跳跃/翻滚(Sec. Results)

数据:~2.5 小时人类动捕 → retarget 到 humanoid → 仿真全部训出来;30 段代表(共 15 分钟)zero-shot 部署真机。机器人:Unitree G1(具体 DoF 论文未在正文明示,从图推测 20+ DoF;有 toe 缺失影响 push-off)。

Human-level agility 关键数字

  • aerial cartwheel 真机完成:airborne phase peak 加速度 31 m/s²pelvic angular velocity 峰值 20 rad/s(mean 7.01 rad/s)。对比 skilled human aerial 平均 7.75 rad/s——达到 human 水平。
  • consecutive cartwheels:agility 部分报告 2 次连翻,versatility 部分 report 3 次连翻 + walking/running 缝合(不同实验,PDF §"Diverse Skills" vs §"Task Versatility")。
  • Cristiano Ronaldo celebration jump-turn 连续 5 次(prior work 只能做 1 次)。
  • GRF(ground reaction force):walking 出现双峰(heel-strike + push-off)、running 单峰,与人类 force-sensing treadmill 数据 shape 对齐(toe joint 缺失导致 walking 峰更尖)。
  • user study N=77:vs Unitree native controller(Bonferroni $\alpha=.025$),BeyondMimic 整体偏好 70.8% vs 29.2%($p<.001$,Cohen's $h=0.859$);分项 walking 57.0% vs 43.0%($p<.001$,$h=0.281$)、running 84.7% vs 15.3%($p<.001$,$h=1.532$,巨大 effect)。

Versatile control(zero-shot,无重训)

  • command-conditioned locomotion:joystick velocity / waypoint goal。velocity tracking error walking 12.14%、running 13.65%;50 m 连续跑无 failure;可被踢不倒并继续追 task。
  • multimodal gait:低速命令下随机产生 walk 或 light jog;只给 desired velocity 自动 walk→run 过渡(训练数据里这种过渡罕见且 unlabeled,policy 自己涌现)。
  • motion inpainting:从 joystick walking 出发,注入 0.2 s 间隔的 cartwheel keyframe → diffusion 自动 inpainting 平滑过渡,做完 cartwheel 回到 walking。同理做 spin-kick、flip-kick、lie-down-get-up。
  • task composition:waypoint + obstacle avoidance(SDF 代价)联合优化 → 自动绕障;joystick + obstacle 也成立。

消融(Sec. Validation):Rot6D >> quaternion >> axis-angle(axis-angle 直接失败);其他 MDP 设计 choice 验证见 Fig.8。

为什么重要

  1. 第一个真机做出 aerial cartwheel、连续翻滚、Cristiano celebration 的 humanoid RL。敏捷动作 sim-to-real 一直被认为是"本质无解",BeyondMimic 用 principled actuator 建模 + 极简 reward 证明可解。
  2. "reward 极简主义"反转了 reward shaping 趋势。prior work(ANYmal-C、OmniH2O 等)越加越多 reward 项,BeyondMimic 反其道:4 项 task + 3 项 penalty 就够,靠 anchor-centered tracking + low-impedance actuator + adaptive sampling 解决鲁棒性。
  3. diffusion + classifier guidance 是 task versatility 的优雅解。一个无条件训练的 LDM,靠推理时不同 cost 解决 joystick/waypoint/obstacle/inpainting 全部任务,不需要训练时枚举 task——这是 humanoid 控制从"specialist farm"走向"generalist"的关键一步。
  4. state-action joint diffusion 解决了 cost-in-state / action-out 的鸿沟,无需 forward dynamics model,是 DP3(action-only diffusion)思路在 humanoid 全身控制上的进化。
  5. BeyondMimic 直接锚定 T12 转折 8 终点:这条线(DeepMimic → parkour → BeyondMimic)走到这里,把"剧烈动作 sim-to-real 是否本质无解"这个开放问题推进到"在工程精度足够时是可解的"。

局限

  1. diffusion 推理 latencyTransformer Encoder denoiser(~19.8M 参数),policy 降到 25 Hz(tracking 是 50 Hz)让 diffusion 有时间推理;tracking 单步 inference < 1.0 ms(ONNX Runtime,CPU),diffusion 部署靠 TensorRT on RTX 4060 Mobile。预测 horizon 0.64 秒——对 reactive control 够,对 long-horizon planning 不足(论文明确承认)。
  2. mode switching / high-variance state 下 denoise 不稳:要加大 guidance weight,但又 destabilize denoise——论文明确说这是 trade-off 没完全解决。
  3. fine-grained task 表现弱:coarse-grained(waypoint、velocity)很好,fine-grained(高精度定位)仍需 lightweight tuning。
  4. 依赖 toe joint:缺 toe 导致 walking GRF 峰更尖、push-off 不够自然——这是硬件限制。
  5. 每 motion 一个 tracking policy:虽 reward 共享,仍是 N 个 policy,VAE/distill 才合并。Stage 1 的 storage 和训练成本随 motion 数线性增长。
  6. 论文未明示:N(历史步数)、H(未来步数,但 horizon = 0.64 s)、$\sigma_s$ 各项 nominal error 精确值、K(最大 diffusion step)、G1 具体 DoF 配置(正文未在表格列;Supp. S1 提到 G1 用四台两级行星执行器并给了 armature 计算)。

复现要点

基于 PDF 正文 + Supp. S1。

  • 仿真器:MJLab / Unitree RL Lab(MuJoCo 或 Isaac 系),关键是 armature 精确建模。
  • tracking reward:4 项 Gaussian $\exp(-\bar e_s / \sigma_s^2)$,仅 3 项 penalty(limit $\lambda_l=-10$、smoothness/contact $\lambda_s=\lambda_c=-0.1$)。不要加 stumble/slip/contact-force——这些 prior work 的常用项反而让动作保守。
  • anchor-centered tracking:anchor = root,其他 body 在 anchor-centered(yaw-aligned + height-preserving)系下表达目标。
  • PD heuristic:$k_p = I\omega^2,\ k_d = 2I\zeta\omega$,$I$ = reflected inertia,$\zeta=2$,$\omega=2\pi \cdot 10$ Hz;action scale $\alpha = 0.25 \tau_{\max}/k_p$。低 impedance 是 sim-to-real 自然度的关键
  • observation:Rot6D(不是 quaternion/axis-angle),asymmetric actor-critic(critic 看所有 body 相对 anchor 的 Cartesian pose)。
  • adaptive sampling:1 秒 bin EMA failure rate,优先采难段。
  • DR 最小集:friction、joint calibration offset(ankle 大)、torso CoM、random velocity perturbation。不要重 DR
  • VAE:encoder 只吃 reference phase + anchor error;decoder 吃 latent + 其他 proprio;DAgger 训。
  • LDM:state-latent co-diffusion,per-step individual denoising step(支持 inpainting);训练 self-supervised。
  • guidance:任意可微 cost,denoise step 内 $\nabla_\tau G(\tau)$ 引导;receding-horizon。
  • 部署:纯 C++ + 移动 GPU,低延迟,policy/obs 同步精确。
  • 常见坑:(1) 高 PD gain 会让真机动作像 kinematic playback,丧失自然度;(2) action clip 到 joint limit 会破坏 torque shaping;(3) reward 加过多项 → 动作保守。

相关

  • 建立在:DeepMimic [Peng et al. 2018](tracking reward 形式)、AMP/ASE [Peng et al. 2021/2022](motion prior 思路)、PHC/UHC(大规模 humanoid tracking)、Diffusion Policy [Chi et al. 2023]、MDM [Tevet et al. ICLR 2023, arXiv:2209.14916](人类 motion diffusion,作者 Guy Tevet 同人)、classifier guidance [Dhariwal & Nichol 2021, NeurIPS Diffusion Models Beat GANs]。
  • 同期/后续:HuB [2025, arXiv:2505.07294](极限平衡)、Learning Getting-Up Policies [He et al. 2025]、ASAP [2025](残差 sim2real)、HOVER [2024](多模式统一)、HumanPlus [2024]。
  • 本仓库笔记交叉引用
  • T12-agile-locomotion.md(转折 8 终点)
  • T04-motion-prior-amp-to-bfm.md(diffusion 作为 motion prior 的新形态)
  • T05-diffusion-policy-lineage.md(state-action co-diffusion 是 DP 的进化)
  • T08-action-gen-physics.md(physics-aware action gen 代表)
  • P-DeepMimic-2018.md(reward 形式的源头,对照极简化)
  • P-DiffusionPolicy-2023.md(action-only diffusion 对照)
  • P-DP3-2024.md(3D 点云 diffusion policy 对照)
  • P-HOVER-2024.md(同期 humanoid controller,specialist-generalist 思路对照)