Skip to content

Commit

Permalink
fix ignore emergency parameter not working
Browse files Browse the repository at this point in the history
Signed-off-by: tkhmy <[email protected]>
  • Loading branch information
tkhmy committed Aug 9, 2024
1 parent c066955 commit 9a26582
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/signage/src/signage/route_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ def __init__(
self._node.create_timer(0.2, self.announce_engage_when_starting)

def emergency_checker_callback(self):
if self._parameter.ignore_emergency:
in_emergency = False
if self._autoware.information.operation_mode == OperationModeState.STOP:
if (
self._parameter.ignore_emergency
or self._autoware.information.operation_mode == OperationModeState.STOP
):
in_emergency = False
else:
in_emergency = self._autoware.information.mrm_behavior == MrmState.EMERGENCY_STOP
Expand Down Expand Up @@ -125,8 +126,8 @@ def announce_engage_when_starting(self):

if (
self._autoware.information.localization_init_state
== LocalizationInitializationState.UNINITIALIZED or
self._autoware.information.autoware_control == False
== LocalizationInitializationState.UNINITIALIZED
or self._autoware.information.autoware_control == False
):
self._prev_motion_state = 0
return
Expand Down Expand Up @@ -282,7 +283,11 @@ def route_checker_callback(self):
):
self._service_interface.trigger_external_signage(True)
self._trigger_external_signage = True
if not self._announce_engage and self._parameter.signage_stand_alone and self._autoware.information.autoware_control:
if (
not self._announce_engage
and self._parameter.signage_stand_alone
and self._autoware.information.autoware_control
):
self._announce_interface.send_announce("engage")
self._service_interface.trigger_external_signage(True)
self._trigger_external_signage = True
Expand Down

0 comments on commit 9a26582

Please sign in to comment.