diff --git a/packages/api-server/api_server/gateway.py b/packages/api-server/api_server/gateway.py index 0172d1ce9..347f02003 100644 --- a/packages/api-server/api_server/gateway.py +++ b/packages/api-server/api_server/gateway.py @@ -26,7 +26,6 @@ from rmf_fleet_msgs.msg import DeliveryAlertAction as RmfDeliveryAlertAction from rmf_fleet_msgs.msg import DeliveryAlertCategory as RmfDeliveryAlertCategory from rmf_fleet_msgs.msg import DeliveryAlertTier as RmfDeliveryAlertTier -from rmf_fleet_msgs.msg import InterruptRequest as RmfInterruptRequest from rmf_ingestor_msgs.msg import IngestorState as RmfIngestorState from rmf_lift_msgs.msg import LiftRequest as RmfLiftRequest from rmf_lift_msgs.msg import LiftState as RmfLiftState @@ -110,17 +109,6 @@ def __init__( ), ) - self._decommission_robot_request = ros_node().create_publisher( - RmfInterruptRequest, - "robot_decommission_request", - rclpy.qos.QoSProfile( - history=rclpy.qos.HistoryPolicy.KEEP_LAST, - depth=10, - reliability=rclpy.qos.ReliabilityPolicy.RELIABLE, - durability=rclpy.qos.DurabilityPolicy.TRANSIENT_LOCAL, - ), - ) - self.cached_files = cached_files self.logger = logger or base_logger.getChild(self.__class__.__name__) self._subscriptions: List[Subscription] = [] @@ -294,36 +282,6 @@ def respond_to_delivery_alert( msg.message = message self._delivery_alert_response.publish(msg) - def decommission_robot( - self, - fleet_name: str, - robot_name: str, - request_id: str, - labels: List[str], - ): - msg = RmfInterruptRequest() - msg.fleet_name = fleet_name - msg.robot_name = robot_name - msg.interrupt_id = request_id - msg.labels = labels - msg.type = RmfInterruptRequest.TYPE_INTERRUPT - self._decommission_robot_request.publish(msg) - - def recommission_robot( - self, - fleet_name: str, - robot_name: str, - request_id: str, - labels: List[str], - ): - msg = RmfInterruptRequest() - msg.fleet_name = fleet_name - msg.robot_name = robot_name - msg.interrupt_id = request_id - msg.labels = labels - msg.type = RmfInterruptRequest.TYPE_RESUME - self._decommission_robot_request.publish(msg) - _rmf_gateway: RmfGateway diff --git a/packages/dashboard/src/components/robots/robot-decommission.tsx b/packages/dashboard/src/components/robots/robot-decommission.tsx index d5543b83d..b2a3bb081 100644 --- a/packages/dashboard/src/components/robots/robot-decommission.tsx +++ b/packages/dashboard/src/components/robots/robot-decommission.tsx @@ -54,8 +54,7 @@ export function RobotDecommissionButton({ if (!rmf) { throw new Error('fleets api not available'); } - const id = `decommission-${fleet}-${robotState.name}-${Date.now()}`; - await rmf.fleetsApi?.decommissionRobotFleetsNameDecommissionPost(fleet, robotState.name, id); + await rmf.fleetsApi?.decommissionRobotFleetsNameDecommissionPost(fleet, robotState.name); appController.showAlert('success', `Decommission of ${fleet}:${robotState.name} requested`); } catch (e) { appController.showAlert( @@ -75,8 +74,7 @@ export function RobotDecommissionButton({ if (!rmf) { throw new Error('fleets api not available'); } - const id = `recommission-${fleet}-${robotState.name}-${Date.now()}`; - await rmf.fleetsApi?.recommissionRobotFleetsNameRecommissionPost(fleet, robotState.name, id); + await rmf.fleetsApi?.recommissionRobotFleetsNameRecommissionPost(fleet, robotState.name); appController.showAlert('success', `Recommission of ${fleet}:${robotState.name} requested`); } catch (e) { appController.showAlert(