From 899e43f4546be22dd5b19d28cf4459768e7c5385 Mon Sep 17 00:00:00 2001 From: tkhmy Date: Fri, 12 Apr 2024 15:23:31 +0900 Subject: [PATCH 1/2] add autoware_control check Signed-off-by: tkhmy --- src/signage/src/signage/route_handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/signage/src/signage/route_handler.py b/src/signage/src/signage/route_handler.py index c254e74..fc6e4bc 100644 --- a/src/signage/src/signage/route_handler.py +++ b/src/signage/src/signage/route_handler.py @@ -291,8 +291,8 @@ def route_checker_callback(self): if ( self._autoware.information.operation_mode != OperationModeState.AUTONOMOUS - and self._trigger_external_signage - ): + or self._autoware.information.autoware_control != True + ) and self._trigger_external_signage: self._service_interface.trigger_external_signage(False) self._trigger_external_signage = False From 85da9016a31dffe07ac173845916a2d919a917e5 Mon Sep 17 00:00:00 2001 From: tkhmy Date: Fri, 12 Apr 2024 17:58:52 +0900 Subject: [PATCH 2/2] update external signage logic Signed-off-by: tkhmy --- src/signage/src/signage/route_handler.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/signage/src/signage/route_handler.py b/src/signage/src/signage/route_handler.py index fc6e4bc..8bc1aaa 100644 --- a/src/signage/src/signage/route_handler.py +++ b/src/signage/src/signage/route_handler.py @@ -143,8 +143,6 @@ def announce_engage_when_starting(self): self._parameter.accept_start, ): self._announce_interface.send_announce("restart_engage") - self._service_interface.trigger_external_signage(True) - self._trigger_external_signage = True self._engage_trigger_time = self._node.get_clock().now() if self._autoware.information.motion_state == MotionState.STARTING: @@ -277,10 +275,14 @@ def route_checker_callback(self): # Check whether the vehicle is move in autonomous self._is_driving = True self._is_stopping = False - if not self._announce_engage and self._parameter.signage_stand_alone: - self._announce_interface.send_announce("engage") + if ( + not self._trigger_external_signage + and self._autoware.information.autoware_control + ): self._service_interface.trigger_external_signage(True) self._trigger_external_signage = True + if not self._announce_engage and self._parameter.signage_stand_alone: + self._announce_interface.send_announce("engage") self._announce_engage = True elif self._autoware.information.route_state == RouteState.ARRIVED: # Check whether the vehicle arrive to goal