Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add autoware_control check #99

Merged
merged 2 commits into from
Apr 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -8,7 +8,7 @@
from datetime import datetime
import signage.signage_utils as utils
from tier4_external_api_msgs.msg import DoorStatus
from autoware_adapi_v1_msgs.msg import (

Check warning on line 11 in src/signage/src/signage/route_handler.py

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (adapi)
RouteState,
MrmState,
OperationModeState,
Expand Down Expand Up @@ -143,8 +143,6 @@
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 @@
# 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 @@

if (
tkhmy marked this conversation as resolved.
Show resolved Hide resolved
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
Loading