Skip to content

Commit

Permalink
add mute timeout for engage (#82)
Browse files Browse the repository at this point in the history
Signed-off-by: tkhmy <[email protected]>
  • Loading branch information
tkhmy authored Nov 1, 2023
1 parent 3eadd4b commit 6f895ba
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/signage/src/signage/route_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def __init__(
self._display_phrase = ""
self._in_emergency_state = False
self._emergency_trigger_time = self._node.get_clock().now()
self._engage_trigger_time = self._node.get_clock().now()
self._is_stopping = True
self._is_driving = False
self._previous_driving_status = False
Expand Down Expand Up @@ -135,8 +136,13 @@ def announce_engage_when_starting(self):
):
if self._announce_engage and not self._skip_announce:
self._skip_announce = True
else:
elif utils.check_timeout(
self._node.get_clock().now(),
self._engage_trigger_time,
self._parameter.accept_start,
):
self._announce_interface.send_announce("engage")
self._engage_trigger_time = self._node.get_clock().now()

if self._autoware.information.motion_state == MotionState.STARTING:
self._service_interface.accept_start()
Expand Down

0 comments on commit 6f895ba

Please sign in to comment.