Skip to content

Commit

Permalink
move SpeechPriority class definition
Browse files Browse the repository at this point in the history
Signed-off-by: Daisuke Sato <[email protected]>
  • Loading branch information
daisukes committed Nov 22, 2024
1 parent 3540c56 commit b008780
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
7 changes: 0 additions & 7 deletions cabot_ui/cabot_ui/cabot_rclpy_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion cabot_ui/cabot_ui/geojson.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
9 changes: 8 additions & 1 deletion cabot_ui/cabot_ui/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit b008780

Please sign in to comment.