把存储的 yaw 上限归一到 ±180

yaw 台转 ±180,实测点的第二组精确解落在 118° 之外:旧文件里的 ±90 会让求解器把位姿算成可达、运动守卫却拒绝这段 yaw,操作员看到的就是“到不了”。加载时把求解器与守卫两种写法的 yaw 上限一起归一,pitch 包络此前已按同一理由处理。
This commit is contained in:
ykcheungab
2026-10-14 20:27:21 +08:00
parent 3f578c26c4
commit 5339624ffa
4 changed files with 95 additions and 0 deletions
+17
View File
@@ -238,6 +238,23 @@ def test_the_guard_names_an_unknown_direction():
assert refusal is not None and "roll" in refusal.message
def test_the_guard_allows_the_yaw_the_solver_calls_reachable():
"""One bench fact, two spellings: the guard must not refuse what the solver solved.
A measured point's second exact solution sits past 118° of yaw — inside the ±180
the trunnion turns, outside the ±90 note this bench was once configured with. The
solver's envelope and the guard's limit therefore have to be the same number.
"""
service = make_service()
assert service.limit_for("yaw") == 180.0
assert service.limit_for("pitch") == 90.0
assert service.check_axes_move({"yaw": 118.681}) is None
past = service.check_axes_move({"yaw": 180.0 + 0.1})
assert past is not None, "a yaw past the trunnion's travel was allowed"
# ------------------------------------------------------------------------ mover