Skip to content

Commit

Permalink
add autoware_control check (#99)
Browse files Browse the repository at this point in the history
* add autoware_control check

Signed-off-by: tkhmy <[email protected]>

* update external signage logic

Signed-off-by: tkhmy <[email protected]>

---------

Signed-off-by: tkhmy <[email protected]>
  • Loading branch information
tkhmy authored Apr 17, 2024
1 parent 2316a6f commit 69d62b0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/signage/src/signage/route_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -291,8 +293,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

Expand Down

0 comments on commit 69d62b0

Please sign in to comment.