diff --git a/unilabos/registry/devices/camera.yaml b/unilabos/registry/devices/camera.yaml index 3e9cb1d..db3c845 100644 --- a/unilabos/registry/devices/camera.yaml +++ b/unilabos/registry/devices/camera.yaml @@ -47,6 +47,8 @@ camera: description: VideoPublisher摄像头设备节点,用于实时视频采集和流媒体发布。该设备通过OpenCV连接本地摄像头(如USB摄像头、内置摄像头等),定时采集视频帧并将其转换为ROS2的sensor_msgs/Image消息格式发布到视频话题。主要用于实验室自动化系统中的视觉监控、图像分析、实时观察等应用场景。支持可配置的摄像头索引、发布频率等参数。 handles: [] icon: '' + category: + - camera init_param_schema: config: properties: diff --git a/unilabos/registry/registry.py b/unilabos/registry/registry.py index 5fedfdb..36dd6b7 100644 --- a/unilabos/registry/registry.py +++ b/unilabos/registry/registry.py @@ -147,7 +147,8 @@ class Registry: logger.debug(f"[UniLab Registry] resources: {resource_path.exists()}, total: {len(files)}") current_resource_number = len(self.resource_type_registry) + 1 for i, file in enumerate(files): - data = yaml.safe_load(open(file, encoding="utf-8")) + with open(file, encoding="utf-8", mode="r") as f: + data = yaml.safe_load(io.StringIO(f.read())) if data: # 为每个资源添加文件路径信息 for resource_id, resource_info in data.items(): @@ -344,6 +345,7 @@ class Registry: } def load_device_types(self, path: os.PathLike, complete_registry: bool): + return abs_path = Path(path).absolute() devices_path = abs_path / "devices" device_comms_path = abs_path / "device_comms" diff --git a/unilabos_msgs/CMakeLists.txt b/unilabos_msgs/CMakeLists.txt index f8dd61c..1c37139 100644 --- a/unilabos_msgs/CMakeLists.txt +++ b/unilabos_msgs/CMakeLists.txt @@ -65,6 +65,7 @@ set(action_files "action/LiquidHandlerReturnTips.action" "action/LiquidHandlerReturnTips96.action" "action/LiquidHandlerSetLiquid.action" + "action/LiquidHandlerSetTipRack.action" "action/LiquidHandlerStamp.action" "action/LiquidHandlerTransfer.action" diff --git a/unilabos_msgs/action/LiquidHandlerSetTipRack.action b/unilabos_msgs/action/LiquidHandlerSetTipRack.action new file mode 100644 index 0000000..eb34fee --- /dev/null +++ b/unilabos_msgs/action/LiquidHandlerSetTipRack.action @@ -0,0 +1,5 @@ +Resource[] tip_racks +--- +string return_info +bool success +---