feat: ForceStreamSession 覆盖 field 与 FN-only 标定(T06b)
新增 measurement_requirements,告知调用方 field 模型需要同帧场数据。补充标量、field、FN-only 三类标定与旧 ForceSession 的数值等价测试,以及标定与帧不匹配的情况:field 缺 context 时构造失败,基线帧缺 field 时零点失败,ready 后缺 field 的帧单独标为 invalid_input。与改动前的旧会话基线逐位一致。回归 381 项、lint 通过。
This commit is contained in:
@@ -194,6 +194,17 @@ class ForceStreamSession:
|
||||
def last_output(self) -> ForceStreamOutput | None:
|
||||
return self._last_output
|
||||
|
||||
@property
|
||||
def measurement_requirements(self) -> tuple[bool, bool]:
|
||||
"""``(want_field, want_contact)`` the installed calibration model asks for.
|
||||
|
||||
A field model (``hhd_normal_l1_field/1``) asks for the same-frame field, so
|
||||
a T05 caller must include ``field`` in the ``ImageMeasurement``; a
|
||||
scalar/FN-only model asks for neither. The engine's answer is reused
|
||||
instead of a second interpretation of the model.
|
||||
"""
|
||||
return self._engine.measurement_requirements
|
||||
|
||||
@property
|
||||
def reference_generation(self) -> int | None:
|
||||
"""The reference generation this session currently accepts frames for."""
|
||||
|
||||
Reference in New Issue
Block a user