去掉仿真运动序列的单步超时

偏航转过 90° 时轴仍在运动,20 秒超时会把全部轴停掉。pose move 测试通过。
This commit is contained in:
ykcheungab
2026-10-07 16:21:25 +08:00
parent cc848a273d
commit ff8288bcf9
2 changed files with 26 additions and 14 deletions
+23
View File
@@ -245,6 +245,29 @@ def test_the_mover_waits_while_an_axis_is_still_moving():
assert mover.state.index == 0
def test_a_long_yaw_is_not_cut_off_while_it_is_still_moving(monkeypatch):
"""A yaw past 90° can take longer than a minute. Keep it while the axis moves.
The old step cap abandoned the plan after 20s and the window then stopped
every axis, so a 180° yaw never arrived.
"""
clock = {"t": 1_000.0}
monkeypatch.setattr(
"orisys_autocal.motion.pose_move.time.monotonic", lambda: clock["t"]
)
service = make_service(
limits={**LIMITS, "max_yaw_deg": 180.0, "max_pitch_deg": 360.0}
)
poller = FakePoller(service)
mover = PoseMover(service, poller.submit)
assert mover.start(plan_pose_move(service, {"yaw": 180.0})).ok
clock["t"] += 120.0
mover.on_snapshot(snapshot_of(service, {3: 1_000.0}, idle=False))
assert mover.running
assert mover.state.failure == ""
assert len(poller.commands) == 1
def test_the_mover_fails_when_an_axis_stops_short():
"""A drive that has stopped is not going to arrive: say so, do not wait."""
service = make_service()