From a8ae758b70c3dc0dce55c1d8f41228d7991935f5 Mon Sep 17 00:00:00 2001 From: Satoshi OTA <44889564+satoshi-ota@users.noreply.github.com> Date: Thu, 7 Nov 2024 18:08:47 +0900 Subject: [PATCH] fix(planning_debug_tools): output engage status properly (#146) Signed-off-by: satoshi-ota --- .../scripts/closest_velocity_checker.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/planning/planning_debug_tools/scripts/closest_velocity_checker.py b/planning/planning_debug_tools/scripts/closest_velocity_checker.py index 1934fa19..a9eca848 100755 --- a/planning/planning_debug_tools/scripts/closest_velocity_checker.py +++ b/planning/planning_debug_tools/scripts/closest_velocity_checker.py @@ -16,10 +16,10 @@ import time +from autoware_adapi_v1_msgs.msg import OperationModeState from autoware_control_msgs.msg import Control as AckermannControlCommand from autoware_planning_msgs.msg import Path from autoware_planning_msgs.msg import Trajectory -from autoware_vehicle_msgs.msg import Engage from autoware_vehicle_msgs.msg import VelocityReport from geometry_msgs.msg import Pose from nav_msgs.msg import Odometry @@ -115,10 +115,10 @@ def __init__(self): # others related to velocity self.sub8 = self.create_subscription( - Engage, "/autoware/engage", self.CallBackAwEngage, profile - ) - self.sub12 = self.create_subscription( - Engage, "/vehicle/engage", self.CallBackVehicleEngage, profile + OperationModeState, + "/control/vehicle_cmd_gate/operation_mode", + self.CallBackAwEngage, + profile, ) self.sub9 = self.create_subscription( VelocityLimit, @@ -218,10 +218,8 @@ def timerCallback(self): self.printInfo() def CallBackAwEngage(self, msg): - self.autoware_engage = msg.engage - - def CallBackVehicleEngage(self, msg): - self.vehicle_engage = msg.engage + self.autoware_engage = msg.mode == OperationModeState.AUTONOMOUS + self.vehicle_engage = msg.is_autoware_control_enabled def CallBackExternalVelLim(self, msg): self.external_v_lim = msg.max_velocity