fix(simulation): retire rejected Nav2 intermediate goals

This commit is contained in:
DCCONSTRUCTIONS
2026-10-08 15:29:41 +03:00
parent 1f1d4a2807
commit 021b9f427f
8 changed files with 120 additions and 9 deletions
+6 -2
View File
@@ -204,10 +204,14 @@ class Navigation:
# capture leases and command gates still refresh above/every tick.
if (not continuing or self.path is None or self.node.native_command() is None
or entered-self.path_planned_at >= 1.0):
path = self.node.plan(pose, goal, math.atan2(goal[1]-pose[1],goal[0]-pose[0]))
path, status = self.node.plan(pose, goal, math.atan2(goal[1]-pose[1],goal[0]-pose[0]))
if path is None or len(path.poses) < 2:
self.node.stop()
return self.reply('no-path', status='blocked', route_observation=route)
# Humble has no typed planner error code. Preserve its
# terminal abort without inventing an obstacle diagnosis.
feedback = (dict(planning_result=dict(status='aborted', goal_xy=goal[:2].tolist()))
if status == GoalStatus.STATUS_ABORTED else {})
return self.reply('no-path', status='blocked', route_observation=route, **feedback)
if not continuing:
with self.owner_lock:
self.action_key = None