diff --git a/main.py b/main.py index 682b7048..ffc7359d 100644 --- a/main.py +++ b/main.py @@ -49,15 +49,15 @@ target=uploader.run, name="ISAR Uploader", daemon=True ) threads.append(uploader_thread) - if settings.MQTT_ENABLED: + print("Entered MQTT Enabled block") mqtt_client: MqttClient = MqttClient(mqtt_queue=queues.mqtt_queue) mqtt_thread: Thread = Thread( target=mqtt_client.run, name="ISAR MQTT Client", daemon=True ) threads.append(mqtt_thread) - + print("Seeing up robot status publisher now") robot_status_publisher: RobotStatusPublisher = RobotStatusPublisher( mqtt_queue=queues.mqtt_queue, robot=robot, state_machine=state_machine ) diff --git a/src/isar/services/service_connections/mqtt/robot_status_publisher.py b/src/isar/services/service_connections/mqtt/robot_status_publisher.py index 44017cab..c082d993 100644 --- a/src/isar/services/service_connections/mqtt/robot_status_publisher.py +++ b/src/isar/services/service_connections/mqtt/robot_status_publisher.py @@ -37,10 +37,10 @@ def _get_combined_robot_status( return RobotStatus.Offline elif current_state == States.Idle and robot_status == RobotStatus.Available: return RobotStatus.Available + elif robot_status == RobotStatus.Blocked: + return RobotStatus.Blocked elif current_state != States.Idle or robot_status == RobotStatus.Busy: return RobotStatus.Busy - elif current_state != States.Idle or robot_status == RobotStatus.Stuck: - return RobotStatus.Busy return None def run(self) -> None: diff --git a/src/robot_interface/models/mission/status.py b/src/robot_interface/models/mission/status.py index 2d833d6a..edb15f7e 100644 --- a/src/robot_interface/models/mission/status.py +++ b/src/robot_interface/models/mission/status.py @@ -33,4 +33,4 @@ class RobotStatus(Enum): Available: str = "available" Busy: str = "busy" Offline: str = "offline" - Stuck: str = "stuck" + Blocked: str = "blocked"