diff --git a/src/signage/setup.py b/src/signage/setup.py index 875085c..2a89093 100644 --- a/src/signage/setup.py +++ b/src/signage/setup.py @@ -42,7 +42,6 @@ def package_files(directory): ("share/" + package_name, ["package.xml"]), ("share/" + package_name + "/launch", ["launch/signage.launch.xml"]), ("share/" + package_name + "/config", ["config/signage_param.yaml"]), - ("share/" + package_name + "/config", ["config/announce_settings.yaml"]), ], install_requires=["setuptools"], zip_safe=True, diff --git a/src/signage/src/signage/announce_controller.py b/src/signage/src/signage/announce_controller.py index 447156d..9c00494 100644 --- a/src/signage/src/signage/announce_controller.py +++ b/src/signage/src/signage/announce_controller.py @@ -5,7 +5,6 @@ from PyQt5.QtMultimedia import QSound from rclpy.duration import Duration from ament_index_python.packages import get_package_share_directory -from dataclasses import asdict # The higher the value, the higher the priority PRIORITY_DICT = { @@ -67,7 +66,7 @@ def play_sound(self, message): # skip announce by setting def check_announce_or_not(self, message): try: - return asdict(self._announce_settings).get(message, False) + return getattr(self._announce_settings, message) except Exception as e: self._node.get_logger().error("check announce or not: " + str(e)) return False