From b0087809f5604bb52b85fd15927b456c7d9fbe4e Mon Sep 17 00:00:00 2001 From: Daisuke Sato Date: Thu, 21 Nov 2024 21:22:41 -0500 Subject: [PATCH] move SpeechPriority class definition Signed-off-by: Daisuke Sato --- cabot_ui/cabot_ui/cabot_rclpy_util.py | 7 ------- cabot_ui/cabot_ui/geojson.py | 3 ++- cabot_ui/cabot_ui/interface.py | 9 ++++++++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/cabot_ui/cabot_ui/cabot_rclpy_util.py b/cabot_ui/cabot_ui/cabot_rclpy_util.py index 29520de7..a0866987 100644 --- a/cabot_ui/cabot_ui/cabot_rclpy_util.py +++ b/cabot_ui/cabot_ui/cabot_rclpy_util.py @@ -91,10 +91,3 @@ def to_sec(cls, duration: Duration): @classmethod def time_zero(cls): return Time(seconds=0, nanoseconds=0, clock_type=cls.instance().clock.clock_type) - - -class SpeechPriority: - REQUIRED = 90 - HIGH = 60 - NORMAL = 30 - LOW = 10 \ No newline at end of file diff --git a/cabot_ui/cabot_ui/geojson.py b/cabot_ui/cabot_ui/geojson.py index e56e7f10..f39ad721 100644 --- a/cabot_ui/cabot_ui/geojson.py +++ b/cabot_ui/cabot_ui/geojson.py @@ -40,7 +40,8 @@ import angles import geometry_msgs.msg from cabot_ui import geoutil, i18n -from cabot_ui.cabot_rclpy_util import CaBotRclpyUtil, SpeechPriority +from cabot_ui.cabot_rclpy_util import CaBotRclpyUtil +from cabot_ui.interface import SpeechPriority class RouteStruct(enum.Enum): diff --git a/cabot_ui/cabot_ui/interface.py b/cabot_ui/cabot_ui/interface.py index f977bc75..c61ffe8b 100644 --- a/cabot_ui/cabot_ui/interface.py +++ b/cabot_ui/cabot_ui/interface.py @@ -25,7 +25,7 @@ from rclpy.duration import Duration from rclpy.exceptions import InvalidServiceNameException from rclpy.callback_groups import MutuallyExclusiveCallbackGroup -from cabot_ui.cabot_rclpy_util import CaBotRclpyUtil, SpeechPriority +from cabot_ui.cabot_rclpy_util import CaBotRclpyUtil import std_msgs.msg import cabot_msgs.msg @@ -37,6 +37,13 @@ from cabot_common import vibration +class SpeechPriority: + REQUIRED = 90 + HIGH = 60 + NORMAL = 30 + LOW = 10 + + class UserInterface(object): SOCIAL_ANNOUNCE_INTERVAL = Duration(seconds=15.0) NOTIFY_TURN_INTERVAL = Duration(seconds=5.0)