Preserve native command ownership for a moving direction hint

This commit is contained in:
DCCONSTRUCTIONS
2026-10-10 00:46:23 +03:00
parent 41fa11e6c8
commit 04b940e8e1
4 changed files with 70 additions and 7 deletions
+4 -4
View File
@@ -20,7 +20,7 @@ import yaml
from action_msgs.msg import GoalStatus
from configuration import observed_configuration
from differential_motion import alignment_angle
from navigation.arrival_approach import validate_orientation
from navigation.arrival_approach import validate_orientation, orientation_identity
from navigation.continuous_control import ContinuousControl
from navigation.footprint import Footprint
from navigation.route_observation import route_observation
@@ -103,8 +103,8 @@ class Navigation:
or not value.get('continuous', False)):
return None
target = value.get('arrival_target')
return (orientation['key'], tuple(orientation['xy']),
value['max_speed_mps'], tuple(target) if target is not None else None)
return (orientation_identity(orientation), value['max_speed_mps'],
tuple(target) if target is not None else None)
@staticmethod
def reply(reason, *, status='waiting-for-plan', **extra):
@@ -199,7 +199,7 @@ class Navigation:
if not value.get('visual_goal_available'):
goal[:2] = target
reverse = value['allow_reverse']
orientation_key = ('spin', orientation['key'], tuple(orientation['xy'])) if orientation else None
orientation_key = ('spin', *orientation_identity(orientation)) if orientation else None
if (orientation_key is not None and self.action_key == orientation_key
and self.node.terminal is not None and self.node.terminal.done()
and self.node.terminal.result().status == GoalStatus.STATUS_SUCCEEDED):