Skip to content

踩坑GitHub unitreerobotics/unitree_il_lerobot7 个月前

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

本文由 AI 根据公开内容整理,可能有误,请以原文为准:Has anyone tried evaluating pi05 models with a unitree G1 with this code?(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 等,版权归原作者所有。

来源

本页事实对应的公开页面,以原文为准。

  1. GitHub unitreerobotics/unitree_il_lerobot #69:Has anyone tried evaluating pi05 models with a unitree G1 with this code?访问 2026-10-23