# Unitree G1 RL训练报错RuntimeError: normal expects all。

> 原文链接：https://robotics.hellobike.com/pitfalls/2026-04-25-unitree-rl-lab-24
> 频道：pitfalls | 更新日期：2026-04-25 | 标签：auto, github-issue, unitree_rl_lab
> 核心摘要：G1机器人RL训练数小时后因std<0崩溃，将velocity_env_cfg中bad_orientation的limit_angle从0.8调至0.7可解决。

# Unitree G1 RL训练报错RuntimeError: normal expects all。

::: v-pre
> 本文由 AI 根据公开内容整理，可能有误，请以原文为准：[Training fails due to std &gt;=0](https://github.com/unitreerobotics/unitree_rl_lab/issues/24)（GitHub unitreerobotics/unitree_rl_lab #24）

**状态**：有绕过办法

## 问题

在 unitree_rl_lab 中运行 train.py 训练宇树 G1 机器人约4小时或16700步后，rsl_rl PPO算法更新时触发 RuntimeError: normal expects all elements of std &gt;= 0.0。错误源于 torch.distributions.normal.sample 中 scale 参数出现负值，导致策略采样失败。

## 环境

机型：Unitree G1 (29dof)；框架：IsaacLab + rsl_rl；配置文件：unitree_rl_lab/tasks/locomotion/robots/g1/29dof/velocity_env_cfg.py

## 解决办法

1. 打开文件 source/unitree_rl_lab/unitree_rl_lab/tasks/locomotion/robots/g1/29dof/velocity_env_cfg.py
2. 定位 bad_orientation = DoneTerm(func=mdp.bad_orientation, params={"limit_angle": 0.8}) 配置行
3. 将 limit_angle 参数值由 0.8 修改为 0.7（部分用户验证 0.6 仍可能失效，建议优先使用 0.7）
4. 保存配置并重新启动 train.py 训练脚本

讨论原作者：@filippottaviani 等，版权归原作者所有。
:::

## 原始参考来源 (Sources)

- [GitHub unitreerobotics/unitree_rl_lab #24：Training fails due to std >=0](https://github.com/unitreerobotics/unitree_rl_lab/issues/24)