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 次删除

查看文件

@ -502,3 +502,15 @@ def test_piper_connect_fails_and_writes_follower_role_when_in_teach_mode(monkeyp
device.connect(calibrate=False)
assert device.arm.role_commands[-1] == (0xFC, 0x00, 0x00, 0x00)
def test_piper_lfs_pointer_urdf_raises_actionable_error(tmp_path):
pointer_file = tmp_path / "lfs_pointer.urdf"
pointer_file.write_text(
"version https://git-lfs.github.com/spec/v1\n"
"oid sha256:deadbeef\n"
"size 123\n"
)
with pytest.raises(RuntimeError, match="Git LFS pointer files"):
piper_leader_module._ensure_not_lfs_pointer(pointer_file, "assets/piper_description/urdf/pointer.urdf")