fix(simulation): retire rejected Nav2 intermediate goals
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user