# Unitree G1加载pi05模型报action space mismatch及相机映射缺失

> 原文链接：https://robotics.hellobike.com/pitfalls/2026-03-12-unitree-il-lerobot-69
> 频道：pitfalls | 更新日期：2026-03-12 | 标签：auto, github-issue, unitree_il_lerobot
> 核心摘要：G1运行pi05 VLA时因特征名不一致报action space mismatch，需通过rename_map重命名观测键并处理未映射相机状态。

# Unitree G1加载pi05模型报action space mismatch及相机映射缺失

::: v-pre
> 本文由 AI 根据公开内容整理，可能有误，请以原文为准：[Has anyone tried evaluating pi05 models with a unitree G1 with this code?](https://github.com/unitreerobotics/unitree_lerobot/issues/69)（GitHub unitreerobotics/unitree_il_lerobot #69）

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

## 问题

在Unitree G1上加载hf pi05_libero_finetuned模型时触发action space mismatch错误，提示数据集与策略特征名不一致。使用--rename_map映射3个图像状态后，仍存在一个人形机器人本体相机状态无对应模型输入键，导致无法直接忽略该冗余观测源。

## 环境

机型：Unitree G1；模型：pi05_libero_finetuned (HuggingFace)；代码库：unitreerobotics/unitree_il_lerobot

## 解决办法

1. 启动推理或评估脚本时添加 `--rename_map` 参数，将数据集观测键映射为G1实际相机键，例如 `--rename_map='{"observation.images.left": "observation.images.camera1", "observation.images.top": "observation.images.camera2"}'`
2. 针对G1本体存在但模型未定义的多余相机状态，需在数据加载或预处理阶段手动过滤该观测键，或在配置中显式排除该传感器输入以匹配模型期望的action space维度
3. 确保重命名后的所有观测键与模型config中的feature_names完全一致，避免大小写或路径层级差异引发二次mismatch

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

## 原始参考来源 (Sources)

- [GitHub unitreerobotics/unitree_il_lerobot #69：Has anyone tried evaluating pi05 models with a unitree G1 with this code?](https://github.com/unitreerobotics/unitree_lerobot/issues/69)