修正朝上判断、接触高度与过期姿态目标

朝上判断误用平台轴、接触高度报旋转前数值、多点对准复用缓存姿态,且多点会话被复核入口拒绝;
现按修正计划改正并接通 autocal-multipoint-1.0 只读复核,缺失帧源如实报告而不补零。

离线验证:新回归在 dc5a6f8 上失败、此处通过,panel_check 通过,两截图点接触高度复现
19.0510 / 21.5781 mm;实机项未做,详见 .scratch/autocal-motion-fix/verification.md。
This commit is contained in:
ykcheungab
2026-10-15 06:52:28 +08:00
parent 5339624ffa
commit bcc55a3b97
29 changed files with 2179 additions and 209 deletions
+7 -9
View File
@@ -199,13 +199,13 @@ def test_the_surface_normals_point_up_so_the_face_faces_the_tool(bundle):
)
def test_few_vertices_end_turned_over_and_those_are_edge_on(bundle):
"""Turning the face over is the failure mode; measure it and bound it.
def test_no_vertex_ends_turned_over(bundle):
"""Turning the face over is the failure mode; with the right up axis it is zero.
The remainder are vertices whose normals are 60-90 degrees off the tool axis —
the rim of the dome. Aligning an edge-on face has to roll the body about that
normal, and the sign is decided by rounding, so they cannot be pushed to zero
and should not be asserted away.
``uprightness`` used to compare the platform's Y axis, so 47 of these vertices read
as turned over even though they only rolled about the vertical. Against the
post-mount nominal up (the tool axis) no vertex ends inverted, and this now fails
if the reference regresses rather than reporting a small count as acceptable.
"""
stack = PlatformStack()
normals = bundle.vertex_normals()
@@ -214,9 +214,7 @@ def test_few_vertices_end_turned_over_and_those_are_edge_on(bundle):
pose = stack.solve(np.zeros(3), normal)
if stack.uprightness(pose.yaw_deg, pose.pitch_deg) < -0.5:
flipped += 1
assert flipped <= len(normals) * 0.03, (
f"{flipped} of {len(normals)} vertices ended turned over"
)
assert flipped == 0, f"{flipped} of {len(normals)} vertices ended turned over"
def test_a_pose_reports_whether_it_is_upright():