# Unitree G1以太网部署报错Unmatched robot type

> 原文链接：https://robotics.hellobike.com/pitfalls/2026-02-24-unitree-rl-lab-114
> 频道：pitfalls | 更新日期：2026-02-24 | 标签：auto, github-issue, unitree_rl_lab
> 核心摘要：G1机器人Sim-to-Real部署报机型不匹配，需修改main.cpp中mode_machine值为6以适配29DOF版本。

# Unitree G1以太网部署报错Unmatched robot type

::: v-pre
> 本文由 AI 根据公开内容整理，可能有误，请以原文为准：[“Unmatched robot type” when connecting to G1 robot (23DOF & 29DOF) via Ethernet - Sim‑to‑Real Deployment](https://github.com/unitreerobotics/unitree_rl_lab/issues/114)（GitHub unitreerobotics/unitree_rl_lab #114）

**状态**：已解决

## 问题

在Unitree RL Lab或MjLab中通过以太网连接G1（23DOF/29DOF）进行Sim-to-Real部署时，控制器连接成功后立即终止并报错[critical] Unmatched robot type。DDS通信正常但无法启动控制，29DOF腰锁版本同样复现该问题。

## 环境

Unitree G1 (23DOF/29DOF)，unitree_rl_lab / unitree_rl_mjlab，以太网连接，deploy/robots/g1/main.cpp

## 解决办法

1. 打开 `deploy/robots/g1/main.cpp` 文件定位FSMState初始化代码段。
2. 将 `FSMState::lowcmd->msg_.mode_machine() = 5;` 修改为 `FSMState::lowcmd->msg_.mode_machine() = 6;`。
3. 重新编译部署程序，该修改适用于unitree_rl_mjlab及所有Mujoco环境下的G1 29DOF机型。

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

## 原始参考来源 (Sources)

- [GitHub unitreerobotics/unitree_rl_lab #114：“Unmatched robot type” when connecting to G1 robot (23DOF & 29DOF) via Ethernet - Sim‑to‑Real Deployment](https://github.com/unitreerobotics/unitree_rl_lab/issues/114)