From bc915c01e1b59b2933a178c37b60989d4fdb5a0f Mon Sep 17 00:00:00 2001 From: DCCONSTRUCTIONS Date: Thu, 8 Oct 2026 14:00:54 +0300 Subject: [PATCH] fix(simulation): consume Nav2 local action completion --- .../ai-polygon/nav2/check_http_integration.py | 35 ++++++++++ simulation/ai-polygon/nav2/server.py | 21 ++++++ .../simulation/ai_polygon/mission_policy.py | 1 + .../ai_polygon/observed_recovery.py | 25 ++++++- tests/test_observed_recovery.py | 70 +++++++++++++++++++ 5 files changed, 149 insertions(+), 3 deletions(-) diff --git a/simulation/ai-polygon/nav2/check_http_integration.py b/simulation/ai-polygon/nav2/check_http_integration.py index 1091a934..a7d25046 100644 --- a/simulation/ai-polygon/nav2/check_http_integration.py +++ b/simulation/ai-polygon/nav2/check_http_integration.py @@ -213,6 +213,41 @@ def main(): # Warm the costmaps through normal planning before invoking a behavior; # lifecycle activation alone does not publish their first observation. assert result['controller_goal'][0]=='path',result + # Synthetic measured odometry enters Nav2's unchanged 40 cm region, + # while remaining outside the legacy mission recovery's 30 cm region. + # A capture refresh must return completion, not restart FollowPath. + reached=[.65,0.,.37,0.,0.,0.,1.] + with condition: + state.update(pose=reached,enabled=True) + retreat.update(pose=reached,observation_id='local-action-complete') + time.sleep(.15) + deadline=time.monotonic()+3 + completion_plans=[] + while True: + result=request('/plan',retreat) + completion_plans.append(result) + if result.get('action_result') is not None: + break + assert time.monotonic()