fix(piper): guard LFS pointer URDF and normalize asset file modes

- detect Git LFS pointer URDF early and raise actionable runtime error

- add regression test for LFS-pointer URDF guard

- normalize PiPER/PiPER-X asset modes from 100755 to 100644
这个提交包含在:
Elvin
2026-03-07 01:34:17 +08:00
父节点 92d9d829b3
当前提交 8934fdbabf
共有 17 个文件被更改,包括 28 次插入 和 0 次删除

查看文件

0
src/lerobot/assets/piper_description/meshes/link1.STL 可执行文件 -> 普通文件
查看文件

0
src/lerobot/assets/piper_description/meshes/link2.STL 可执行文件 -> 普通文件
查看文件

0
src/lerobot/assets/piper_description/meshes/link3.STL 可执行文件 -> 普通文件
查看文件

0
src/lerobot/assets/piper_description/meshes/link4.STL 可执行文件 -> 普通文件
查看文件

0
src/lerobot/assets/piper_description/meshes/link5.STL 可执行文件 -> 普通文件
查看文件

0
src/lerobot/assets/piper_description/meshes/link6.STL 可执行文件 -> 普通文件
查看文件

查看文件

查看文件

查看文件

查看文件

查看文件

查看文件

查看文件

@ -45,6 +45,21 @@ PIPER_CALIB_KEYS = list(PIPER_ACTION_KEYS)
PIPER_CALIB_IDS = {key: idx for idx, key in enumerate(PIPER_CALIB_KEYS)}
DEFAULT_PIPER_GRAVITY_URDF = "assets/piper_description/urdf/piper_no_gripper_description.urdf"
DEFAULT_PIPERX_GRAVITY_URDF = "assets/piper_x_description/urdf/piper_x_description_no_gripper.urdf"
GIT_LFS_POINTER_PREFIX = b"version https://git-lfs.github.com/spec/v1"
def _ensure_not_lfs_pointer(path_obj: Any, relpath: str) -> None:
with path_obj.open("rb") as f:
head = f.read(128)
if head.startswith(GIT_LFS_POINTER_PREFIX):
raise RuntimeError(
"Bundled PiPER assets are still Git LFS pointer files. "
"Please run `git lfs pull --include="
"\"src/lerobot/assets/piper_description/**,src/lerobot/assets/piper_x_description/**\" "
"--exclude=\"*\"` and `git lfs checkout src/lerobot/assets/piper_description "
"src/lerobot/assets/piper_x_description`, then retry. "
f"(file: {relpath})"
)
class PiperLeader(Teleoperator):
@ -220,6 +235,7 @@ class PiperLeader(Teleoperator):
"Bundled gravity compensation URDF is missing: "
f"{self.gravity_comp_urdf_relpath}. Reinstall the package."
)
_ensure_not_lfs_pointer(default_urdf, self.gravity_comp_urdf_relpath)
urdf_path = str(default_urdf)
if self._gravity_comp_loop is None:
self._gravity_comp_loop = PiperGravityCompensationLoop(