diff --git a/test/experiments/comprehensive_protocol/comprehensive_slim.json b/test/experiments/comprehensive_protocol/comprehensive_slim.json index d9dd773d..bc028886 100644 --- a/test/experiments/comprehensive_protocol/comprehensive_slim.json +++ b/test/experiments/comprehensive_protocol/comprehensive_slim.json @@ -17,7 +17,6 @@ "config": { "protocol_type": [ "AddProtocol", - "TransferProtocol", "StartStirProtocol", "StopStirProtocol", "StirProtocol", diff --git a/unilabos/app/main.py b/unilabos/app/main.py index e565f86d..59b73c81 100644 --- a/unilabos/app/main.py +++ b/unilabos/app/main.py @@ -134,6 +134,18 @@ def parse_args(): default="", help="实验室唯一ID,也可通过环境变量 UNILABOS_MQCONFIG_LABID 设置或传入--config设置", ) + parser.add_argument( + "--ak", + type=str, + default="", + help="实验室请求的ak", + ) + parser.add_argument( + "--sk", + type=str, + default="", + help="实验室请求的sk", + ) parser.add_argument( "--skip_env_check", action="store_true", @@ -211,6 +223,8 @@ def main(): print_status("远程资源不存在,本地将进行首次上报!", "info") # 设置BasicConfig参数 + BasicConfig.ak = args_dict.get("ak", "") + BasicConfig.sk = args_dict.get("sk", "") BasicConfig.working_dir = working_dir BasicConfig.is_host_mode = not args_dict.get("without_host", False) BasicConfig.slave_no_host = args_dict.get("slave_no_host", False) diff --git a/unilabos/app/register.py b/unilabos/app/register.py index 2d61f82e..06469018 100644 --- a/unilabos/app/register.py +++ b/unilabos/app/register.py @@ -1,44 +1,59 @@ import argparse +import json import time +from unilabos.config.config import BasicConfig from unilabos.registry.registry import build_registry from unilabos.app.main import load_config_from_file from unilabos.utils.log import logger +from unilabos.utils.type_check import TypeEncoder def register_devices_and_resources(mqtt_client, lab_registry): """ 注册设备和资源到 MQTT """ - logger.info("[UniLab Register] 开始注册设备和资源...") - - # 注册设备信息 - for device_info in lab_registry.obtain_registry_device_info(): - mqtt_client.publish_registry(device_info["id"], device_info, False) - logger.debug(f"[UniLab Register] 注册设备: {device_info['id']}") - - # # 注册资源信息 - # for resource_info in lab_registry.obtain_registry_resource_info(): - # mqtt_client.publish_registry(resource_info["id"], resource_info, False) - # logger.debug(f"[UniLab Register] 注册资源: {resource_info['id']}") # 注册资源信息 - 使用HTTP方式 from unilabos.app.web.client import http_client + logger.info("[UniLab Register] 开始注册设备和资源...") + if BasicConfig.auth_secret(): + # 注册设备信息 + devices_to_register = {} + for device_info in lab_registry.obtain_registry_device_info(): + devices_to_register[device_info["id"]] = json.loads(json.dumps(device_info, ensure_ascii=False, cls=TypeEncoder)) + logger.debug(f"[UniLab Register] 收集设备: {device_info['id']}") + resources_to_register = {} + for resource_info in lab_registry.obtain_registry_resource_info(): + resources_to_register[resource_info["id"]] = resource_info + logger.debug(f"[UniLab Register] 收集资源: {resource_info['id']}") + print("[UniLab Register] 设备注册", http_client.resource_registry({"resources": list(devices_to_register.values())}).text) + print("[UniLab Register] 资源注册", http_client.resource_registry({"resources": list(resources_to_register.values())}).text) + else: + # 注册设备信息 + for device_info in lab_registry.obtain_registry_device_info(): + mqtt_client.publish_registry(device_info["id"], device_info, False) + logger.debug(f"[UniLab Register] 注册设备: {device_info['id']}") - resources_to_register = {} - for resource_info in lab_registry.obtain_registry_resource_info(): - resources_to_register[resource_info["id"]] = resource_info - logger.debug(f"[UniLab Register] 准备注册资源: {resource_info['id']}") + # # 注册资源信息 + # for resource_info in lab_registry.obtain_registry_resource_info(): + # mqtt_client.publish_registry(resource_info["id"], resource_info, False) + # logger.debug(f"[UniLab Register] 注册资源: {resource_info['id']}") - if resources_to_register: - start_time = time.time() - response = http_client.resource_registry(resources_to_register) - cost_time = time.time() - start_time - if response.status_code in [200, 201]: - logger.info(f"[UniLab Register] 成功通过HTTP注册 {len(resources_to_register)} 个资源 {cost_time}ms") - else: - logger.error(f"[UniLab Register] HTTP注册资源失败: {response.status_code}, {response.text} {cost_time}ms") + resources_to_register = {} + for resource_info in lab_registry.obtain_registry_resource_info(): + resources_to_register[resource_info["id"]] = resource_info + logger.debug(f"[UniLab Register] 准备注册资源: {resource_info['id']}") + + if resources_to_register: + start_time = time.time() + response = http_client.resource_registry(resources_to_register) + cost_time = time.time() - start_time + if response.status_code in [200, 201]: + logger.info(f"[UniLab Register] 成功通过HTTP注册 {len(resources_to_register)} 个资源 {cost_time}ms") + else: + logger.error(f"[UniLab Register] HTTP注册资源失败: {response.status_code}, {response.text} {cost_time}ms") logger.info("[UniLab Register] 设备和资源注册完成.") @@ -60,6 +75,18 @@ def main(): default=None, help="配置文件路径,支持.py格式的Python配置文件", ) + parser.add_argument( + "--ak", + type=str, + default="", + help="实验室请求的ak", + ) + parser.add_argument( + "--sk", + type=str, + default="", + help="实验室请求的sk", + ) parser.add_argument( "--complete_registry", action="store_true", @@ -68,6 +95,8 @@ def main(): ) args = parser.parse_args() load_config_from_file(args.config) + BasicConfig.ak = args.ak + BasicConfig.sk = args.sk # 构建注册表 build_registry(args.registry, args.complete_registry, True) from unilabos.app.mq import mqtt_client diff --git a/unilabos/app/web/client.py b/unilabos/app/web/client.py index 7c35c151..214424b3 100644 --- a/unilabos/app/web/client.py +++ b/unilabos/app/web/client.py @@ -15,6 +15,7 @@ from unilabos.utils import logger class HTTPClient: """HTTP客户端,用于与远程服务器通信""" + backend_go = False # 是否使用Go后端 def __init__(self, remote_addr: Optional[str] = None, auth: Optional[str] = None) -> None: """ @@ -28,7 +29,13 @@ class HTTPClient: if auth is not None: self.auth = auth else: - self.auth = MQConfig.lab_id + auth_secret = BasicConfig.auth_secret() + if auth_secret: + self.auth = auth_secret + self.backend_go = True + info(f"正在使用ak sk作为授权信息 {auth_secret}") + else: + self.auth = MQConfig.lab_id info(f"HTTPClient 初始化完成: remote_addr={self.remote_addr}") def resource_edge_add(self, resources: List[Dict[str, Any]], database_process_later: bool) -> requests.Response: @@ -43,7 +50,8 @@ class HTTPClient: """ database_param = 1 if database_process_later else 0 response = requests.post( - f"{self.remote_addr}/lab/resource/edge/batch_create/?database_process_later={database_param}", + f"{self.remote_addr}/lab/resource/edge/batch_create/?database_process_later={database_param}" + if not self.backend_go else f"{self.remote_addr}/lab/material/edge", json=resources, headers={"Authorization": f"lab {self.auth}"}, timeout=100, @@ -63,13 +71,15 @@ class HTTPClient: Response: API响应对象 """ response = requests.post( - f"{self.remote_addr}/lab/resource/?database_process_later={1 if database_process_later else 0}", - json=resources, + f"{self.remote_addr}/lab/resource/?database_process_later={1 if database_process_later else 0}" if not self.backend_go else f"{self.remote_addr}/lab/material", + json=resources if not self.backend_go else {"nodes": resources}, headers={"Authorization": f"lab {self.auth}"}, timeout=100, ) if response.status_code != 200: logger.error(f"添加物料失败: {response.text}") + elif self.backend_go: + logger.info(f"添加物料 {response.text}") return response def resource_get(self, id: str, with_children: bool = False) -> Dict[str, Any]: @@ -84,7 +94,7 @@ class HTTPClient: Dict: 返回的资源数据 """ response = requests.get( - f"{self.remote_addr}/lab/resource/?edge_format=1", + f"{self.remote_addr}/lab/resource/?edge_format=1" if not self.backend_go else f"{self.remote_addr}/lab/material", params={"id": id, "with_children": with_children}, headers={"Authorization": f"lab {self.auth}"}, timeout=20, @@ -151,18 +161,18 @@ class HTTPClient: ) return response - def resource_registry(self, registry_data: Dict[str, Any]) -> requests.Response: + def resource_registry(self, registry_data: Dict[str, Any] | List[Dict[str, Any]]) -> requests.Response: """ 注册资源到服务器 Args: - registry_data: 注册表数据,格式为 {resource_id: resource_info} + registry_data: 注册表数据,格式为 {resource_id: resource_info} / [{resource_info}] Returns: Response: API响应对象 """ response = requests.post( - f"{self.remote_addr}/lab/registry/", + f"{self.remote_addr}/lab/registry/" if not self.backend_go else f"{self.remote_addr}/lab/resource", json=registry_data, headers={"Authorization": f"lab {self.auth}"}, timeout=30, diff --git a/unilabos/compile/__init__.py b/unilabos/compile/__init__.py index fd848ba7..51ca9a2d 100644 --- a/unilabos/compile/__init__.py +++ b/unilabos/compile/__init__.py @@ -46,6 +46,7 @@ action_protocol_generators = { HeatChillStopProtocol: generate_heat_chill_stop_protocol, HydrogenateProtocol: generate_hydrogenate_protocol, PumpTransferProtocol: generate_pump_protocol_with_rinsing, + TransferProtocol: generate_pump_protocol, RecrystallizeProtocol: generate_recrystallize_protocol, ResetHandlingProtocol: generate_reset_handling_protocol, RunColumnProtocol: generate_run_column_protocol, diff --git a/unilabos/config/config.py b/unilabos/config/config.py index 44bcc25a..19f91b3a 100644 --- a/unilabos/config/config.py +++ b/unilabos/config/config.py @@ -1,6 +1,7 @@ #!/usr/bin/env python # coding=utf-8 # 定义配置变量和加载函数 +import base64 import traceback import os import importlib.util @@ -9,6 +10,8 @@ from unilabos.utils import logger class BasicConfig: ENV = "pro" # 'test' + ak = "" + sk = "" working_dir = "" config_path = "" is_host_mode = True @@ -18,6 +21,15 @@ class BasicConfig: vis_2d_enable = False enable_resource_load = True + @classmethod + def auth_secret(cls): + # base64编码 + if not cls.ak or not cls.sk: + return "" + target = f"{cls.ak}:{cls.sk}" + base64_target = base64.b64encode(target.encode('utf-8')).decode('utf-8') + return base64_target + # MQTT配置 class MQConfig: diff --git a/unilabos/registry/device_comms/communication_devices.yaml b/unilabos/registry/device_comms/communication_devices.yaml index 4b49cc99..6b21394d 100644 --- a/unilabos/registry/device_comms/communication_devices.yaml +++ b/unilabos/registry/device_comms/communication_devices.yaml @@ -9,7 +9,7 @@ serial: goal_default: request: null response: null - handles: [] + handles: {} result: {} schema: description: handle_serial_request的参数schema @@ -35,7 +35,7 @@ serial: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: read_data的参数schema @@ -56,7 +56,7 @@ serial: goal: {} goal_default: command: null - handles: [] + handles: {} result: {} schema: description: send_command的参数schema diff --git a/unilabos/registry/devices/camera.yaml b/unilabos/registry/devices/camera.yaml index 5f5b24bc..8d7b09fb 100644 --- a/unilabos/registry/devices/camera.yaml +++ b/unilabos/registry/devices/camera.yaml @@ -7,7 +7,7 @@ camera.USB: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: 用于安全地关闭摄像头设备,释放摄像头资源,停止视频采集和发布服务。调用此函数将清理OpenCV摄像头连接并销毁ROS2节点。 @@ -27,7 +27,7 @@ camera.USB: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: 定时器回调函数的参数schema。此函数负责定期采集摄像头视频帧,将OpenCV格式的图像转换为ROS Image消息格式,并发布到指定的视频话题。默认以10Hz频率执行,确保视频流的连续性和实时性。 diff --git a/unilabos/registry/devices/characterization_chromatic.yaml b/unilabos/registry/devices/characterization_chromatic.yaml index 7132b4fb..527c6828 100644 --- a/unilabos/registry/devices/characterization_chromatic.yaml +++ b/unilabos/registry/devices/characterization_chromatic.yaml @@ -7,7 +7,7 @@ hplc.agilent: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: 检查安捷伦HPLC设备状态的函数。用于监控设备的运行状态、连接状态、错误信息等关键指标。该函数定期查询设备状态,确保系统稳定运行,及时发现和报告设备异常。适用于自动化流程中的设备监控、故障诊断、系统维护等场景。 @@ -28,7 +28,7 @@ hplc.agilent: goal: {} goal_default: file_path: null - handles: [] + handles: {} result: {} schema: description: 从文本文件中提取分析数据的函数。用于解析安捷伦HPLC生成的结果文件,提取峰面积、保留时间、浓度等关键分析数据。支持多种文件格式的自动识别和数据结构化处理,为后续数据分析和报告生成提供标准化的数据格式。适用于批量数据处理、结果验证、质量控制等分析工作流程。 @@ -54,7 +54,7 @@ hplc.agilent: params: null resource: null wf_name: null - handles: [] + handles: {} result: {} schema: description: 启动安捷伦HPLC分析序列的函数。用于执行预定义的分析方法序列,包括样品进样、色谱分离、检测等完整的分析流程。支持参数配置、资源分配、工作流程管理等功能,实现全自动的样品分析。适用于批量样品处理、标准化分析、质量检测等需要连续自动分析的应用场景。 @@ -82,7 +82,7 @@ hplc.agilent: goal: {} goal_default: device_name: null - handles: [] + handles: {} result: {} schema: description: 尝试关闭HPLC子设备的函数。用于安全地关闭泵、检测器、进样器等各个子模块,确保设备正常断开连接并保护硬件安全。该函数提供错误处理和状态确认机制,避免强制关闭可能造成的设备损坏。适用于设备维护、系统重启、紧急停机等需要安全关闭设备的场景。 @@ -105,7 +105,7 @@ hplc.agilent: goal: {} goal_default: device_name: null - handles: [] + handles: {} result: {} schema: description: 尝试打开HPLC子设备的函数。用于初始化和连接泵、检测器、进样器等各个子模块,建立设备通信并进行自检。该函数提供连接验证和错误恢复机制,确保子设备正常启动并准备就绪。适用于设备初始化、系统启动、设备重连等需要建立设备连接的场景。 @@ -129,7 +129,7 @@ hplc.agilent: command: command goal_default: command: '' - handles: [] + handles: {} result: success: success schema: @@ -228,7 +228,7 @@ hplc.agilent-zhida: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: '' @@ -260,7 +260,7 @@ hplc.agilent-zhida: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: HPLC设备连接关闭函数。安全地断开与智达HPLC设备的TCP socket连接,释放网络资源。该函数确保连接的正确关闭,避免网络资源泄露。通常在设备使用完毕或系统关闭时调用。 @@ -280,7 +280,7 @@ hplc.agilent-zhida: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: HPLC设备连接建立函数。与智达HPLC设备建立TCP socket通信连接,配置通信超时参数。该函数是设备使用前的必要步骤,建立成功后可进行状态查询、方法获取、任务启动等操作。连接失败时会抛出异常。 @@ -300,7 +300,7 @@ hplc.agilent-zhida: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: '' @@ -334,7 +334,7 @@ hplc.agilent-zhida: string: string goal_default: string: '' - handles: [] + handles: {} result: {} schema: description: '' diff --git a/unilabos/registry/devices/characterization_optic.yaml b/unilabos/registry/devices/characterization_optic.yaml index 6ebdcbd3..f8a3105a 100644 --- a/unilabos/registry/devices/characterization_optic.yaml +++ b/unilabos/registry/devices/characterization_optic.yaml @@ -8,7 +8,7 @@ raman.home_made: goal: {} goal_default: int_time: null - handles: [] + handles: {} result: {} schema: description: 设置CCD检测器积分时间的函数。用于配置拉曼光谱仪的信号采集时间,控制光谱数据的质量和信噪比。较长的积分时间可获得更高的信号强度和更好的光谱质量,但会增加测量时间。该函数允许根据样品特性和测量要求动态调整检测参数,优化测量效果。 @@ -32,7 +32,7 @@ raman.home_made: goal: {} goal_default: output_voltage_laser: null - handles: [] + handles: {} result: {} schema: description: 设置激光器输出功率的函数。用于控制拉曼光谱仪激光器的功率输出,调节激光强度以适应不同样品的测量需求。适当的激光功率能够获得良好的拉曼信号同时避免样品损伤。该函数支持精确的功率控制,确保测量结果的稳定性和重现性。 @@ -57,7 +57,7 @@ raman.home_made: goal_default: int_time: null laser_power: null - handles: [] + handles: {} result: {} schema: description: 执行无背景扣除的拉曼光谱测量函数。用于直接采集样品的拉曼光谱信号,不进行背景校正处理。该函数配置积分时间和激光功率参数,获取原始光谱数据用于后续的数据处理分析。适用于对光谱数据质量要求较高或需要自定义背景处理流程的测量场景。 @@ -87,7 +87,7 @@ raman.home_made: int_time: null laser_power: null sample_name: null - handles: [] + handles: {} result: {} schema: description: 执行多次平均的无背景拉曼光谱测量函数。通过多次测量取平均值来提高光谱数据的信噪比和测量精度,减少随机噪声影响。该函数支持自定义平均次数、积分时间、激光功率等参数,并可为样品指定名称便于数据管理。适用于对测量精度要求较高的定量分析和研究应用。 @@ -121,7 +121,7 @@ raman.home_made: command: command goal_default: command: '' - handles: [] + handles: {} result: success: success schema: diff --git a/unilabos/registry/devices/gas_handler.yaml b/unilabos/registry/devices/gas_handler.yaml index 944675b1..644696a5 100644 --- a/unilabos/registry/devices/gas_handler.yaml +++ b/unilabos/registry/devices/gas_handler.yaml @@ -7,7 +7,7 @@ gas_source.mock: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: is_closed的参数schema @@ -27,7 +27,7 @@ gas_source.mock: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: is_open的参数schema @@ -47,7 +47,7 @@ gas_source.mock: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: '' @@ -79,7 +79,7 @@ gas_source.mock: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: '' @@ -113,7 +113,7 @@ gas_source.mock: string: string goal_default: string: '' - handles: [] + handles: {} result: {} schema: description: '' @@ -187,7 +187,7 @@ vacuum_pump.mock: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: is_closed的参数schema @@ -207,7 +207,7 @@ vacuum_pump.mock: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: is_open的参数schema @@ -227,7 +227,7 @@ vacuum_pump.mock: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: '' @@ -259,7 +259,7 @@ vacuum_pump.mock: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: '' @@ -293,7 +293,7 @@ vacuum_pump.mock: string: string goal_default: string: '' - handles: [] + handles: {} result: {} schema: description: '' diff --git a/unilabos/registry/devices/liquid_handler.yaml b/unilabos/registry/devices/liquid_handler.yaml index 12ddc915..df38dbb8 100644 --- a/unilabos/registry/devices/liquid_handler.yaml +++ b/unilabos/registry/devices/liquid_handler.yaml @@ -87,7 +87,7 @@ liquid_handler: type: '' use_channels: - 0 - handles: [] + handles: {} placeholder_keys: reagent_sources: unilabos_resources targets: unilabos_resources @@ -398,7 +398,7 @@ liquid_handler: - 0 vols: - 0.0 - handles: [] + handles: {} result: name: name schema: @@ -564,7 +564,7 @@ liquid_handler: protocol_name: null protocol_type: null protocol_version: null - handles: [] + handles: {} result: {} schema: description: 创建实验协议函数。用于建立新的液体处理实验协议,定义协议名称、描述、版本、作者、日期等基本信息。该函数支持协议模板化管理,便于实验流程的标准化和重复性。适用于实验设计、方法开发、标准操作程序建立等需要协议管理的应用场景。 @@ -607,7 +607,7 @@ liquid_handler: goal_default: msg: null seconds: 0 - handles: [] + handles: {} result: {} schema: description: 自定义延时函数。在实验流程中插入可配置的等待时间,用于满足特定的反应时间、孵育时间或设备稳定时间要求。支持自定义延时消息和秒数设置,提供流程控制和时间管理功能。适用于酶反应等待、温度平衡、样品孵育等需要时间控制的实验步骤。 @@ -633,7 +633,7 @@ liquid_handler: goal: {} goal_default: tip_racks: null - handles: [] + handles: {} result: {} schema: description: 吸头迭代函数。用于自动管理和切换吸头架中的吸头,实现批量实验中的吸头自动分配和追踪。该函数监控吸头使用状态,自动切换到下一个可用吸头位置,确保实验流程的连续性。适用于高通量实验、批量处理、自动化流水线等需要大量吸头管理的应用场景。 @@ -657,7 +657,7 @@ liquid_handler: goal: {} goal_default: tip_racks: null - handles: [] + handles: {} result: {} schema: description: 吸头架设置函数。用于配置和初始化液体处理系统的吸头架信息,包括吸头架位置、类型、容量等参数。该函数建立吸头资源管理系统,为后续的吸头选择和使用提供基础配置。适用于系统初始化、吸头架更换、实验配置等需要吸头资源管理的操作场景。 @@ -681,7 +681,7 @@ liquid_handler: goal: {} goal_default: targets: null - handles: [] + handles: {} result: {} schema: description: 吸头碰触函数。控制移液器吸头轻触容器边缘或底部,用于去除吸头外壁附着的液滴,提高移液精度和减少污染。该函数支持多目标位置操作,可配置碰触参数和位置偏移。适用于精密移液、减少液体残留、防止交叉污染等需要提高移液质量的实验操作。 @@ -707,7 +707,7 @@ liquid_handler: goal_default: use_channels: - 0 - handles: [] + handles: {} result: name: name schema: @@ -790,7 +790,7 @@ liquid_handler: - 0 vols: - 0.0 - handles: [] + handles: {} result: name: name schema: @@ -977,7 +977,7 @@ liquid_handler: type: '' use_channels: - 0 - handles: [] + handles: {} placeholder_keys: tip_spots: unilabos_resources result: @@ -1146,7 +1146,7 @@ liquid_handler: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} result: name: name schema: @@ -1311,7 +1311,7 @@ liquid_handler: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} result: {} schema: description: '' @@ -1527,7 +1527,7 @@ liquid_handler: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} result: name: name schema: @@ -1844,7 +1844,7 @@ liquid_handler: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} result: name: name schema: @@ -2156,7 +2156,7 @@ liquid_handler: x: 0.0 y: 0.0 z: 0.0 - handles: [] + handles: {} result: name: name schema: @@ -2368,7 +2368,7 @@ liquid_handler: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} result: {} schema: description: '' @@ -2514,7 +2514,7 @@ liquid_handler: type: '' use_channels: - 0 - handles: [] + handles: {} result: name: name schema: @@ -2676,7 +2676,7 @@ liquid_handler: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} result: name: name schema: @@ -2876,7 +2876,7 @@ liquid_handler: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} result: {} schema: description: '' @@ -3203,7 +3203,7 @@ liquid_handler: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} placeholder_keys: sources: unilabos_resources waste_liquid: unilabos_resources @@ -3463,7 +3463,7 @@ liquid_handler: allow_nonzero_volume: false use_channels: - 0 - handles: [] + handles: {} result: name: name schema: @@ -3511,7 +3511,7 @@ liquid_handler: allow_nonzero_volume: allow_nonzero_volume goal_default: allow_nonzero_volume: false - handles: [] + handles: {} result: name: name schema: @@ -3598,7 +3598,7 @@ liquid_handler: sample_id: '' type: '' volume: 0.0 - handles: [] + handles: {} result: name: name schema: @@ -3807,7 +3807,7 @@ liquid_handler: to_vessel: '' viscous: false volume: 0.0 - handles: [] + handles: {} schema: description: '' properties: @@ -4431,7 +4431,7 @@ liquid_handler.biomek: resource_tracker: null resources: null slot_on_deck: null - handles: [] + handles: {} result: {} schema: description: create_resource的参数schema @@ -4482,7 +4482,7 @@ liquid_handler.biomek: liquid_volume: null parent: null slot_on_deck: null - handles: [] + handles: {} result: {} schema: description: instrument_setup_biomek的参数schema @@ -4538,7 +4538,7 @@ liquid_handler.biomek: protocol_name: '' protocol_type: '' protocol_version: '' - handles: [] + handles: {} result: {} schema: description: '' @@ -4766,7 +4766,7 @@ liquid_handler.biomek: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: '' @@ -5487,7 +5487,7 @@ liquid_handler.prcxi: type: '' use_channels: - 0 - handles: [] + handles: {} placeholder_keys: reagent_sources: unilabos_resources targets: unilabos_resources @@ -5798,7 +5798,7 @@ liquid_handler.prcxi: - 0 vols: - 0.0 - handles: [] + handles: {} placeholder_keys: resources: unilabos_resources result: {} @@ -5965,7 +5965,7 @@ liquid_handler.prcxi: protocol_name: '' protocol_type: '' protocol_version: '' - handles: [] + handles: {} result: {} schema: description: create_protocol的参数schema @@ -6008,7 +6008,7 @@ liquid_handler.prcxi: goal_default: msg: null seconds: 0 - handles: [] + handles: {} result: {} schema: description: custom_delay的参数schema @@ -6034,7 +6034,7 @@ liquid_handler.prcxi: goal: {} goal_default: tip_racks: null - handles: [] + handles: {} result: {} schema: description: iter_tips的参数schema @@ -6060,7 +6060,7 @@ liquid_handler.prcxi: channel: 0 dis_to_top: 0 well: null - handles: [] + handles: {} result: {} schema: description: move_to的参数schema @@ -6089,7 +6089,7 @@ liquid_handler.prcxi: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: run_protocol的参数schema @@ -6110,7 +6110,7 @@ liquid_handler.prcxi: goal: {} goal_default: targets: null - handles: [] + handles: {} result: {} schema: description: touch_tip的参数schema @@ -6136,7 +6136,7 @@ liquid_handler.prcxi: goal_default: use_channels: - 0 - handles: [] + handles: {} result: {} schema: description: '' @@ -6218,7 +6218,7 @@ liquid_handler.prcxi: - 0 vols: - 0.0 - handles: [] + handles: {} placeholder_keys: resources: unilabos_resources result: {} @@ -6406,7 +6406,7 @@ liquid_handler.prcxi: type: '' use_channels: - 0 - handles: [] + handles: {} placeholder_keys: tip_spots: unilabos_resources result: {} @@ -6583,7 +6583,7 @@ liquid_handler.prcxi: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} placeholder_keys: targets: unilabos_resources result: {} @@ -6763,7 +6763,7 @@ liquid_handler.prcxi: type: '' use_channels: - 0 - handles: [] + handles: {} placeholder_keys: tip_spots: unilabos_resources result: {} @@ -6975,7 +6975,7 @@ liquid_handler.prcxi: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} placeholder_keys: sources: unilabos_resources waste_liquid: unilabos_resources @@ -7257,7 +7257,7 @@ liquid_handler.prcxi: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} placeholder_keys: wells: unilabos_resources result: {} @@ -7398,7 +7398,7 @@ liquid_handler.prcxi: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} placeholder_keys: tip_racks: unilabos_resources result: {} @@ -7527,7 +7527,7 @@ liquid_handler.prcxi: to_vessel: '' viscous: false volume: 0.0 - handles: [] + handles: {} schema: description: '' properties: @@ -7717,7 +7717,7 @@ liquid_handler.prcxi: touch_tip: false use_channels: - 0 - handles: [] + handles: {} placeholder_keys: sources: unilabos_resources targets: unilabos_resources @@ -8164,7 +8164,7 @@ liquid_handler.revvity: sample_id: '' type: '' wf_name: '' - handles: [] + handles: {} result: success: success schema: diff --git a/unilabos/registry/devices/organic_miscellaneous.yaml b/unilabos/registry/devices/organic_miscellaneous.yaml index c3e4aa27..1ac2ac28 100644 --- a/unilabos/registry/devices/organic_miscellaneous.yaml +++ b/unilabos/registry/devices/organic_miscellaneous.yaml @@ -8,7 +8,7 @@ rotavap.one: goal: {} goal_default: cmd: null - handles: [] + handles: {} result: {} schema: description: cmd_write的参数schema @@ -31,7 +31,7 @@ rotavap.one: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: main_loop的参数schema @@ -52,7 +52,7 @@ rotavap.one: goal: {} goal_default: time: null - handles: [] + handles: {} result: {} schema: description: set_pump_time的参数schema @@ -76,7 +76,7 @@ rotavap.one: goal: {} goal_default: time: null - handles: [] + handles: {} result: {} schema: description: set_rotate_time的参数schema @@ -101,7 +101,7 @@ rotavap.one: command: command goal_default: command: '' - handles: [] + handles: {} result: success: success schema: @@ -171,7 +171,7 @@ separator.homemade: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: read_sensor_loop的参数schema @@ -193,7 +193,7 @@ separator.homemade: goal_default: condition: null value: null - handles: [] + handles: {} result: {} schema: description: valve_open的参数schema @@ -220,7 +220,7 @@ separator.homemade: goal: {} goal_default: data: null - handles: [] + handles: {} result: {} schema: description: write的参数schema @@ -273,7 +273,7 @@ separator.homemade: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} result: success: success schema: @@ -410,7 +410,7 @@ separator.homemade: command: command goal_default: command: '' - handles: [] + handles: {} result: success: success schema: diff --git a/unilabos/registry/devices/pump_and_valve.yaml b/unilabos/registry/devices/pump_and_valve.yaml index 7fc3a20b..352e841e 100644 --- a/unilabos/registry/devices/pump_and_valve.yaml +++ b/unilabos/registry/devices/pump_and_valve.yaml @@ -7,7 +7,7 @@ solenoid_valve: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: close的参数schema @@ -27,7 +27,7 @@ solenoid_valve: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: is_closed的参数schema @@ -47,7 +47,7 @@ solenoid_valve: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: is_open的参数schema @@ -67,7 +67,7 @@ solenoid_valve: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: '' @@ -87,7 +87,7 @@ solenoid_valve: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: read_data的参数schema @@ -108,7 +108,7 @@ solenoid_valve: goal: {} goal_default: command: null - handles: [] + handles: {} result: {} schema: description: send_command的参数schema @@ -133,7 +133,7 @@ solenoid_valve: string: position goal_default: string: '' - handles: [] + handles: {} result: {} schema: description: '' @@ -204,7 +204,7 @@ solenoid_valve.mock: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: is_closed的参数schema @@ -224,7 +224,7 @@ solenoid_valve.mock: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: is_open的参数schema @@ -245,7 +245,7 @@ solenoid_valve.mock: goal: {} goal_default: position: null - handles: [] + handles: {} result: {} schema: description: set_valve_position的参数schema @@ -268,7 +268,7 @@ solenoid_valve.mock: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: '' @@ -300,7 +300,7 @@ solenoid_valve.mock: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: '' @@ -375,7 +375,7 @@ syringe_pump_with_valve.runze.SY03B-T06: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: close的参数schema @@ -395,7 +395,7 @@ syringe_pump_with_valve.runze.SY03B-T06: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: initialize的参数schema @@ -416,7 +416,7 @@ syringe_pump_with_valve.runze.SY03B-T06: goal: {} goal_default: volume: null - handles: [] + handles: {} result: {} schema: description: pull_plunger的参数schema @@ -440,7 +440,7 @@ syringe_pump_with_valve.runze.SY03B-T06: goal: {} goal_default: volume: null - handles: [] + handles: {} result: {} schema: description: push_plunger的参数schema @@ -463,7 +463,7 @@ syringe_pump_with_valve.runze.SY03B-T06: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: query_aux_input_status_1的参数schema @@ -483,7 +483,7 @@ syringe_pump_with_valve.runze.SY03B-T06: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: query_aux_input_status_2的参数schema @@ -503,7 +503,7 @@ syringe_pump_with_valve.runze.SY03B-T06: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: query_backlash_position的参数schema @@ -523,7 +523,7 @@ syringe_pump_with_valve.runze.SY03B-T06: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: query_command_buffer_status的参数schema @@ -543,7 +543,7 @@ syringe_pump_with_valve.runze.SY03B-T06: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: query_software_version的参数schema @@ -564,7 +564,7 @@ syringe_pump_with_valve.runze.SY03B-T06: goal: {} goal_default: full_command: null - handles: [] + handles: {} result: {} schema: description: send_command的参数schema @@ -588,7 +588,7 @@ syringe_pump_with_valve.runze.SY03B-T06: goal: {} goal_default: baudrate: null - handles: [] + handles: {} result: {} schema: description: set_baudrate的参数schema @@ -612,7 +612,7 @@ syringe_pump_with_valve.runze.SY03B-T06: goal: {} goal_default: velocity: null - handles: [] + handles: {} result: {} schema: description: set_max_velocity的参数schema @@ -637,7 +637,7 @@ syringe_pump_with_valve.runze.SY03B-T06: goal_default: max_velocity: null position: null - handles: [] + handles: {} result: {} schema: description: set_position的参数schema @@ -663,7 +663,7 @@ syringe_pump_with_valve.runze.SY03B-T06: goal: {} goal_default: position: null - handles: [] + handles: {} result: {} schema: description: set_valve_position的参数schema @@ -687,7 +687,7 @@ syringe_pump_with_valve.runze.SY03B-T06: goal: {} goal_default: velocity: null - handles: [] + handles: {} result: {} schema: description: set_velocity_grade的参数schema @@ -710,7 +710,7 @@ syringe_pump_with_valve.runze.SY03B-T06: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: stop_operation的参数schema @@ -730,7 +730,7 @@ syringe_pump_with_valve.runze.SY03B-T06: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: wait_error的参数schema @@ -879,7 +879,7 @@ syringe_pump_with_valve.runze.SY03B-T08: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: close的参数schema @@ -899,7 +899,7 @@ syringe_pump_with_valve.runze.SY03B-T08: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: initialize的参数schema @@ -920,7 +920,7 @@ syringe_pump_with_valve.runze.SY03B-T08: goal: {} goal_default: volume: null - handles: [] + handles: {} result: {} schema: description: pull_plunger的参数schema @@ -944,7 +944,7 @@ syringe_pump_with_valve.runze.SY03B-T08: goal: {} goal_default: volume: null - handles: [] + handles: {} result: {} schema: description: push_plunger的参数schema @@ -967,7 +967,7 @@ syringe_pump_with_valve.runze.SY03B-T08: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: query_aux_input_status_1的参数schema @@ -987,7 +987,7 @@ syringe_pump_with_valve.runze.SY03B-T08: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: query_aux_input_status_2的参数schema @@ -1007,7 +1007,7 @@ syringe_pump_with_valve.runze.SY03B-T08: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: query_backlash_position的参数schema @@ -1027,7 +1027,7 @@ syringe_pump_with_valve.runze.SY03B-T08: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: query_command_buffer_status的参数schema @@ -1047,7 +1047,7 @@ syringe_pump_with_valve.runze.SY03B-T08: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: query_software_version的参数schema @@ -1068,7 +1068,7 @@ syringe_pump_with_valve.runze.SY03B-T08: goal: {} goal_default: full_command: null - handles: [] + handles: {} result: {} schema: description: send_command的参数schema @@ -1092,7 +1092,7 @@ syringe_pump_with_valve.runze.SY03B-T08: goal: {} goal_default: baudrate: null - handles: [] + handles: {} result: {} schema: description: set_baudrate的参数schema @@ -1116,7 +1116,7 @@ syringe_pump_with_valve.runze.SY03B-T08: goal: {} goal_default: velocity: null - handles: [] + handles: {} result: {} schema: description: set_max_velocity的参数schema @@ -1141,7 +1141,7 @@ syringe_pump_with_valve.runze.SY03B-T08: goal_default: max_velocity: null position: null - handles: [] + handles: {} result: {} schema: description: set_position的参数schema @@ -1167,7 +1167,7 @@ syringe_pump_with_valve.runze.SY03B-T08: goal: {} goal_default: position: null - handles: [] + handles: {} result: {} schema: description: set_valve_position的参数schema @@ -1191,7 +1191,7 @@ syringe_pump_with_valve.runze.SY03B-T08: goal: {} goal_default: velocity: null - handles: [] + handles: {} result: {} schema: description: set_velocity_grade的参数schema @@ -1214,7 +1214,7 @@ syringe_pump_with_valve.runze.SY03B-T08: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: stop_operation的参数schema @@ -1234,7 +1234,7 @@ syringe_pump_with_valve.runze.SY03B-T08: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: wait_error的参数schema diff --git a/unilabos/registry/devices/robot_agv.yaml b/unilabos/registry/devices/robot_agv.yaml index be4aa6c0..74085b1f 100644 --- a/unilabos/registry/devices/robot_agv.yaml +++ b/unilabos/registry/devices/robot_agv.yaml @@ -10,7 +10,7 @@ agv.SEER: cmd: null ex_data: '' obj: receive_socket - handles: [] + handles: {} result: {} schema: description: AGV底层通信命令发送函数。通过TCP socket连接向AGV发送底层控制命令,支持pose(位置)、status(状态)、nav(导航)等命令类型。用于获取AGV当前位置坐标、运行状态或发送导航指令。该函数封装了AGV的通信协议,将命令转换为十六进制数据包并处理响应解析。 @@ -41,7 +41,7 @@ agv.SEER: command: command goal_default: command: '' - handles: [] + handles: {} result: success: success schema: diff --git a/unilabos/registry/devices/robot_arm.yaml b/unilabos/registry/devices/robot_arm.yaml index 61803d17..cf72c766 100644 --- a/unilabos/registry/devices/robot_arm.yaml +++ b/unilabos/registry/devices/robot_arm.yaml @@ -7,7 +7,7 @@ robotic_arm.SCARA_with_slider.virtual: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: check_tf_update_actions的参数schema @@ -32,7 +32,7 @@ robotic_arm.SCARA_with_slider.virtual: move_group: null retry: 10 speed: 1 - handles: [] + handles: {} result: {} schema: description: moveit_joint_task的参数schema @@ -77,7 +77,7 @@ robotic_arm.SCARA_with_slider.virtual: retry: 10 speed: 1 target_link: null - handles: [] + handles: {} result: {} schema: description: moveit_task的参数schema @@ -124,7 +124,7 @@ robotic_arm.SCARA_with_slider.virtual: goal: {} goal_default: ros_node: null - handles: [] + handles: {} result: {} schema: description: post_init的参数schema @@ -149,7 +149,7 @@ robotic_arm.SCARA_with_slider.virtual: goal_default: parent_link: null resource: null - handles: [] + handles: {} result: {} schema: description: resource_manager的参数schema @@ -175,7 +175,7 @@ robotic_arm.SCARA_with_slider.virtual: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: wait_for_resource_action的参数schema @@ -197,7 +197,7 @@ robotic_arm.SCARA_with_slider.virtual: command: command goal_default: command: '' - handles: [] + handles: {} result: {} schema: description: '' @@ -240,7 +240,7 @@ robotic_arm.SCARA_with_slider.virtual: command: command goal_default: command: '' - handles: [] + handles: {} result: {} schema: description: '' @@ -283,7 +283,7 @@ robotic_arm.SCARA_with_slider.virtual: command: command goal_default: command: '' - handles: [] + handles: {} result: {} schema: description: '' @@ -359,7 +359,7 @@ robotic_arm.UR: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: 机械臂初始化函数。执行UR机械臂的完整初始化流程,包括上电、释放制动器、解除保护停止状态等。该函数确保机械臂从安全停止状态恢复到可操作状态,是机械臂使用前的必要步骤。初始化完成后机械臂将处于就绪状态,可以接收后续的运动指令。 @@ -380,7 +380,7 @@ robotic_arm.UR: goal: {} goal_default: data: null - handles: [] + handles: {} result: {} schema: description: 从JSON字符串加载位置数据函数。接收包含机械臂位置信息的JSON格式字符串,解析并存储位置数据供后续运动任务使用。位置数据通常包含多个预定义的工作位置坐标,用于实现精确的多点运动控制。适用于动态配置机械臂工作位置的场景。 @@ -404,7 +404,7 @@ robotic_arm.UR: goal: {} goal_default: file: null - handles: [] + handles: {} result: {} schema: description: 从文件加载位置数据函数。读取指定的JSON文件并加载其中的机械臂位置信息。该函数支持从外部配置文件中获取预设的工作位置,便于位置数据的管理和重用。适用于需要从固定配置文件中读取复杂位置序列的应用场景。 @@ -427,7 +427,7 @@ robotic_arm.UR: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: 重新加载位置数据函数。重新读取并解析之前设置的位置文件,更新内存中的位置数据。该函数用于在位置文件被修改后刷新机械臂的位置配置,无需重新初始化整个系统。适用于动态更新机械臂工作位置的场景。 @@ -449,7 +449,7 @@ robotic_arm.UR: command: command goal_default: command: '' - handles: [] + handles: {} result: success: success schema: @@ -535,7 +535,7 @@ robotic_arm.elite: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: '' @@ -555,7 +555,7 @@ robotic_arm.elite: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: '' @@ -578,7 +578,7 @@ robotic_arm.elite: quantity: null start_addr: null unit_id: null - handles: [] + handles: {} result: {} schema: description: '' @@ -608,7 +608,7 @@ robotic_arm.elite: goal: {} goal_default: job_id: null - handles: [] + handles: {} result: {} schema: description: '' @@ -634,7 +634,7 @@ robotic_arm.elite: register_addr: null unit_id: null value: null - handles: [] + handles: {} result: {} schema: description: '' @@ -664,7 +664,7 @@ robotic_arm.elite: goal: {} goal_default: response: null - handles: [] + handles: {} result: {} schema: description: '' @@ -688,7 +688,7 @@ robotic_arm.elite: goal: {} goal_default: command: null - handles: [] + handles: {} result: {} schema: description: '' @@ -713,7 +713,7 @@ robotic_arm.elite: command: command goal_default: command: '' - handles: [] + handles: {} result: {} schema: description: '' diff --git a/unilabos/registry/devices/robot_gripper.yaml b/unilabos/registry/devices/robot_gripper.yaml index 2a2ccce1..f3ee1415 100644 --- a/unilabos/registry/devices/robot_gripper.yaml +++ b/unilabos/registry/devices/robot_gripper.yaml @@ -7,7 +7,7 @@ gripper.misumi_rz: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: data_loop的参数schema @@ -27,7 +27,7 @@ gripper.misumi_rz: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: data_reader的参数schema @@ -50,7 +50,7 @@ gripper.misumi_rz: force: null pos: null speed: null - handles: [] + handles: {} result: {} schema: description: 夹爪抓取运动控制函数。控制夹爪的开合运动,支持位置、速度、力矩的精确设定。位置参数控制夹爪开合程度,速度参数控制运动快慢,力矩参数控制夹持强度。该函数提供安全的力控制,避免损坏被抓取物体,适用于各种形状和材质的物品抓取。 @@ -79,7 +79,7 @@ gripper.misumi_rz: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: 夹爪初始化函数。执行Misumi RZ夹爪的完整初始化流程,包括Modbus通信建立、电机参数配置、传感器校准等。该函数确保夹爪系统从安全状态恢复到可操作状态,是夹爪使用前的必要步骤。初始化完成后夹爪将处于就绪状态,可接收抓取和旋转指令。 @@ -100,7 +100,7 @@ gripper.misumi_rz: goal: {} goal_default: data: null - handles: [] + handles: {} result: {} schema: description: modbus_crc的参数schema @@ -129,7 +129,7 @@ gripper.misumi_rz: spin_F: null spin_pos: null spin_v: null - handles: [] + handles: {} result: {} schema: description: move_and_rotate的参数schema @@ -168,7 +168,7 @@ gripper.misumi_rz: goal: {} goal_default: cmd: null - handles: [] + handles: {} result: {} schema: description: 节点夹爪移动任务函数。接收逗号分隔的命令字符串,解析位置、速度、力矩参数并执行夹爪抓取动作。该函数等待运动完成并返回执行结果,提供同步的运动控制接口。适用于需要可靠完成确认的精密抓取操作。 @@ -192,7 +192,7 @@ gripper.misumi_rz: goal: {} goal_default: cmd: null - handles: [] + handles: {} result: {} schema: description: 节点旋转移动任务函数。接收逗号分隔的命令字符串,解析角度、速度、力矩参数并执行夹爪旋转动作。该函数等待旋转完成并返回执行结果,提供同步的旋转控制接口。适用于需要精确角度定位和完成确认的旋转操作。 @@ -218,7 +218,7 @@ gripper.misumi_rz: address: null data_len: null id: null - handles: [] + handles: {} result: {} schema: description: read_address的参数schema @@ -250,7 +250,7 @@ gripper.misumi_rz: force: null pos: null speed: null - handles: [] + handles: {} result: {} schema: description: 夹爪绝对位置旋转控制函数。控制夹爪主轴旋转到指定的绝对角度位置,支持360度连续旋转。位置参数指定目标角度,速度参数控制旋转速率,力矩参数设定旋转阻力限制。该函数提供高精度的角度定位,适用于需要精确方向控制的操作场景。 @@ -283,7 +283,7 @@ gripper.misumi_rz: data: null fun: null id: null - handles: [] + handles: {} result: {} schema: description: send_cmd的参数schema @@ -315,7 +315,7 @@ gripper.misumi_rz: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: wait_for_gripper的参数schema @@ -335,7 +335,7 @@ gripper.misumi_rz: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: wait_for_gripper_init的参数schema @@ -355,7 +355,7 @@ gripper.misumi_rz: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: wait_for_rotate的参数schema @@ -377,7 +377,7 @@ gripper.misumi_rz: command: command goal_default: command: '' - handles: [] + handles: {} result: success: success schema: @@ -461,7 +461,7 @@ gripper.mock: resource: Gripper1: {} wf_name: gripper_run - handles: [] + handles: {} result: {} schema: description: 模拟夹爪资源ID编辑函数。用于测试和演示资源管理功能,模拟修改夹爪资源的标识信息。该函数接收工作流名称、参数和资源对象,模拟真实的资源更新过程并返回修改后的资源信息。适用于系统测试和开发调试场景。 @@ -498,7 +498,7 @@ gripper.mock: command: max_effort: 0.0 position: 0.0 - handles: [] + handles: {} result: effort: torque position: position diff --git a/unilabos/registry/devices/robot_linear_motion.yaml b/unilabos/registry/devices/robot_linear_motion.yaml index 70885351..4cc4eaf9 100644 --- a/unilabos/registry/devices/robot_linear_motion.yaml +++ b/unilabos/registry/devices/robot_linear_motion.yaml @@ -7,7 +7,7 @@ linear_motion.grbl: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: CNC设备初始化函数。执行Grbl CNC的完整初始化流程,包括归零操作、轴校准和状态复位。该函数将所有轴移动到原点位置(0,0,0),确保设备处于已知的参考状态。初始化完成后设备进入空闲状态,可接收后续的运动指令。 @@ -28,7 +28,7 @@ linear_motion.grbl: goal: {} goal_default: position: null - handles: [] + handles: {} result: {} schema: description: CNC绝对位置设定函数。控制CNC设备移动到指定的三维坐标位置(x,y,z)。该函数支持安全限位检查,防止超出设备工作范围。移动过程中会监控设备状态,确保安全到达目标位置。适用于精确定位和轨迹控制操作。 @@ -51,7 +51,7 @@ linear_motion.grbl: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: CNC操作停止函数。立即停止当前正在执行的所有CNC运动,包括轴移动和主轴旋转。该函数用于紧急停止或任务中断,确保设备和工件的安全。停止后设备将保持当前位置,等待新的指令。 @@ -71,7 +71,7 @@ linear_motion.grbl: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: wait_error的参数schema @@ -113,7 +113,7 @@ linear_motion.grbl: x: 0.0 y: 0.0 z: 0.0 - handles: [] + handles: {} result: {} schema: description: '' @@ -345,7 +345,7 @@ linear_motion.grbl: nanosec: 0 sec: 0 position: 0.0 - handles: [] + handles: {} result: {} schema: description: '' @@ -479,7 +479,7 @@ linear_motion.toyo_xyz.sim: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: check_tf_update_actions的参数schema @@ -504,7 +504,7 @@ linear_motion.toyo_xyz.sim: move_group: null retry: 10 speed: 1 - handles: [] + handles: {} result: {} schema: description: moveit_joint_task的参数schema @@ -549,7 +549,7 @@ linear_motion.toyo_xyz.sim: retry: 10 speed: 1 target_link: null - handles: [] + handles: {} result: {} schema: description: moveit_task的参数schema @@ -596,7 +596,7 @@ linear_motion.toyo_xyz.sim: goal: {} goal_default: ros_node: null - handles: [] + handles: {} result: {} schema: description: post_init的参数schema @@ -621,7 +621,7 @@ linear_motion.toyo_xyz.sim: goal_default: parent_link: null resource: null - handles: [] + handles: {} result: {} schema: description: resource_manager的参数schema @@ -647,7 +647,7 @@ linear_motion.toyo_xyz.sim: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: wait_for_resource_action的参数schema @@ -669,7 +669,7 @@ linear_motion.toyo_xyz.sim: command: command goal_default: command: '' - handles: [] + handles: {} result: {} schema: description: '' @@ -712,7 +712,7 @@ linear_motion.toyo_xyz.sim: command: command goal_default: command: '' - handles: [] + handles: {} result: {} schema: description: '' @@ -755,7 +755,7 @@ linear_motion.toyo_xyz.sim: command: command goal_default: command: '' - handles: [] + handles: {} result: {} schema: description: '' @@ -834,7 +834,7 @@ motor.iCL42: mode: null position: null velocity: null - handles: [] + handles: {} result: {} schema: description: 步进电机执行运动函数。直接执行电机运动命令,包括位置设定、速度控制和路径规划。该函数处理底层的电机控制协议,消除警告信息,设置运动参数并启动电机运行。适用于需要直接控制电机运动的应用场景。 @@ -863,7 +863,7 @@ motor.iCL42: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: iCL42电机设备初始化函数。建立与iCL42步进电机驱动器的串口通信连接,配置通信参数包括波特率、数据位、校验位等。该函数是电机使用前的必要步骤,确保驱动器处于可控状态并准备接收运动指令。 @@ -886,7 +886,7 @@ motor.iCL42: mode: null position: null velocity: null - handles: [] + handles: {} result: {} schema: description: 步进电机运动控制函数。根据指定的运动模式、目标位置和速度参数控制电机运动。支持多种运动模式和精确的位置控制,自动处理运动轨迹规划和执行。该函数提供异步执行和状态反馈,确保运动的准确性和可靠性。 @@ -917,7 +917,7 @@ motor.iCL42: command: command goal_default: command: '' - handles: [] + handles: {} result: success: success schema: diff --git a/unilabos/registry/devices/solid_dispenser.yaml b/unilabos/registry/devices/solid_dispenser.yaml index 31af41d0..42cabec1 100644 --- a/unilabos/registry/devices/solid_dispenser.yaml +++ b/unilabos/registry/devices/solid_dispenser.yaml @@ -13,7 +13,7 @@ solid_dispenser.laiyu: compound_mass: 0.0 powder_tube_number: 0 target_tube_position: '' - handles: [] + handles: {} result: actual_mass_mg: actual_mass_mg schema: @@ -64,7 +64,7 @@ solid_dispenser.laiyu: goal: {} goal_default: data: null - handles: [] + handles: {} result: {} schema: description: Modbus CRC-16校验码计算函数。计算Modbus RTU通信协议所需的CRC-16校验码,确保数据传输的完整性和可靠性。该函数实现标准的CRC-16算法,用于构造完整的Modbus指令帧。 @@ -88,7 +88,7 @@ solid_dispenser.laiyu: goal: {} goal_default: command: null - handles: [] + handles: {} result: {} schema: description: Modbus指令发送函数。构造完整的Modbus RTU指令帧(包含CRC校验),发送给分装设备并等待响应。该函数处理底层通信协议,确保指令的正确传输和响应接收,支持最长3分钟的响应等待时间。 @@ -113,7 +113,7 @@ solid_dispenser.laiyu: float_input: float_input goal_default: float_in: 0.0 - handles: [] + handles: {} result: {} schema: description: '' @@ -153,7 +153,7 @@ solid_dispenser.laiyu: string: string goal_default: string: '' - handles: [] + handles: {} result: {} schema: description: '' @@ -197,7 +197,7 @@ solid_dispenser.laiyu: x: 0.0 y: 0.0 z: 0.0 - handles: [] + handles: {} result: {} schema: description: '' @@ -243,7 +243,7 @@ solid_dispenser.laiyu: int_input: int_input goal_default: int_input: 0 - handles: [] + handles: {} result: {} schema: description: '' @@ -285,7 +285,7 @@ solid_dispenser.laiyu: int_input: int_input goal_default: int_input: 0 - handles: [] + handles: {} result: {} schema: description: '' @@ -325,7 +325,7 @@ solid_dispenser.laiyu: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: '' diff --git a/unilabos/registry/devices/temperature.yaml b/unilabos/registry/devices/temperature.yaml index 95bdeed5..f83d921a 100644 --- a/unilabos/registry/devices/temperature.yaml +++ b/unilabos/registry/devices/temperature.yaml @@ -11,7 +11,7 @@ chiller: function_code: null register_address: null value: null - handles: [] + handles: {} result: {} schema: description: build_modbus_frame的参数schema @@ -45,7 +45,7 @@ chiller: goal_default: decimal_points: 1 temperature: null - handles: [] + handles: {} result: {} schema: description: convert_temperature_to_modbus_value的参数schema @@ -72,7 +72,7 @@ chiller: goal: {} goal_default: data: null - handles: [] + handles: {} result: {} schema: description: modbus_crc的参数schema @@ -95,7 +95,7 @@ chiller: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: stop的参数schema @@ -117,7 +117,7 @@ chiller: command: command goal_default: command: '' - handles: [] + handles: {} result: success: success schema: @@ -187,7 +187,7 @@ heaterstirrer.dalong: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: close的参数schema @@ -208,7 +208,7 @@ heaterstirrer.dalong: goal: {} goal_default: speed: null - handles: [] + handles: {} result: {} schema: description: set_stir_speed的参数schema @@ -233,7 +233,7 @@ heaterstirrer.dalong: goal_default: temp: null type: warning - handles: [] + handles: {} result: {} schema: description: set_temp_inner的参数schema @@ -293,7 +293,7 @@ heaterstirrer.dalong: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} result: success: success schema: @@ -438,7 +438,7 @@ heaterstirrer.dalong: command: temp goal_default: command: '' - handles: [] + handles: {} result: success: success schema: @@ -482,7 +482,7 @@ heaterstirrer.dalong: command: temp goal_default: command: '' - handles: [] + handles: {} result: success: success schema: @@ -579,7 +579,7 @@ tempsensor: function_code: null register_address: null register_count: null - handles: [] + handles: {} result: {} schema: description: build_modbus_request的参数schema @@ -612,7 +612,7 @@ tempsensor: goal: {} goal_default: data: null - handles: [] + handles: {} result: {} schema: description: calculate_crc的参数schema @@ -636,7 +636,7 @@ tempsensor: goal: {} goal_default: response: null - handles: [] + handles: {} result: {} schema: description: read_modbus_response的参数schema @@ -660,7 +660,7 @@ tempsensor: goal: {} goal_default: command: null - handles: [] + handles: {} result: {} schema: description: send_prototype_command的参数schema @@ -685,7 +685,7 @@ tempsensor: command: command goal_default: command: '' - handles: [] + handles: {} result: success: success schema: diff --git a/unilabos/registry/devices/virtual_device.yaml b/unilabos/registry/devices/virtual_device.yaml index 9531158e..d97d6251 100644 --- a/unilabos/registry/devices/virtual_device.yaml +++ b/unilabos/registry/devices/virtual_device.yaml @@ -7,7 +7,7 @@ virtual_centrifuge: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: cleanup的参数schema @@ -27,7 +27,7 @@ virtual_centrifuge: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: initialize的参数schema @@ -78,7 +78,7 @@ virtual_centrifuge: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} result: message: message success: success @@ -295,7 +295,7 @@ virtual_column: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: cleanup的参数schema @@ -315,7 +315,7 @@ virtual_column: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: initialize的参数schema @@ -388,7 +388,7 @@ virtual_column: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} result: message: current_status return_info: current_status @@ -690,7 +690,7 @@ virtual_filter: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: cleanup的参数schema @@ -710,7 +710,7 @@ virtual_filter: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: initialize的参数schema @@ -786,7 +786,7 @@ virtual_filter: sample_id: '' type: '' volume: 0.0 - handles: [] + handles: {} result: message: message return_info: message @@ -1088,7 +1088,7 @@ virtual_gas_source: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: cleanup的参数schema @@ -1108,7 +1108,7 @@ virtual_gas_source: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: initialize的参数schema @@ -1128,7 +1128,7 @@ virtual_gas_source: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: is_closed的参数schema @@ -1148,7 +1148,7 @@ virtual_gas_source: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: is_open的参数schema @@ -1168,7 +1168,7 @@ virtual_gas_source: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: '' @@ -1200,7 +1200,7 @@ virtual_gas_source: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: '' @@ -1234,7 +1234,7 @@ virtual_gas_source: string: string goal_default: string: '' - handles: [] + handles: {} result: {} schema: description: '' @@ -1310,7 +1310,7 @@ virtual_heatchill: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: cleanup的参数schema @@ -1330,7 +1330,7 @@ virtual_heatchill: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: initialize的参数schema @@ -1386,7 +1386,7 @@ virtual_heatchill: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} result: success: success schema: @@ -1555,7 +1555,7 @@ virtual_heatchill: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} result: success: success schema: @@ -1696,7 +1696,7 @@ virtual_heatchill: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} result: success: success schema: @@ -1879,7 +1879,7 @@ virtual_multiway_valve: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: close的参数schema @@ -1900,7 +1900,7 @@ virtual_multiway_valve: goal: {} goal_default: port_number: null - handles: [] + handles: {} result: {} schema: description: is_at_port的参数schema @@ -1924,7 +1924,7 @@ virtual_multiway_valve: goal: {} goal_default: position: null - handles: [] + handles: {} result: {} schema: description: is_at_position的参数schema @@ -1947,7 +1947,7 @@ virtual_multiway_valve: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: is_at_pump_position的参数schema @@ -1967,7 +1967,7 @@ virtual_multiway_valve: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: '' @@ -1987,7 +1987,7 @@ virtual_multiway_valve: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: reset的参数schema @@ -2008,7 +2008,7 @@ virtual_multiway_valve: goal: {} goal_default: port_number: null - handles: [] + handles: {} result: {} schema: description: set_to_port的参数schema @@ -2031,7 +2031,7 @@ virtual_multiway_valve: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: set_to_pump_position的参数schema @@ -2052,7 +2052,7 @@ virtual_multiway_valve: goal: {} goal_default: port_number: null - handles: [] + handles: {} result: {} schema: description: switch_between_pump_and_port的参数schema @@ -2077,7 +2077,7 @@ virtual_multiway_valve: command: command goal_default: command: '' - handles: [] + handles: {} result: success: success schema: @@ -2121,7 +2121,7 @@ virtual_multiway_valve: command: command goal_default: command: '' - handles: [] + handles: {} result: success: success schema: @@ -2299,7 +2299,7 @@ virtual_rotavap: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: cleanup的参数schema @@ -2319,7 +2319,7 @@ virtual_rotavap: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: initialize的参数schema @@ -2371,7 +2371,7 @@ virtual_rotavap: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} result: message: message success: success @@ -2629,7 +2629,7 @@ virtual_separator: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: cleanup的参数schema @@ -2649,7 +2649,7 @@ virtual_separator: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: initialize的参数schema @@ -2834,7 +2834,7 @@ virtual_separator: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} result: message: message success: success @@ -3516,7 +3516,7 @@ virtual_solenoid_valve: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: cleanup的参数schema @@ -3536,7 +3536,7 @@ virtual_solenoid_valve: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: initialize的参数schema @@ -3556,7 +3556,7 @@ virtual_solenoid_valve: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: is_closed的参数schema @@ -3576,7 +3576,7 @@ virtual_solenoid_valve: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: reset的参数schema @@ -3596,7 +3596,7 @@ virtual_solenoid_valve: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: toggle的参数schema @@ -3617,7 +3617,7 @@ virtual_solenoid_valve: goal: command: CLOSED goal_default: {} - handles: [] + handles: {} result: success: success schema: @@ -3650,7 +3650,7 @@ virtual_solenoid_valve: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: '' @@ -3684,7 +3684,7 @@ virtual_solenoid_valve: string: string goal_default: string: '' - handles: [] + handles: {} result: {} schema: description: '' @@ -3724,7 +3724,7 @@ virtual_solenoid_valve: command: command goal_default: command: '' - handles: [] + handles: {} result: message: message success: success @@ -3871,7 +3871,7 @@ virtual_solid_dispenser: type: '' viscous: false volume: '' - handles: [] + handles: {} result: message: message return_info: return_info @@ -4034,7 +4034,7 @@ virtual_solid_dispenser: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: cleanup的参数schema @@ -4055,7 +4055,7 @@ virtual_solid_dispenser: goal: {} goal_default: reagent_name: null - handles: [] + handles: {} result: {} schema: description: '' @@ -4078,7 +4078,7 @@ virtual_solid_dispenser: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: initialize的参数schema @@ -4099,7 +4099,7 @@ virtual_solid_dispenser: goal: {} goal_default: mass_str: null - handles: [] + handles: {} result: {} schema: description: '' @@ -4123,7 +4123,7 @@ virtual_solid_dispenser: goal: {} goal_default: mol_str: null - handles: [] + handles: {} result: {} schema: description: '' @@ -4205,7 +4205,7 @@ virtual_stirrer: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: cleanup的参数schema @@ -4225,7 +4225,7 @@ virtual_stirrer: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: initialize的参数schema @@ -4271,7 +4271,7 @@ virtual_stirrer: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} result: success: success schema: @@ -4429,7 +4429,7 @@ virtual_stirrer: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} result: success: success schema: @@ -4585,7 +4585,7 @@ virtual_stirrer: z: 0.0 sample_id: '' type: '' - handles: [] + handles: {} result: success: success schema: @@ -4772,7 +4772,7 @@ virtual_transfer_pump: goal_default: velocity: null volume: null - handles: [] + handles: {} result: {} schema: description: aspirate的参数schema @@ -4797,7 +4797,7 @@ virtual_transfer_pump: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: cleanup的参数schema @@ -4819,7 +4819,7 @@ virtual_transfer_pump: goal_default: velocity: null volume: null - handles: [] + handles: {} result: {} schema: description: dispense的参数schema @@ -4845,7 +4845,7 @@ virtual_transfer_pump: goal: {} goal_default: velocity: null - handles: [] + handles: {} result: {} schema: description: empty_syringe的参数schema @@ -4868,7 +4868,7 @@ virtual_transfer_pump: goal: {} goal_default: velocity: null - handles: [] + handles: {} result: {} schema: description: fill_syringe的参数schema @@ -4890,7 +4890,7 @@ virtual_transfer_pump: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: initialize的参数schema @@ -4910,7 +4910,7 @@ virtual_transfer_pump: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: is_empty的参数schema @@ -4930,7 +4930,7 @@ virtual_transfer_pump: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: is_full的参数schema @@ -4952,7 +4952,7 @@ virtual_transfer_pump: goal_default: velocity: null volume: null - handles: [] + handles: {} result: {} schema: description: pull_plunger的参数schema @@ -4979,7 +4979,7 @@ virtual_transfer_pump: goal_default: velocity: null volume: null - handles: [] + handles: {} result: {} schema: description: push_plunger的参数schema @@ -5005,7 +5005,7 @@ virtual_transfer_pump: goal: {} goal_default: velocity: null - handles: [] + handles: {} result: {} schema: description: set_max_velocity的参数schema @@ -5028,7 +5028,7 @@ virtual_transfer_pump: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: stop_operation的参数schema @@ -5055,7 +5055,7 @@ virtual_transfer_pump: goal_default: max_velocity: 0.0 position: 0.0 - handles: [] + handles: {} result: message: message success: success @@ -5133,7 +5133,7 @@ virtual_transfer_pump: to_vessel: '' viscous: false volume: 0.0 - handles: [] + handles: {} result: message: message success: success @@ -5272,7 +5272,7 @@ virtual_vacuum_pump: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: cleanup的参数schema @@ -5292,7 +5292,7 @@ virtual_vacuum_pump: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: initialize的参数schema @@ -5312,7 +5312,7 @@ virtual_vacuum_pump: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: is_closed的参数schema @@ -5332,7 +5332,7 @@ virtual_vacuum_pump: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: is_open的参数schema @@ -5352,7 +5352,7 @@ virtual_vacuum_pump: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: '' @@ -5384,7 +5384,7 @@ virtual_vacuum_pump: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: '' @@ -5418,7 +5418,7 @@ virtual_vacuum_pump: string: string goal_default: string: '' - handles: [] + handles: {} result: {} schema: description: '' diff --git a/unilabos/registry/devices/work_station.yaml b/unilabos/registry/devices/work_station.yaml index d8bb21ac..c2f02484 100644 --- a/unilabos/registry/devices/work_station.yaml +++ b/unilabos/registry/devices/work_station.yaml @@ -53,7 +53,7 @@ workstation: sample_id: '' type: '' to_repo_position: '' - handles: [] + handles: {} result: {} schema: description: '' @@ -6030,7 +6030,7 @@ workstation: goal_default: action_name: null action_value_mapping: null - handles: [] + handles: {} result: {} schema: description: create_ros_action_server的参数schema @@ -6059,7 +6059,7 @@ workstation: action_kwargs: null action_name: null device_id: null - handles: [] + handles: {} result: {} schema: description: execute_single_action的参数schema @@ -6090,7 +6090,7 @@ workstation: goal_default: device_config: null device_id: null - handles: [] + handles: {} result: {} schema: description: initialize_device的参数schema @@ -6150,7 +6150,7 @@ workstation.example: feedback: {} goal: {} goal_default: {} - handles: [] + handles: {} result: {} schema: description: '' @@ -6178,7 +6178,7 @@ workstation.example: resource_tracker: null resources: null slot_on_deck: null - handles: [] + handles: {} result: {} schema: description: '' diff --git a/unilabos/registry/registry.py b/unilabos/registry/registry.py index 6f3f0815..3cb29379 100644 --- a/unilabos/registry/registry.py +++ b/unilabos/registry/registry.py @@ -523,6 +523,12 @@ class Registry: for action_name, action_config in device_config["class"]["action_value_mappings"].items(): if "handles" not in action_config: action_config["handles"] = {} + elif isinstance(action_config["handles"], list): + if len(action_config["handles"]): + logger.error(f"设备{device_id} {action_name} 的handles配置错误,应该是字典类型") + continue + else: + action_config["handles"] = {} if "type" in action_config: action_type_str: str = action_config["type"] # 通过Json发放指令,而不是通过特殊的ros action进行处理