mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2025-12-17 04:51:10 +00:00
fix: cloud bridge error fallback to local
This commit is contained in:
0
unilabos/device_mesh/__init__.py
Normal file
0
unilabos/device_mesh/__init__.py
Normal file
@@ -5,7 +5,7 @@ import time
|
||||
from rclpy.executors import MultiThreadedExecutor
|
||||
from rclpy.action import ActionServer
|
||||
from sensor_msgs.msg import JointState
|
||||
from ilabos_msgs.action import SendCmd
|
||||
from unilabos_msgs.action import SendCmd
|
||||
from rclpy.action.server import ServerGoalHandle
|
||||
from unilabos.ros.nodes.base_device_node import BaseROS2DeviceNode
|
||||
from tf_transformations import quaternion_from_euler
|
||||
|
||||
@@ -643,7 +643,8 @@ class HostNode(BaseROS2DeviceNode):
|
||||
self.lab_logger().debug(f"[Host Node-Resource] Retrieved from bridge: {len(r)} resources")
|
||||
except Exception as e:
|
||||
self.lab_logger().error(f"[Host Node-Resource] Error retrieving from bridge: {str(e)}")
|
||||
r = []
|
||||
r = [resource for resource in self.resources_config if resource.get("id") == request.id]
|
||||
self.lab_logger().warning(f"[Host Node-Resource] Retrieved from local: {len(r)} resources")
|
||||
else:
|
||||
# 本地物料服务,根据 id 查询物料
|
||||
r = [resource for resource in self.resources_config if resource.get("id") == request.id]
|
||||
|
||||
Reference in New Issue
Block a user