From b3570c390a66858773040c85f9e4179aa8becb0a Mon Sep 17 00:00:00 2001 From: Kah Hooi Tan <41041286+tkhmy@users.noreply.github.com> Date: Tue, 5 Nov 2024 12:57:57 +0900 Subject: [PATCH] add handle negative goal distance (#131) Signed-off-by: tkhmy --- src/signage/src/signage/route_handler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/signage/src/signage/route_handler.py b/src/signage/src/signage/route_handler.py index 5583c3f..1d7b0ba 100644 --- a/src/signage/src/signage/route_handler.py +++ b/src/signage/src/signage/route_handler.py @@ -397,7 +397,10 @@ def calculate_time_callback(self): self._announced_depart = True elif self._is_driving: # handle text and announce while bus is running - if self._autoware.information.goal_distance < 100: + if ( + self._autoware.information.goal_distance < 100 + and self._autoware.information.goal_distance > 0 + ): # display text and announce if the goal is within 100m self._display_phrase = utils.handle_phrase("arriving") if not self._announced_arrive: