统一 Finger SDK 计算资源与 Studio 标定基准

同步完整计算资源并移除旧几何缓存。84 项测试通过,SDK 与 Studio 在同一录像的 150 帧 raw、力值和状态一致。
This commit is contained in:
ykcheungab
2026-10-19 09:58:01 +08:00
parent fb72dabecd
commit c0c91ad3f1
7 changed files with 38 additions and 0 deletions
+9
View File
@@ -49,6 +49,15 @@ bundle with no manifest still resolves through the compatibility adapter.
## Compatibility for existing bundles ## Compatibility for existing bundles
The shipped Finger compute assets under `sensors/finger/assets/30fps-0703/` mirror the
[Studio calibration baseline](../../orisys-app/apps/studio/config/sensors/finger/assets/30fps-0703/).
Synchronize the complete mesh, camera intrinsics, camera pose and UV cache together; the current
profile uses `source_scale=0.42`. The SDK retains its own copy and has no runtime dependency on a
Studio checkout. The obsolete `0.4` cache from the previous geometry is not shipped.
`tests/test_finger_asset_identity.py` pins the verified calibration geometry and domain identity.
Changing SHA fields alone does not migrate a calibration; regenerate and validate its coordinate
artifact against the selected bundle before using its gain map.
`resolve_bundle` reads a new-shape descriptor when `schema_version` is present. Otherwise - no `resolve_bundle` reads a new-shape descriptor when `schema_version` is present. Otherwise - no
manifest, or the older `name`/`sensor_json`/`assets_dir`/`viz_pose` shape - the adapter describes manifest, or the older `name`/`sensor_json`/`assets_dir`/`viz_pose` shape - the adapter describes
it. That is the only place a folder name is consulted, and only for the built-in set: it. That is the only place a folder name is consulted, and only for the built-in set:
Binary file not shown.
Binary file not shown.
Binary file not shown.
+29
View File
@@ -0,0 +1,29 @@
"""Keep the shipped Finger compute assets aligned with the verified Studio calibration."""
import hashlib
from pathlib import Path
import numpy as np
from orisys.calibration_context import domain_fingerprint
from orisys.finger.runtime import resolve_finger_geometry
def test_shipped_finger_assets_match_the_verified_calibration_geometry():
root = Path(__file__).resolve().parents[1] / "sensors" / "finger"
assets = root / "assets" / "30fps-0703"
# Recorded by the 2026-10-17 calibration run; changing this bundle requires revalidation.
expected = {
"mesh.npz": "fc47c438c745ada2c27775a0437fcbe8bfe8fbab354abdae390a07f7a26b78ac",
"camera_intrinsics.npz": "c8e2b1fbd89c1cf514186dd69b10f38ee73d0de1d41f0d1b40018e2650f939e3",
"world_to_cam.npy": "f8cb4109b5a1585833da0845c3644a9554eea55cc38854bf2e6b196e011a5506",
"unroll_map_uv_s0.42.npz": "397fada8a584b03327ec62eebc179f7b6406b7f9cc35248e8f3d0a068873f0c8",
}
for name, digest in expected.items():
assert hashlib.sha256((assets / name).read_bytes()).hexdigest() == digest, name
with np.load(assets / "unroll_map_uv_s0.42.npz", allow_pickle=False) as archive:
domain = {key: archive[key] for key in archive.files}
assert domain_fingerprint(domain) == "2a76d8e797c7400f734d141b21fec5d9e65a02db418e0acacc36faf7c5ac8dbc"
geometry = resolve_finger_geometry(export_dir=assets, config=str(root / "sensor.json"))
assert geometry.source_scale == .42
assert (geometry.out_width, geometry.out_height) == (280, 300)