From 76c2cd5d496fad5d92928d41acb828ec955894fa Mon Sep 17 00:00:00 2001 From: Kah Hooi Tan <41041286+tkhmy@users.noreply.github.com> Date: Wed, 11 Sep 2024 14:50:20 +0900 Subject: [PATCH] add handling for force goal (#120) Signed-off-by: tkhmy --- src/signage/src/signage/route_handler.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/signage/src/signage/route_handler.py b/src/signage/src/signage/route_handler.py index 52152cf..104f3e1 100644 --- a/src/signage/src/signage/route_handler.py +++ b/src/signage/src/signage/route_handler.py @@ -91,8 +91,12 @@ def emergency_checker_callback(self): MrmState.COMFORTABLE_STOP, MrmState.PULL_OVER, ]: - self._in_slowing_state = self._autoware.information.motion_state == MotionState.MOVING - self._in_slow_stop_state = self._autoware.information.motion_state == MotionState.STOPPED + self._in_slowing_state = ( + self._autoware.information.motion_state == MotionState.MOVING + ) + self._in_slow_stop_state = ( + self._autoware.information.motion_state == MotionState.STOPPED + ) else: self._in_slowing_state = False self._in_slow_stop_state = False @@ -301,7 +305,7 @@ def route_checker_callback(self): self._service_interface.trigger_external_signage(True) self._trigger_external_signage = True self._announce_engage = True - elif self._autoware.information.route_state == RouteState.ARRIVED: + elif self._autoware.information.route_state in [RouteState.ARRIVED, RouteState.UNSET]: # Check whether the vehicle arrive to goal self._is_driving = False self._is_stopping = True