Merge branch 'dev' into fork/KCFeng425/fix-protocol-parameter

# Conflicts:
#	unilabos/app/mq.py
#	unilabos/registry/devices/virtual_device.yaml
#	unilabos/registry/devices/work_station.yaml
This commit is contained in:
Xuwznln
2025-07-16 11:10:05 +08:00
33 changed files with 2970 additions and 4331 deletions

2
.gitignore vendored
View File

@@ -1,3 +1,5 @@
configs/
temp/
## Python ## Python
# Byte-compiled / optimized / DLL files # Byte-compiled / optimized / DLL files

217
test/experiments/prcxi.json Normal file
View File

@@ -0,0 +1,217 @@
{
"nodes": [
{
"id": "PRCXI",
"name": "PRCXI",
"parent": null,
"type": "device",
"class": "liquid_handler.prcxi",
"position": {
"x": 0,
"y": 0,
"z": 0
},
"config": {
"deck": {
"_resource_child_name": "deck",
"_resource_type": "unilabos.devices.liquid_handling.prcxi.prcxi:PRCXI9300Deck"
},
"host": "192.168.3.9",
"port": 9999,
"timeout": 10.0,
"setup": false,
"debug": true
},
"data": {},
"children": [
"deck"
]
},
{
"id": "deck",
"name": "deck",
"sample_id": null,
"children": [
"rackT1",
"plateT2",
"plateT3",
"rackT4",
"plateT5",
"plateT6"
],
"parent": "PRCXI",
"type": "device",
"class": "",
"position": {
"x": 0,
"y": 0,
"z": 0
},
"config": {
"type": "PRCXI9300Deck"
},
"data": {}
},
{
"id": "rackT1",
"name": "rackT1",
"sample_id": null,
"children": [],
"parent": "deck",
"type": "device",
"class": "",
"position": {
"x": 0,
"y": 0,
"z": 0
},
"config": {
"type": "PRCXI9300Container",
"size_x": 120.98,
"size_y": 82.12,
"size_z": 50.3
},
"data": {
"Material": {
"uuid": "80652665f6a54402b2408d50b40398df",
"Code": "ZX-001-1000",
"Name": "1000μL Tip头",
"SummaryName": "1000μL Tip头",
"PipetteHeight": 100,
"materialEnum": 1
}
}
},
{
"id": "plateT2",
"name": "plateT2",
"sample_id": null,
"children": [],
"parent": "deck",
"type": "device",
"class": "",
"position": {
"x": 0,
"y": 0,
"z": 0
},
"config": {
"type": "PRCXI9300Container",
"size_x": 120.98,
"size_y": 82.12,
"size_z": 50.3
},
"data": {
"Material": {
"uuid": "57b1e4711e9e4a32b529f3132fc5931f"
}
}
},
{
"id": "plateT3",
"name": "plateT3",
"sample_id": null,
"children": [],
"parent": "deck",
"type": "device",
"class": "",
"position": {
"x": 0,
"y": 0,
"z": 0
},
"config": {
"type": "PRCXI9300Container",
"size_x": 120.98,
"size_y": 82.12,
"size_z": 50.3
},
"data": {
"Material": {
"uuid": "57b1e4711e9e4a32b529f3132fc5931f"
}
}
},
{
"id": "rackT4",
"name": "rackT4",
"sample_id": null,
"children": [],
"parent": "deck",
"type": "device",
"class": "",
"position": {
"x": 0,
"y": 0,
"z": 0
},
"config": {
"type": "PRCXI9300Container",
"size_x": 120.98,
"size_y": 82.12,
"size_z": 50.3
},
"data": {
"Material": {
"uuid": "80652665f6a54402b2408d50b40398df",
"Code": "ZX-001-1000",
"Name": "1000μL Tip头",
"SummaryName": "1000μL Tip头",
"PipetteHeight": 100,
"materialEnum": 1
}
}
},
{
"id": "plateT5",
"name": "plateT5",
"sample_id": null,
"children": [],
"parent": "deck",
"type": "device",
"class": "",
"position": {
"x": 0,
"y": 0,
"z": 0
},
"config": {
"type": "PRCXI9300Container",
"size_x": 120.98,
"size_y": 82.12,
"size_z": 50.3
},
"data": {
"Material": {
"uuid": "57b1e4711e9e4a32b529f3132fc5931f"
}
}
},
{
"id": "plateT6",
"name": "plateT6",
"sample_id": null,
"children": [],
"parent": "deck",
"type": "device",
"class": "",
"position": {
"x": 0,
"y": 0,
"z": 0
},
"config": {
"type": "PRCXI9300Container",
"size_x": 120.98,
"size_y": 82.12,
"size_z": 50.3
},
"data": {
"Material": {
"uuid": "57b1e4711e9e4a32b529f3132fc5931f"
}
}
}
],
"links": []
}

View File

@@ -1,8 +1,10 @@
import json import json
import traceback
import uuid import uuid
from unilabos.app.model import JobAddReq, JobData from unilabos.app.model import JobAddReq, JobData
from unilabos.ros.nodes.presets.host_node import HostNode from unilabos.ros.nodes.presets.host_node import HostNode
from unilabos.utils.type_check import serialize_result_info
def get_resources() -> tuple: def get_resources() -> tuple:
@@ -33,5 +35,10 @@ def job_add(req: JobAddReq) -> JobData:
if "command" in action_args: if "command" in action_args:
action_args = action_args["command"] action_args = action_args["command"]
# print(f"job_add:{req.device_id} {action_name} {action_kwargs}") # print(f"job_add:{req.device_id} {action_name} {action_kwargs}")
HostNode.get_instance().send_goal(req.device_id, action_type=action_type, action_name=action_name, action_kwargs=action_args, goal_uuid=req.job_id, server_info=req.server_info) try:
HostNode.get_instance().send_goal(req.device_id, action_type=action_type, action_name=action_name, action_kwargs=action_args, goal_uuid=req.job_id, server_info=req.server_info)
except Exception as e:
for bridge in HostNode.get_instance().bridges:
if hasattr(bridge, "publish_job_status"):
bridge.publish_job_status({}, req.job_id, "failed", serialize_result_info(traceback.format_exc(), False, {}))
return JobData(jobId=req.job_id) return JobData(jobId=req.job_id)

View File

@@ -163,10 +163,10 @@ class MQTTClient:
# status = device_status.get(device_id, {}) # status = device_status.get(device_id, {})
if self.mqtt_disable: if self.mqtt_disable:
return return
status = {"data": device_status.get(device_id, {}), "device_id": device_id} status = {"data": device_status.get(device_id, {}), "device_id": device_id, "timestamp": time.time()}
address = f"labs/{MQConfig.lab_id}/devices/" address = f"labs/{MQConfig.lab_id}/devices/"
self.client.publish(address, json.dumps(status), qos=2) self.client.publish(address, json.dumps(status), qos=2)
# logger.debug(f"Device status published: address: {address}, {status}") logger.debug(f"Device status published: address: {address}, {status}")
def publish_job_status(self, feedback_data: dict, job_id: str, status: str, return_info: Optional[str] = None): def publish_job_status(self, feedback_data: dict, job_id: str, status: str, return_info: Optional[str] = None):
if self.mqtt_disable: if self.mqtt_disable:

View File

@@ -1,5 +1,6 @@
from __future__ import annotations from __future__ import annotations
import traceback
from typing import List, Sequence, Optional, Literal, Union, Iterator from typing import List, Sequence, Optional, Literal, Union, Iterator
import asyncio import asyncio
@@ -117,7 +118,7 @@ class LiquidHandlerAbstract(LiquidHandler):
pass # This mode is not verified. pass # This mode is not verified.
else: else:
if len(asp_vols) != len(targets): if len(asp_vols) != len(targets):
raise ValueError("Length of `vols` must match `targets`.") raise ValueError(f"Length of `asp_vols` {len(asp_vols)} must match `targets` {len(targets)}.")
tip = next(self.current_tip) tip = next(self.current_tip)
await self.pick_up_tips(tip) await self.pick_up_tips(tip)
@@ -160,6 +161,7 @@ class LiquidHandlerAbstract(LiquidHandler):
await self.discard_tips() await self.discard_tips()
except Exception as e: except Exception as e:
traceback.print_exc()
raise RuntimeError(f"Liquid addition failed: {e}") from e raise RuntimeError(f"Liquid addition failed: {e}") from e
# --------------------------------------------------------------- # ---------------------------------------------------------------
@@ -183,7 +185,7 @@ class LiquidHandlerAbstract(LiquidHandler):
spread: Literal["wide", "tight", "custom"] = "wide", spread: Literal["wide", "tight", "custom"] = "wide",
is_96_well: bool = False, is_96_well: bool = False,
mix_stage: Optional[Literal["none", "before", "after", "both"]] = "none", mix_stage: Optional[Literal["none", "before", "after", "both"]] = "none",
mix_times: Optional[List(int)] = None, mix_times: Optional[List[int]] = None,
mix_vol: Optional[int] = None, mix_vol: Optional[int] = None,
mix_rate: Optional[int] = None, mix_rate: Optional[int] = None,
mix_liquid_height: Optional[float] = None, mix_liquid_height: Optional[float] = None,

File diff suppressed because it is too large Load Diff

View File

@@ -17,7 +17,7 @@ class MoveitInterface:
tf_buffer: Buffer tf_buffer: Buffer
tf_listener: TransformListener tf_listener: TransformListener
def __init__(self, moveit_type, joint_poses, rotation=None, device_config=None): def __init__(self, moveit_type, joint_poses, rotation=None, device_config=None, **kwargs):
self.device_config = device_config self.device_config = device_config
self.rotation = rotation self.rotation = rotation
self.data_config = json.load( self.data_config = json.load(

View File

@@ -100,3 +100,4 @@ serial:
properties: {} properties: {}
required: [] required: []
type: object type: object
version: 0.0.1

View File

@@ -8,7 +8,7 @@ camera:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: destroy_node的参数schema description: 用于安全地关闭摄像头设备释放摄像头资源停止视频采集和发布服务。调用此函数将清理OpenCV摄像头连接并销毁ROS2节点。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -28,7 +28,7 @@ camera:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: timer_callback的参数schema description: 定时器回调函数的参数schema。此函数负责定期采集摄像头视频帧将OpenCV格式的图像转换为ROS Image消息格式并发布到指定的视频话题。默认以10Hz频率执行确保视频流的连续性和实时性。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -44,7 +44,7 @@ camera:
module: unilabos.ros.nodes.presets.camera:VideoPublisher module: unilabos.ros.nodes.presets.camera:VideoPublisher
status_types: {} status_types: {}
type: ros2 type: ros2
description: '' description: VideoPublisher摄像头设备节点用于实时视频采集和流媒体发布。该设备通过OpenCV连接本地摄像头如USB摄像头、内置摄像头等定时采集视频帧并将其转换为ROS2的sensor_msgs/Image消息格式发布到视频话题。主要用于实验室自动化系统中的视觉监控、图像分析、实时观察等应用场景。支持可配置的摄像头索引、发布频率等参数。
handles: [] handles: []
icon: '' icon: ''
init_param_schema: init_param_schema:
@@ -67,3 +67,4 @@ camera:
properties: {} properties: {}
required: [] required: []
type: object type: object
version: 0.0.1

View File

@@ -8,7 +8,7 @@ hplc.agilent:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: check_status的参数schema description: 检查安捷伦HPLC设备状态的函数。用于监控设备的运行状态、连接状态、错误信息等关键指标。该函数定期查询设备状态确保系统稳定运行及时发现和报告设备异常。适用于自动化流程中的设备监控、故障诊断、系统维护等场景。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -29,7 +29,7 @@ hplc.agilent:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: extract_data_from_txt的参数schema description: 从文本文件中提取分析数据的函数。用于解析安捷伦HPLC生成的结果文件提取峰面积、保留时间、浓度等关键分析数据。支持多种文件格式的自动识别和数据结构化处理为后续数据分析和报告生成提供标准化的数据格式。适用于批量数据处理、结果验证、质量控制等分析工作流程。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -55,7 +55,7 @@ hplc.agilent:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: start_sequence的参数schema description: 启动安捷伦HPLC分析序列的函数。用于执行预定义的分析方法序列包括样品进样、色谱分离、检测等完整的分析流程。支持参数配置、资源分配、工作流程管理等功能实现全自动的样品分析。适用于批量样品处理、标准化分析、质量检测等需要连续自动分析的应用场景。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -83,7 +83,7 @@ hplc.agilent:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: try_close_sub_device的参数schema description: 尝试关闭HPLC子设备的函数。用于安全地关闭泵、检测器、进样器等各个子模块确保设备正常断开连接并保护硬件安全。该函数提供错误处理和状态确认机制避免强制关闭可能造成的设备损坏。适用于设备维护、系统重启、紧急停机等需要安全关闭设备的场景。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -106,7 +106,7 @@ hplc.agilent:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: try_open_sub_device的参数schema description: 尝试打开HPLC子设备的函数。用于初始化和连接泵、检测器、进样器等各个子模块建立设备通信并进行自检。该函数提供连接验证和错误恢复机制确保子设备正常启动并准备就绪。适用于设备初始化、系统启动、设备重连等需要建立设备连接的场景。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -131,10 +131,9 @@ hplc.agilent:
result: result:
success: success success: success
schema: schema:
description: ROS Action SendCmd 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
status: status:
type: string type: string
@@ -143,7 +142,6 @@ hplc.agilent:
title: SendCmd_Feedback title: SendCmd_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
command: command:
type: string type: string
@@ -152,7 +150,6 @@ hplc.agilent:
title: SendCmd_Goal title: SendCmd_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -179,7 +176,7 @@ hplc.agilent:
status_text: str status_text: str
success: bool success: bool
type: python type: python
description: HPLC device description: 安捷伦高效液相色谱HPLC分析设备用于复杂化合物的分离、检测和定量分析。该设备通过UI自动化技术控制安捷伦ChemStation软件实现全自动的样品分析流程。具备序列启动、设备状态监控、数据文件提取、结果处理等功能。支持多样品批量处理和实时状态反馈适用于药物分析、环境检测、食品安全、化学研究等需要高精度色谱分析的实验室应用。
handles: [] handles: []
icon: '' icon: ''
init_param_schema: init_param_schema:
@@ -218,6 +215,7 @@ hplc.agilent:
- finish_status - finish_status
- data_file - data_file
type: object type: object
version: 0.0.1
raman_home_made: raman_home_made:
class: class:
action_value_mappings: action_value_mappings:
@@ -229,7 +227,7 @@ raman_home_made:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ccd_time的参数schema description: 设置CCD检测器积分时间的函数。用于配置拉曼光谱仪的信号采集时间控制光谱数据的质量和信噪比。较长的积分时间可获得更高的信号强度和更好的光谱质量但会增加测量时间。该函数允许根据样品特性和测量要求动态调整检测参数优化测量效果。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -253,7 +251,7 @@ raman_home_made:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: laser_on_power的参数schema description: 设置激光器输出功率的函数。用于控制拉曼光谱仪激光器的功率输出,调节激光强度以适应不同样品的测量需求。适当的激光功率能够获得良好的拉曼信号同时避免样品损伤。该函数支持精确的功率控制,确保测量结果的稳定性和重现性。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -269,30 +267,6 @@ raman_home_made:
title: laser_on_power参数 title: laser_on_power参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-raman_cmd:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: raman_cmd的参数schema
properties:
feedback: {}
goal:
properties:
command:
type: string
required:
- command
type: object
result: {}
required:
- goal
title: raman_cmd参数
type: object
type: UniLabJsonCommand
auto-raman_without_background: auto-raman_without_background:
feedback: {} feedback: {}
goal: {} goal: {}
@@ -302,7 +276,7 @@ raman_home_made:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: raman_without_background的参数schema description: 执行无背景扣除的拉曼光谱测量函数。用于直接采集样品的拉曼光谱信号,不进行背景校正处理。该函数配置积分时间和激光功率参数,获取原始光谱数据用于后续的数据处理分析。适用于对光谱数据质量要求较高或需要自定义背景处理流程的测量场景。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -332,7 +306,7 @@ raman_home_made:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: raman_without_background_average的参数schema description: 执行多次平均的无背景拉曼光谱测量函数。通过多次测量取平均值来提高光谱数据的信噪比和测量精度,减少随机噪声影响。该函数支持自定义平均次数、积分时间、激光功率等参数,并可为样品指定名称便于数据管理。适用于对测量精度要求较高的定量分析和研究应用。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -367,10 +341,9 @@ raman_home_made:
result: result:
success: success success: success
schema: schema:
description: ROS Action SendCmd 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
status: status:
type: string type: string
@@ -379,7 +352,6 @@ raman_home_made:
title: SendCmd_Feedback title: SendCmd_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
command: command:
type: string type: string
@@ -388,7 +360,6 @@ raman_home_made:
title: SendCmd_Goal title: SendCmd_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -407,7 +378,7 @@ raman_home_made:
module: unilabos.devices.raman_uv.home_made_raman:RamanObj module: unilabos.devices.raman_uv.home_made_raman:RamanObj
status_types: {} status_types: {}
type: python type: python
description: Raman spectroscopy device description: 拉曼光谱分析设备用于物质的分子结构和化学成分表征。该设备集成激光器和CCD检测器通过串口通信控制激光功率和光谱采集。具备背景扣除、多次平均、自动数据处理等功能支持高精度的拉曼光谱测量。适用于材料表征、化学分析、质量控制、研究开发等需要分子指纹识别和结构分析的实验应用。
handles: [] handles: []
icon: '' icon: ''
init_param_schema: init_param_schema:
@@ -431,3 +402,4 @@ raman_home_made:
properties: {} properties: {}
required: [] required: []
type: object type: object
version: 0.0.1

View File

@@ -5,7 +5,7 @@ hotel.thermo_orbitor_rs2_hotel:
status_types: status_types:
rotation: String rotation: String
type: python type: python
description: Thermo Orbitor RS2 Hotel description: Thermo Orbitor RS2 Hotel容器设备用于实验室样品的存储和管理。该设备通过HotelContainer类实现容器的旋转控制和状态监控主要用于存储实验样品、试剂瓶或其他实验器具支持旋转功能以便于样品的自动化存取。适用于需要有序存储和快速访问大量样品的实验室自动化场景。
handles: [] handles: []
icon: '' icon: ''
init_param_schema: init_param_schema:
@@ -29,3 +29,4 @@ hotel.thermo_orbitor_rs2_hotel:
model: model:
mesh: thermo_orbitor_rs2_hotel mesh: thermo_orbitor_rs2_hotel
type: device type: device
version: 0.0.1

View File

@@ -15,16 +15,14 @@ laiyu_add_solid:
result: result:
actual_mass_mg: actual_mass_mg actual_mass_mg: actual_mass_mg
schema: schema:
description: ROS Action SolidDispenseAddPowderTube 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {} properties: {}
required: [] required: []
title: SolidDispenseAddPowderTube_Feedback title: SolidDispenseAddPowderTube_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
compound_mass: compound_mass:
type: number type: number
@@ -41,7 +39,6 @@ laiyu_add_solid:
title: SolidDispenseAddPowderTube_Goal title: SolidDispenseAddPowderTube_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
actual_mass_mg: actual_mass_mg:
type: number type: number
@@ -60,38 +57,6 @@ laiyu_add_solid:
title: SolidDispenseAddPowderTube title: SolidDispenseAddPowderTube
type: object type: object
type: SolidDispenseAddPowderTube type: SolidDispenseAddPowderTube
auto-add_powder_tube:
feedback: {}
goal: {}
goal_default:
compound_mass: null
powder_tube_number: null
target_tube_position: null
handles: []
result: {}
schema:
description: add_powder_tube的参数schema
properties:
feedback: {}
goal:
properties:
compound_mass:
type: string
powder_tube_number:
type: string
target_tube_position:
type: string
required:
- powder_tube_number
- target_tube_position
- compound_mass
type: object
result: {}
required:
- goal
title: add_powder_tube参数
type: object
type: UniLabJsonCommand
auto-calculate_crc: auto-calculate_crc:
feedback: {} feedback: {}
goal: {} goal: {}
@@ -100,7 +65,7 @@ laiyu_add_solid:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: calculate_crc的参数schema description: Modbus CRC-16校验码计算函数。计算Modbus RTU通信协议所需的CRC-16校验码确保数据传输的完整性和可靠性。该函数实现标准的CRC-16算法用于构造完整的Modbus指令帧。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -116,154 +81,6 @@ laiyu_add_solid:
title: calculate_crc参数 title: calculate_crc参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-discharge:
feedback: {}
goal: {}
goal_default:
float_in: null
handles: []
result: {}
schema:
description: discharge的参数schema
properties:
feedback: {}
goal:
properties:
float_in:
type: number
required:
- float_in
type: object
result: {}
required:
- goal
title: discharge参数
type: object
type: UniLabJsonCommand
auto-move_to_plate:
feedback: {}
goal: {}
goal_default:
string: null
handles: []
result: {}
schema:
description: move_to_plate的参数schema
properties:
feedback: {}
goal:
properties:
string:
type: string
required:
- string
type: object
result: {}
required:
- goal
title: move_to_plate参数
type: object
type: UniLabJsonCommand
auto-move_to_xyz:
feedback: {}
goal: {}
goal_default:
x: null
y: null
z: null
handles: []
result: {}
schema:
description: move_to_xyz的参数schema
properties:
feedback: {}
goal:
properties:
x:
type: number
y:
type: number
z:
type: number
required:
- x
- y
- z
type: object
result: {}
required:
- goal
title: move_to_xyz参数
type: object
type: UniLabJsonCommand
auto-pick_powder_tube:
feedback: {}
goal: {}
goal_default:
int_input: null
handles: []
result: {}
schema:
description: pick_powder_tube的参数schema
properties:
feedback: {}
goal:
properties:
int_input:
type: integer
required:
- int_input
type: object
result: {}
required:
- goal
title: pick_powder_tube参数
type: object
type: UniLabJsonCommand
auto-put_powder_tube:
feedback: {}
goal: {}
goal_default:
int_input: null
handles: []
result: {}
schema:
description: put_powder_tube的参数schema
properties:
feedback: {}
goal:
properties:
int_input:
type: integer
required:
- int_input
type: object
result: {}
required:
- goal
title: put_powder_tube参数
type: object
type: UniLabJsonCommand
auto-reset:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: reset的参数schema
properties:
feedback: {}
goal:
properties: {}
required: []
type: object
result: {}
required:
- goal
title: reset参数
type: object
type: UniLabJsonCommand
auto-send_command: auto-send_command:
feedback: {} feedback: {}
goal: {} goal: {}
@@ -272,7 +89,7 @@ laiyu_add_solid:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: send_command的参数schema description: Modbus指令发送函数。构造完整的Modbus RTU指令帧包含CRC校验发送给分装设备并等待响应。该函数处理底层通信协议确保指令的正确传输和响应接收支持最长3分钟的响应等待时间。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -297,16 +114,14 @@ laiyu_add_solid:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action FloatSingleInput 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {} properties: {}
required: [] required: []
title: FloatSingleInput_Feedback title: FloatSingleInput_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
float_in: float_in:
type: number type: number
@@ -315,7 +130,6 @@ laiyu_add_solid:
title: FloatSingleInput_Goal title: FloatSingleInput_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -340,16 +154,14 @@ laiyu_add_solid:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action StrSingleInput 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {} properties: {}
required: [] required: []
title: StrSingleInput_Feedback title: StrSingleInput_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
string: string:
type: string type: string
@@ -358,7 +170,6 @@ laiyu_add_solid:
title: StrSingleInput_Goal title: StrSingleInput_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -387,16 +198,14 @@ laiyu_add_solid:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action Point3DSeparateInput 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {} properties: {}
required: [] required: []
title: Point3DSeparateInput_Feedback title: Point3DSeparateInput_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
x: x:
type: number type: number
@@ -411,7 +220,6 @@ laiyu_add_solid:
title: Point3DSeparateInput_Goal title: Point3DSeparateInput_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -436,16 +244,14 @@ laiyu_add_solid:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action IntSingleInput 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {} properties: {}
required: [] required: []
title: IntSingleInput_Feedback title: IntSingleInput_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
int_input: int_input:
maximum: 2147483647 maximum: 2147483647
@@ -456,7 +262,6 @@ laiyu_add_solid:
title: IntSingleInput_Goal title: IntSingleInput_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -481,16 +286,14 @@ laiyu_add_solid:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action IntSingleInput 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {} properties: {}
required: [] required: []
title: IntSingleInput_Feedback title: IntSingleInput_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
int_input: int_input:
maximum: 2147483647 maximum: 2147483647
@@ -501,7 +304,6 @@ laiyu_add_solid:
title: IntSingleInput_Goal title: IntSingleInput_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -524,22 +326,19 @@ laiyu_add_solid:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action EmptyIn 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {} properties: {}
required: [] required: []
title: EmptyIn_Feedback title: EmptyIn_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: {} properties: {}
required: [] required: []
title: EmptyIn_Goal title: EmptyIn_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -556,7 +355,7 @@ laiyu_add_solid:
status_types: status_types:
status: str status: str
type: python type: python
description: Laiyu Add Solid description: 来渝固体粉末自动分装设备用于实验室化学试剂的精确称量和分装。该设备通过Modbus RTU协议与控制系统通信集成了精密天平、三轴运动平台、粉筒管理系统等组件。支持多种粉末试剂的自动拿取、精确称量、定点分装和归位操作。具备高精度称量、位置控制和批量处理能力适用于化学合成、药物研发、材料制备等需要精确固体试剂配制的实验室应用场景。
handles: [] handles: []
icon: '' icon: ''
init_param_schema: init_param_schema:
@@ -580,3 +379,4 @@ laiyu_add_solid:
required: required:
- status - status
type: object type: object
version: 0.0.1

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -117,30 +117,6 @@ moveit.arm_slider:
title: moveit_task参数 title: moveit_task参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-pick_and_place:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: pick_and_place的参数schema
properties:
feedback: {}
goal:
properties:
command:
type: string
required:
- command
type: object
result: {}
required:
- goal
title: pick_and_place参数
type: object
type: UniLabJsonCommand
auto-post_init: auto-post_init:
feedback: {} feedback: {}
goal: {} goal: {}
@@ -193,54 +169,6 @@ moveit.arm_slider:
title: resource_manager参数 title: resource_manager参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-set_position:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: set_position的参数schema
properties:
feedback: {}
goal:
properties:
command:
type: string
required:
- command
type: object
result: {}
required:
- goal
title: set_position参数
type: object
type: UniLabJsonCommand
auto-set_status:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: set_status的参数schema
properties:
feedback: {}
goal:
properties:
command:
type: string
required:
- command
type: object
result: {}
required:
- goal
title: set_status参数
type: object
type: UniLabJsonCommand
auto-wait_for_resource_action: auto-wait_for_resource_action:
feedback: {} feedback: {}
goal: {} goal: {}
@@ -270,10 +198,9 @@ moveit.arm_slider:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action SendCmd 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
status: status:
type: string type: string
@@ -282,7 +209,6 @@ moveit.arm_slider:
title: SendCmd_Feedback title: SendCmd_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
command: command:
type: string type: string
@@ -291,7 +217,6 @@ moveit.arm_slider:
title: SendCmd_Goal title: SendCmd_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -316,10 +241,9 @@ moveit.arm_slider:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action SendCmd 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
status: status:
type: string type: string
@@ -328,7 +252,6 @@ moveit.arm_slider:
title: SendCmd_Feedback title: SendCmd_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
command: command:
type: string type: string
@@ -337,7 +260,6 @@ moveit.arm_slider:
title: SendCmd_Goal title: SendCmd_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -362,10 +284,9 @@ moveit.arm_slider:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action SendCmd 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
status: status:
type: string type: string
@@ -374,7 +295,6 @@ moveit.arm_slider:
title: SendCmd_Feedback title: SendCmd_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
command: command:
type: string type: string
@@ -383,7 +303,6 @@ moveit.arm_slider:
title: SendCmd_Goal title: SendCmd_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -402,7 +321,7 @@ moveit.arm_slider:
module: unilabos.devices.ros_dev.moveit_interface:MoveitInterface module: unilabos.devices.ros_dev.moveit_interface:MoveitInterface
status_types: {} status_types: {}
type: python type: python
description: Arm with Slider description: 机械臂与滑块运动系统基于MoveIt2运动规划框架的多自由度机械臂控制设备。该系统集成机械臂和线性滑块通过ROS2和MoveIt2实现精确的轨迹规划和协调运动控制。支持笛卡尔空间和关节空间的运动规划、碰撞检测、逆运动学求解等功能。适用于复杂的pick-and-place操作、精密装配、多工位协作等需要高精度多轴协调运动的实验室自动化应用。
handles: [] handles: []
icon: '' icon: ''
init_param_schema: init_param_schema:
@@ -427,6 +346,7 @@ moveit.arm_slider:
model: model:
mesh: arm_slider mesh: arm_slider
type: device type: device
version: 0.0.1
moveit.toyo_xyz: moveit.toyo_xyz:
class: class:
action_value_mappings: action_value_mappings:
@@ -546,30 +466,6 @@ moveit.toyo_xyz:
title: moveit_task参数 title: moveit_task参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-pick_and_place:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: pick_and_place的参数schema
properties:
feedback: {}
goal:
properties:
command:
type: string
required:
- command
type: object
result: {}
required:
- goal
title: pick_and_place参数
type: object
type: UniLabJsonCommand
auto-post_init: auto-post_init:
feedback: {} feedback: {}
goal: {} goal: {}
@@ -622,54 +518,6 @@ moveit.toyo_xyz:
title: resource_manager参数 title: resource_manager参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-set_position:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: set_position的参数schema
properties:
feedback: {}
goal:
properties:
command:
type: string
required:
- command
type: object
result: {}
required:
- goal
title: set_position参数
type: object
type: UniLabJsonCommand
auto-set_status:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: set_status的参数schema
properties:
feedback: {}
goal:
properties:
command:
type: string
required:
- command
type: object
result: {}
required:
- goal
title: set_status参数
type: object
type: UniLabJsonCommand
auto-wait_for_resource_action: auto-wait_for_resource_action:
feedback: {} feedback: {}
goal: {} goal: {}
@@ -699,10 +547,9 @@ moveit.toyo_xyz:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action SendCmd 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
status: status:
type: string type: string
@@ -711,7 +558,6 @@ moveit.toyo_xyz:
title: SendCmd_Feedback title: SendCmd_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
command: command:
type: string type: string
@@ -720,7 +566,6 @@ moveit.toyo_xyz:
title: SendCmd_Goal title: SendCmd_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -745,10 +590,9 @@ moveit.toyo_xyz:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action SendCmd 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
status: status:
type: string type: string
@@ -757,7 +601,6 @@ moveit.toyo_xyz:
title: SendCmd_Feedback title: SendCmd_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
command: command:
type: string type: string
@@ -766,7 +609,6 @@ moveit.toyo_xyz:
title: SendCmd_Goal title: SendCmd_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -791,10 +633,9 @@ moveit.toyo_xyz:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action SendCmd 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
status: status:
type: string type: string
@@ -803,7 +644,6 @@ moveit.toyo_xyz:
title: SendCmd_Feedback title: SendCmd_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
command: command:
type: string type: string
@@ -812,7 +652,6 @@ moveit.toyo_xyz:
title: SendCmd_Goal title: SendCmd_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -831,7 +670,7 @@ moveit.toyo_xyz:
module: unilabos.devices.ros_dev.moveit_interface:MoveitInterface module: unilabos.devices.ros_dev.moveit_interface:MoveitInterface
status_types: {} status_types: {}
type: python type: python
description: Toyo XYZ description: 东洋XYZ三轴运动平台基于MoveIt2运动规划框架的精密定位设备。该设备通过ROS2和MoveIt2实现三维空间的精确运动控制支持复杂轨迹规划、多点定位、速度控制等功能。具备高精度定位、平稳运动、实时轨迹监控等特性。适用于精密加工、样品定位、检测扫描、自动化装配等需要高精度三维运动控制的实验室和工业应用场景。
handles: [] handles: []
icon: '' icon: ''
init_param_schema: init_param_schema:
@@ -856,3 +695,4 @@ moveit.toyo_xyz:
model: model:
mesh: toyo_xyz mesh: toyo_xyz
type: device type: device
version: 0.0.1

View File

@@ -93,30 +93,6 @@ rotavap.one:
title: set_rotate_time参数 title: set_rotate_time参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-set_timer:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: set_timer的参数schema
properties:
feedback: {}
goal:
properties:
command:
type: string
required:
- command
type: object
result: {}
required:
- goal
title: set_timer参数
type: object
type: UniLabJsonCommand
set_timer: set_timer:
feedback: {} feedback: {}
goal: goal:
@@ -127,10 +103,9 @@ rotavap.one:
result: result:
success: success success: success
schema: schema:
description: ROS Action SendCmd 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
status: status:
type: string type: string
@@ -139,7 +114,6 @@ rotavap.one:
title: SendCmd_Feedback title: SendCmd_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
command: command:
type: string type: string
@@ -148,7 +122,6 @@ rotavap.one:
title: SendCmd_Goal title: SendCmd_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -167,7 +140,7 @@ rotavap.one:
module: unilabos.devices.rotavap.rotavap_one:RotavapOne module: unilabos.devices.rotavap.rotavap_one:RotavapOne
status_types: {} status_types: {}
type: python type: python
description: Rotavap device description: 旋转蒸发仪设备,用于有机化学实验中的溶剂回收和浓缩操作。该设备通过串口通信控制,集成旋转和真空泵功能,支持定时控制和自动化操作。具备旋转速度调节、真空度控制、温度管理等功能,实现高效的溶剂蒸发和回收。适用于有机合成、天然产物提取、药物制备等需要溶剂去除和浓缩的实验室应用场景。
handles: [] handles: []
icon: '' icon: ''
init_param_schema: init_param_schema:
@@ -185,6 +158,7 @@ rotavap.one:
properties: {} properties: {}
required: [] required: []
type: object type: object
version: 0.0.1
separator.homemade: separator.homemade:
class: class:
action_value_mappings: action_value_mappings:
@@ -208,38 +182,6 @@ separator.homemade:
title: read_sensor_loop参数 title: read_sensor_loop参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-stir:
feedback: {}
goal: {}
goal_default:
settling_time: 10
stir_speed: 300
stir_time: 10
handles: []
result: {}
schema:
description: stir的参数schema
properties:
feedback: {}
goal:
properties:
settling_time:
default: 10
type: number
stir_speed:
default: 300
type: number
stir_time:
default: 10
type: number
required: []
type: object
result: {}
required:
- goal
title: stir参数
type: object
type: UniLabJsonCommand
auto-valve_open: auto-valve_open:
feedback: {} feedback: {}
goal: {} goal: {}
@@ -268,30 +210,6 @@ separator.homemade:
title: valve_open参数 title: valve_open参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-valve_open_cmd:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: valve_open_cmd的参数schema
properties:
feedback: {}
goal:
properties:
command:
type: string
required:
- command
type: object
result: {}
required:
- goal
title: valve_open_cmd参数
type: object
type: UniLabJsonCommand
auto-write: auto-write:
feedback: {} feedback: {}
goal: {} goal: {}
@@ -335,10 +253,9 @@ separator.homemade:
result: result:
success: success success: success
schema: schema:
description: ROS Action Stir 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
status: status:
type: string type: string
@@ -347,7 +264,6 @@ separator.homemade:
title: Stir_Feedback title: Stir_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
event: event:
type: string type: string
@@ -374,7 +290,6 @@ separator.homemade:
title: Stir_Goal title: Stir_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
message: message:
type: string type: string
@@ -401,13 +316,12 @@ separator.homemade:
goal_default: goal_default:
command: '' command: ''
handles: [] handles: []
result": result:
success: success success: success
schema: schema:
description: ROS Action SendCmd 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
status: status:
type: string type: string
@@ -416,7 +330,6 @@ separator.homemade:
title: SendCmd_Feedback title: SendCmd_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
command: command:
type: string type: string
@@ -425,7 +338,6 @@ separator.homemade:
title: SendCmd_Goal title: SendCmd_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -444,7 +356,7 @@ separator.homemade:
module: unilabos.devices.separator.homemade_grbl_conductivity:SeparatorController module: unilabos.devices.separator.homemade_grbl_conductivity:SeparatorController
status_types: {} status_types: {}
type: python type: python
description: Separator device with homemade grbl controller description: 液-液分离器设备基于自制Grbl控制器的自动化分离系统。该设备集成搅拌、沉降、阀门控制和电导率传感器通过串口通信实现精确的分离操作控制。支持自动搅拌、分层沉降、基于传感器反馈的智能分液等功能。适用于有机化学中的萃取分离、相分离、液-液提取等需要精确分离控制的实验应用。
handles: [] handles: []
icon: '' icon: ''
init_param_schema: init_param_schema:
@@ -468,3 +380,4 @@ separator.homemade:
properties: {} properties: {}
required: [] required: []
type: object type: object
version: 0.0.1

View File

@@ -125,30 +125,6 @@ solenoid_valve:
title: send_command参数 title: send_command参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-set_valve_position:
feedback: {}
goal: {}
goal_default:
position: null
handles: []
result: {}
schema:
description: set_valve_position的参数schema
properties:
feedback: {}
goal:
properties:
position:
type: string
required:
- position
type: object
result: {}
required:
- goal
title: set_valve_position参数
type: object
type: UniLabJsonCommand
set_valve_position: set_valve_position:
feedback: {} feedback: {}
goal: goal:
@@ -158,16 +134,14 @@ solenoid_valve:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action StrSingleInput 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {} properties: {}
required: [] required: []
title: StrSingleInput_Feedback title: StrSingleInput_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
string: string:
type: string type: string
@@ -176,7 +150,6 @@ solenoid_valve:
title: StrSingleInput_Goal title: StrSingleInput_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -197,7 +170,7 @@ solenoid_valve:
status: str status: str
valve_position: str valve_position: str
type: python type: python
description: Solenoid valve description: 电磁阀控制设备,用于精确的流体路径控制和开关操作。该设备通过串口通信控制电磁阀的开关状态,支持远程操作和状态监测。具备快速响应、可靠密封、状态反馈等特性,广泛应用于流体输送、样品进样、路径切换等需要精确流体控制的实验室自动化应用。
handles: [] handles: []
icon: '' icon: ''
init_param_schema: init_param_schema:
@@ -218,29 +191,10 @@ solenoid_valve:
- status - status
- valve_position - valve_position
type: object type: object
version: 0.0.1
solenoid_valve.mock: solenoid_valve.mock:
class: class:
action_value_mappings: action_value_mappings:
auto-close:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: close的参数schema
properties:
feedback: {}
goal:
properties: {}
required: []
type: object
result: {}
required:
- goal
title: close参数
type: object
type: UniLabJsonCommand
auto-is_closed: auto-is_closed:
feedback: {} feedback: {}
goal: {} goal: {}
@@ -281,26 +235,6 @@ solenoid_valve.mock:
title: is_open参数 title: is_open参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-open:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: open的参数schema
properties:
feedback: {}
goal:
properties: {}
required: []
type: object
result: {}
required:
- goal
title: open参数
type: object
type: UniLabJsonCommand
auto-set_valve_position: auto-set_valve_position:
feedback: {} feedback: {}
goal: {} goal: {}
@@ -332,22 +266,19 @@ solenoid_valve.mock:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action EmptyIn 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {} properties: {}
required: [] required: []
title: EmptyIn_Feedback title: EmptyIn_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: {} properties: {}
required: [] required: []
title: EmptyIn_Goal title: EmptyIn_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -367,22 +298,19 @@ solenoid_valve.mock:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action EmptyIn 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {} properties: {}
required: [] required: []
title: EmptyIn_Feedback title: EmptyIn_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: {} properties: {}
required: [] required: []
title: EmptyIn_Goal title: EmptyIn_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -400,7 +328,7 @@ solenoid_valve.mock:
status: str status: str
valve_position: str valve_position: str
type: python type: python
description: Mock solenoid valve description: 模拟电磁阀设备,用于系统测试和开发调试。该设备模拟真实电磁阀的开关操作和状态变化,提供与实际设备相同的控制接口和反馈机制。支持流体路径的虚拟控制,便于在没有实际硬件的情况下进行流体系统的集成测试和算法验证。适用于系统开发、流程调试和培训演示等场景。
handles: handles:
- data_type: fluid - data_type: fluid
handler_key: in handler_key: in
@@ -431,6 +359,7 @@ solenoid_valve.mock:
- status - status
- valve_position - valve_position
type: object type: object
version: 0.0.1
syringe_pump_with_valve.runze: syringe_pump_with_valve.runze:
class: class:
action_value_mappings: action_value_mappings:
@@ -825,7 +754,7 @@ syringe_pump_with_valve.runze:
velocity_grade: String velocity_grade: String
velocity_init: String velocity_init: String
type: python type: python
description: Runze Syringe pump with valve description: 润泽精密注射泵设备,集成阀门控制的高精度流体输送系统。该设备通过串口通信控制,支持多种运行模式和精确的体积控制。具备可变速度控制、精密定位、阀门切换、实时状态监控等功能。适用于微量液体输送、精密进样、流速控制、化学反应进料等需要高精度流体操作的实验室自动化应用。
handles: [] handles: []
icon: '' icon: ''
init_param_schema: init_param_schema:
@@ -875,3 +804,4 @@ syringe_pump_with_valve.runze:
- position - position
- plunger_position - plunger_position
type: object type: object
version: 0.0.1

View File

@@ -11,7 +11,7 @@ agv.SEER:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: send的参数schema description: AGV底层通信命令发送函数。通过TCP socket连接向AGV发送底层控制命令支持pose位置、status状态、nav导航等命令类型。用于获取AGV当前位置坐标、运行状态或发送导航指令。该函数封装了AGV的通信协议将命令转换为十六进制数据包并处理响应解析。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -33,30 +33,6 @@ agv.SEER:
title: send参数 title: send参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-send_nav_task:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: send_nav_task的参数schema
properties:
feedback: {}
goal:
properties:
command:
type: string
required:
- command
type: object
result: {}
required:
- goal
title: send_nav_task参数
type: object
type: UniLabJsonCommand
send_nav_task: send_nav_task:
feedback: {} feedback: {}
goal: goal:
@@ -67,10 +43,9 @@ agv.SEER:
result: result:
success: success success: success
schema: schema:
description: ROS Action SendCmd 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
status: status:
type: string type: string
@@ -79,7 +54,6 @@ agv.SEER:
title: SendCmd_Feedback title: SendCmd_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
command: command:
type: string type: string
@@ -88,7 +62,6 @@ agv.SEER:
title: SendCmd_Goal title: SendCmd_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -109,7 +82,7 @@ agv.SEER:
pose: list pose: list
status: str status: str
type: python type: python
description: SEER AGV description: SEER AGV自动导引车设备用于实验室内物料和设备的自主移动运输。该AGV通过TCP socket与导航系统通信具备精确的定位和路径规划能力。支持实时位置监控、状态查询和导航任务执行可在预设的实验室环境中自主移动至指定位置。适用于样品运输、设备转移、多工位协作等实验室自动化物流场景。
handles: [] handles: []
icon: '' icon: ''
init_param_schema: init_param_schema:
@@ -130,3 +103,4 @@ agv.SEER:
- pose - pose
- status - status
type: object type: object
version: 0.0.1

View File

@@ -8,7 +8,7 @@ robotic_arm.UR:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: arm_init的参数schema description: 机械臂初始化函数。执行UR机械臂的完整初始化流程包括上电、释放制动器、解除保护停止状态等。该函数确保机械臂从安全停止状态恢复到可操作状态是机械臂使用前的必要步骤。初始化完成后机械臂将处于就绪状态可以接收后续的运动指令。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -29,7 +29,7 @@ robotic_arm.UR:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: load_pose_data的参数schema description: 从JSON字符串加载位置数据函数。接收包含机械臂位置信息的JSON格式字符串解析并存储位置数据供后续运动任务使用。位置数据通常包含多个预定义的工作位置坐标用于实现精确的多点运动控制。适用于动态配置机械臂工作位置的场景。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -53,7 +53,7 @@ robotic_arm.UR:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: load_pose_file的参数schema description: 从文件加载位置数据函数。读取指定的JSON文件并加载其中的机械臂位置信息。该函数支持从外部配置文件中获取预设的工作位置便于位置数据的管理和重用。适用于需要从固定配置文件中读取复杂位置序列的应用场景。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -69,30 +69,6 @@ robotic_arm.UR:
title: load_pose_file参数 title: load_pose_file参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-move_pos_task:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: move_pos_task的参数schema
properties:
feedback: {}
goal:
properties:
command:
type: string
required:
- command
type: object
result: {}
required:
- goal
title: move_pos_task参数
type: object
type: UniLabJsonCommand
auto-reload_pose: auto-reload_pose:
feedback: {} feedback: {}
goal: {} goal: {}
@@ -100,7 +76,7 @@ robotic_arm.UR:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: reload_pose的参数schema description: 重新加载位置数据函数。重新读取并解析之前设置的位置文件,更新内存中的位置数据。该函数用于在位置文件被修改后刷新机械臂的位置配置,无需重新初始化整个系统。适用于动态更新机械臂工作位置的场景。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -123,10 +99,9 @@ robotic_arm.UR:
result: result:
success: success success: success
schema: schema:
description: ROS Action SendCmd 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
status: status:
type: string type: string
@@ -135,7 +110,6 @@ robotic_arm.UR:
title: SendCmd_Feedback title: SendCmd_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
command: command:
type: string type: string
@@ -144,7 +118,6 @@ robotic_arm.UR:
title: SendCmd_Goal title: SendCmd_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -167,7 +140,7 @@ robotic_arm.UR:
gripper_pose: float gripper_pose: float
gripper_status: str gripper_status: str
type: python type: python
description: UR robotic arm description: Universal Robots机械臂设备用于实验室精密操作和自动化作业。该设备集成了UR机械臂本体、Robotiq夹爪和RTDE通信接口支持六自由度精确运动控制和力觉反馈。具备实时位置监控、状态反馈、轨迹规划等功能可执行复杂的多点位运动任务。适用于样品抓取、精密装配、实验器具操作等需要高精度和高重复性的实验室自动化场景。
handles: [] handles: []
icon: '' icon: ''
init_param_schema: init_param_schema:
@@ -197,3 +170,4 @@ robotic_arm.UR:
- arm_status - arm_status
- gripper_status - gripper_status
type: object type: object
version: 0.0.1

View File

@@ -51,7 +51,7 @@ gripper.misumi_rz:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: gripper_move的参数schema description: 夹爪抓取运动控制函数。控制夹爪的开合运动,支持位置、速度、力矩的精确设定。位置参数控制夹爪开合程度,速度参数控制运动快慢,力矩参数控制夹持强度。该函数提供安全的力控制,避免损坏被抓取物体,适用于各种形状和材质的物品抓取。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -80,7 +80,7 @@ gripper.misumi_rz:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: init_gripper的参数schema description: 夹爪初始化函数。执行Misumi RZ夹爪的完整初始化流程包括Modbus通信建立、电机参数配置、传感器校准等。该函数确保夹爪系统从安全状态恢复到可操作状态是夹爪使用前的必要步骤。初始化完成后夹爪将处于就绪状态可接收抓取和旋转指令。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -169,7 +169,7 @@ gripper.misumi_rz:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: node_gripper_move的参数schema description: 节点夹爪移动任务函数。接收逗号分隔的命令字符串,解析位置、速度、力矩参数并执行夹爪抓取动作。该函数等待运动完成并返回执行结果,提供同步的运动控制接口。适用于需要可靠完成确认的精密抓取操作。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -193,7 +193,7 @@ gripper.misumi_rz:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: node_rotate_move的参数schema description: 节点旋转移动任务函数。接收逗号分隔的命令字符串,解析角度、速度、力矩参数并执行夹爪旋转动作。该函数等待旋转完成并返回执行结果,提供同步的旋转控制接口。适用于需要精确角度定位和完成确认的旋转操作。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -251,7 +251,7 @@ gripper.misumi_rz:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: rotate_move_abs的参数schema description: 夹爪绝对位置旋转控制函数。控制夹爪主轴旋转到指定的绝对角度位置支持360度连续旋转。位置参数指定目标角度速度参数控制旋转速率力矩参数设定旋转阻力限制。该函数提供高精度的角度定位适用于需要精确方向控制的操作场景。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -379,10 +379,9 @@ gripper.misumi_rz:
result: result:
success: success success: success
schema: schema:
description: ROS Action SendCmd 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
status: status:
type: string type: string
@@ -391,7 +390,6 @@ gripper.misumi_rz:
title: SendCmd_Feedback title: SendCmd_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
command: command:
type: string type: string
@@ -400,7 +398,6 @@ gripper.misumi_rz:
title: SendCmd_Goal title: SendCmd_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -420,7 +417,7 @@ gripper.misumi_rz:
status_types: status_types:
status: str status: str
type: python type: python
description: Misumi RZ gripper description: Misumi RZ系列电子夹爪设备集成旋转和抓取双重功能的精密夹爪系统。该设备通过Modbus RTU协议与控制系统通信支持位置、速度、力矩的精确控制。具备高精度的位置反馈、实时状态监控和故障检测功能。适用于需要精密抓取和旋转操作的实验室自动化场景如样品管理、精密装配、器件操作等应用。
handles: [] handles: []
icon: '' icon: ''
init_param_schema: init_param_schema:
@@ -447,6 +444,7 @@ gripper.misumi_rz:
required: required:
- status - status
type: object type: object
version: 0.0.1
gripper.mock: gripper.mock:
class: class:
action_value_mappings: action_value_mappings:
@@ -461,7 +459,7 @@ gripper.mock:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: edit_id的参数schema description: 模拟夹爪资源ID编辑函数。用于测试和演示资源管理功能模拟修改夹爪资源的标识信息。该函数接收工作流名称、参数和资源对象模拟真实的资源更新过程并返回修改后的资源信息。适用于系统测试和开发调试场景。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -484,38 +482,6 @@ gripper.mock:
title: edit_id参数 title: edit_id参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-push_to:
feedback: {}
goal: {}
goal_default:
position: null
torque: null
velocity: 0.0
handles: []
result: {}
schema:
description: push_to的参数schema
properties:
feedback: {}
goal:
properties:
position:
type: number
torque:
type: number
velocity:
default: 0.0
type: number
required:
- position
- torque
type: object
result: {}
required:
- goal
title: push_to参数
type: object
type: UniLabJsonCommand
push_to: push_to:
feedback: feedback:
effort: torque effort: torque
@@ -532,10 +498,9 @@ gripper.mock:
effort: torque effort: torque
position: position position: position
schema: schema:
description: ROS Action GripperCommand 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
effort: effort:
type: number type: number
@@ -553,7 +518,6 @@ gripper.mock:
title: GripperCommand_Feedback title: GripperCommand_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
command: command:
properties: properties:
@@ -571,7 +535,6 @@ gripper.mock:
title: GripperCommand_Goal title: GripperCommand_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
effort: effort:
type: number type: number
@@ -600,7 +563,7 @@ gripper.mock:
torque: float torque: float
velocity: float velocity: float
type: python type: python
description: Mock gripper description: 模拟夹爪设备,用于系统测试和开发调试。该设备模拟真实夹爪的位置、速度、力矩等物理特性,支持虚拟的抓取和移动操作。提供与真实夹爪相同的接口和状态反馈,便于在没有实际硬件的情况下进行系统集成测试和算法验证。适用于软件开发、系统调试和培训演示等场景。
handles: [] handles: []
icon: '' icon: ''
init_param_schema: init_param_schema:
@@ -624,3 +587,4 @@ gripper.mock:
- torque - torque
- status - status
type: object type: object
version: 0.0.1

View File

@@ -8,7 +8,7 @@ linear_motion.grbl:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: initialize的参数schema description: CNC设备初始化函数。执行Grbl CNC的完整初始化流程包括归零操作、轴校准和状态复位。该函数将所有轴移动到原点位置(0,0,0),确保设备处于已知的参考状态。初始化完成后设备进入空闲状态,可接收后续的运动指令。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -21,30 +21,6 @@ linear_motion.grbl:
title: initialize参数 title: initialize参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-move_through_points:
feedback: {}
goal: {}
goal_default:
positions: null
handles: []
result: {}
schema:
description: move_through_points的参数schema
properties:
feedback: {}
goal:
properties:
positions:
type: array
required:
- positions
type: object
result: {}
required:
- goal
title: move_through_points参数
type: object
type: UniLabJsonCommand
auto-set_position: auto-set_position:
feedback: {} feedback: {}
goal: {} goal: {}
@@ -53,7 +29,7 @@ linear_motion.grbl:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: set_position的参数schema description: CNC绝对位置设定函数。控制CNC设备移动到指定的三维坐标位置(x,y,z)。该函数支持安全限位检查,防止超出设备工作范围。移动过程中会监控设备状态,确保安全到达目标位置。适用于精确定位和轨迹控制操作。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -69,34 +45,6 @@ linear_motion.grbl:
title: set_position参数 title: set_position参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-set_spindle_speed:
feedback: {}
goal: {}
goal_default:
max_velocity: 500
spindle_speed: null
handles: []
result: {}
schema:
description: set_spindle_speed的参数schema
properties:
feedback: {}
goal:
properties:
max_velocity:
default: 500
type: number
spindle_speed:
type: number
required:
- spindle_speed
type: object
result: {}
required:
- goal
title: set_spindle_speed参数
type: object
type: UniLabJsonCommand
auto-stop_operation: auto-stop_operation:
feedback: {} feedback: {}
goal: {} goal: {}
@@ -104,7 +52,7 @@ linear_motion.grbl:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: stop_operation的参数schema description: CNC操作停止函数。立即停止当前正在执行的所有CNC运动包括轴移动和主轴旋转。该函数用于紧急停止或任务中断确保设备和工件的安全。停止后设备将保持当前位置等待新的指令。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -166,10 +114,9 @@ linear_motion.grbl:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action NavigateThroughPoses 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
current_pose: current_pose:
properties: properties:
@@ -290,7 +237,6 @@ linear_motion.grbl:
title: NavigateThroughPoses_Feedback title: NavigateThroughPoses_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
behavior_tree: behavior_tree:
type: string type: string
@@ -371,7 +317,6 @@ linear_motion.grbl:
title: NavigateThroughPoses_Goal title: NavigateThroughPoses_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
result: result:
properties: {} properties: {}
@@ -401,10 +346,9 @@ linear_motion.grbl:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action SingleJointPosition 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
error: error:
type: number type: number
@@ -444,7 +388,6 @@ linear_motion.grbl:
title: SingleJointPosition_Feedback title: SingleJointPosition_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
max_velocity: max_velocity:
type: number type: number
@@ -472,7 +415,6 @@ linear_motion.grbl:
title: SingleJointPosition_Goal title: SingleJointPosition_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: {} properties: {}
required: [] required: []
title: SingleJointPosition_Result title: SingleJointPosition_Result
@@ -488,7 +430,7 @@ linear_motion.grbl:
spindle_speed: float spindle_speed: float
status: str status: str
type: python type: python
description: Grbl CNC description: Grbl数控机床CNC设备用于实验室精密加工和三轴定位操作。该设备基于Grbl固件通过串口通信控制步进电机实现X、Y、Z三轴的精确运动。支持绝对定位、轨迹规划、主轴控制和实时状态监控。具备安全限位保护和运动平滑控制功能。适用于精密钻孔、铣削、雕刻、样品制备等需要高精度定位和加工的实验室应用场景。
handles: [] handles: []
icon: '' icon: ''
init_param_schema: init_param_schema:
@@ -524,6 +466,7 @@ linear_motion.grbl:
- position - position
- spindle_speed - spindle_speed
type: object type: object
version: 0.0.1
motor.iCL42: motor.iCL42:
class: class:
action_value_mappings: action_value_mappings:
@@ -537,7 +480,7 @@ motor.iCL42:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: execute_run_motor的参数schema description: 步进电机执行运动函数。直接执行电机运动命令,包括位置设定、速度控制和路径规划。该函数处理底层的电机控制协议,消除警告信息,设置运动参数并启动电机运行。适用于需要直接控制电机运动的应用场景。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -566,7 +509,7 @@ motor.iCL42:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: init_device的参数schema description: iCL42电机设备初始化函数。建立与iCL42步进电机驱动器的串口通信连接配置通信参数包括波特率、数据位、校验位等。该函数是电机使用前的必要步骤确保驱动器处于可控状态并准备接收运动指令。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -589,7 +532,7 @@ motor.iCL42:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: run_motor的参数schema description: 步进电机运动控制函数。根据指定的运动模式、目标位置和速度参数控制电机运动。支持多种运动模式和精确的位置控制,自动处理运动轨迹规划和执行。该函数提供异步执行和状态反馈,确保运动的准确性和可靠性。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -621,10 +564,9 @@ motor.iCL42:
result: result:
success: success success: success
schema: schema:
description: ROS Action SendCmd 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
status: status:
type: string type: string
@@ -633,7 +575,6 @@ motor.iCL42:
title: SendCmd_Feedback title: SendCmd_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
command: command:
type: string type: string
@@ -642,7 +583,6 @@ motor.iCL42:
title: SendCmd_Goal title: SendCmd_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -664,7 +604,7 @@ motor.iCL42:
motor_position: int motor_position: int
success: bool success: bool
type: python type: python
description: iCL42 motor description: iCL42步进电机驱动器用于实验室设备的精密线性运动控制。该设备通过串口通信控制iCL42型步进电机驱动器支持多种运动模式和精确的位置、速度控制。具备位置反馈、运行状态监控和故障检测功能。适用于自动进样器、样品传送、精密定位平台等需要准确线性运动控制的实验室自动化设备。
handles: [] handles: []
icon: '' icon: ''
init_param_schema: init_param_schema:
@@ -691,3 +631,4 @@ motor.iCL42:
- is_executing_run - is_executing_run
- success - success
type: object type: object
version: 0.0.1

View File

@@ -285,7 +285,7 @@ lh_joint_publisher:
module: unilabos.devices.ros_dev.liquid_handler_joint_publisher:LiquidHandlerJointPublisher module: unilabos.devices.ros_dev.liquid_handler_joint_publisher:LiquidHandlerJointPublisher
status_types: {} status_types: {}
type: ros2 type: ros2
description: '' description: 液体处理器关节发布器用于ROS2仿真系统中的液体处理设备运动控制。该节点通过发布关节状态驱动仿真模型中的机械臂运动支持三维坐标到关节空间的逆运动学转换、多关节协调控制、资源跟踪和TF变换。具备精确的位置控制、速度调节、pick-and-place操作等功能。适用于液体处理系统的虚拟仿真、运动规划验证、系统集成测试等应用场景。
handles: [] handles: []
icon: '' icon: ''
init_param_schema: init_param_schema:
@@ -309,3 +309,4 @@ lh_joint_publisher:
properties: {} properties: {}
required: [] required: []
type: object type: object
version: 0.0.1

View File

@@ -89,30 +89,6 @@ chiller:
title: modbus_crc参数 title: modbus_crc参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-set_temperature:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: set_temperature的参数schema
properties:
feedback: {}
goal:
properties:
command:
type: string
required:
- command
type: object
result: {}
required:
- goal
title: set_temperature参数
type: object
type: UniLabJsonCommand
auto-stop: auto-stop:
feedback: {} feedback: {}
goal: {} goal: {}
@@ -143,10 +119,9 @@ chiller:
result: result:
success: success success: success
schema: schema:
description: ROS Action SendCmd 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
status: status:
type: string type: string
@@ -155,7 +130,6 @@ chiller:
title: SendCmd_Feedback title: SendCmd_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
command: command:
type: string type: string
@@ -164,7 +138,6 @@ chiller:
title: SendCmd_Goal title: SendCmd_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -183,7 +156,7 @@ chiller:
module: unilabos.devices.temperature.chiller:Chiller module: unilabos.devices.temperature.chiller:Chiller
status_types: {} status_types: {}
type: python type: python
description: Chiller description: 实验室制冷设备用于精确的温度控制和冷却操作。该设备通过Modbus RTU协议与控制系统通信支持精确的温度设定和监控。具备快速降温、恒温控制和温度保持功能广泛应用于需要低温环境的化学反应、样品保存、结晶操作等实验场景。提供稳定可靠的冷却性能确保实验过程的温度精度。
handles: [] handles: []
icon: '' icon: ''
init_param_schema: init_param_schema:
@@ -201,6 +174,7 @@ chiller:
properties: {} properties: {}
required: [] required: []
type: object type: object
version: 0.0.1
heaterstirrer.dalong: heaterstirrer.dalong:
class: class:
action_value_mappings: action_value_mappings:
@@ -224,50 +198,6 @@ heaterstirrer.dalong:
title: close参数 title: close参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-heatchill:
feedback: {}
goal: {}
goal_default:
purpose: reaction
stir: true
stir_speed: 300
temp: null
time: 3600
vessel: null
handles: []
result: {}
schema:
description: heatchill的参数schema
properties:
feedback: {}
goal:
properties:
purpose:
default: reaction
type: string
stir:
default: true
type: boolean
stir_speed:
default: 300
type: number
temp:
type: number
time:
default: 3600
type: number
vessel:
type: string
required:
- vessel
- temp
type: object
result: {}
required:
- goal
title: heatchill参数
type: object
type: UniLabJsonCommand
auto-set_stir_speed: auto-set_stir_speed:
feedback: {} feedback: {}
goal: {} goal: {}
@@ -320,54 +250,6 @@ heaterstirrer.dalong:
title: set_temp_inner参数 title: set_temp_inner参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-set_temp_target:
feedback: {}
goal: {}
goal_default:
temp: null
handles: []
result: {}
schema:
description: set_temp_target的参数schema
properties:
feedback: {}
goal:
properties:
temp:
type: string
required:
- temp
type: object
result: {}
required:
- goal
title: set_temp_target参数
type: object
type: UniLabJsonCommand
auto-set_temp_warning:
feedback: {}
goal: {}
goal_default:
temp: null
handles: []
result: {}
schema:
description: set_temp_warning的参数schema
properties:
feedback: {}
goal:
properties:
temp:
type: string
required:
- temp
type: object
result: {}
required:
- goal
title: set_temp_warning参数
type: object
type: UniLabJsonCommand
heatchill: heatchill:
feedback: feedback:
status: status status: status
@@ -391,10 +273,9 @@ heaterstirrer.dalong:
result: result:
success: success success: success
schema: schema:
description: ROS Action HeatChill 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
status: status:
type: string type: string
@@ -403,7 +284,6 @@ heaterstirrer.dalong:
title: HeatChill_Feedback title: HeatChill_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
pressure: pressure:
type: string type: string
@@ -439,7 +319,6 @@ heaterstirrer.dalong:
title: HeatChill_Goal title: HeatChill_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
message: message:
type: string type: string
@@ -468,10 +347,9 @@ heaterstirrer.dalong:
result: result:
success: success success: success
schema: schema:
description: ROS Action SendCmd 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
status: status:
type: string type: string
@@ -480,7 +358,6 @@ heaterstirrer.dalong:
title: SendCmd_Feedback title: SendCmd_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
command: command:
type: string type: string
@@ -489,7 +366,6 @@ heaterstirrer.dalong:
title: SendCmd_Goal title: SendCmd_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -515,10 +391,9 @@ heaterstirrer.dalong:
result: result:
success: success success: success
schema: schema:
description: ROS Action SendCmd 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
status: status:
type: string type: string
@@ -527,7 +402,6 @@ heaterstirrer.dalong:
title: SendCmd_Feedback title: SendCmd_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
command: command:
type: string type: string
@@ -536,7 +410,6 @@ heaterstirrer.dalong:
title: SendCmd_Goal title: SendCmd_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -560,7 +433,7 @@ heaterstirrer.dalong:
temp_target: float temp_target: float
temp_warning: float temp_warning: float
type: python type: python
description: DaLong heater stirrer description: 大龙加热搅拌器,集成加热和搅拌双重功能的实验室设备。该设备通过串口通信控制,支持精确的温度调节、搅拌速度控制和安全保护功能。具备实时温度监测、目标温度设定、安全温度报警等特性。适用于化学合成、样品制备、反应控制等需要同时进行加热和搅拌的实验操作,提供稳定均匀的反应环境。
handles: [] handles: []
icon: '' icon: ''
init_param_schema: init_param_schema:
@@ -596,6 +469,7 @@ heaterstirrer.dalong:
- temp_warning - temp_warning
- temp_target - temp_target
type: object type: object
version: 0.0.1
tempsensor: tempsensor:
class: class:
action_value_mappings: action_value_mappings:
@@ -707,30 +581,6 @@ tempsensor:
title: send_prototype_command参数 title: send_prototype_command参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-set_warning:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: set_warning的参数schema
properties:
feedback: {}
goal:
properties:
command:
type: string
required:
- command
type: object
result: {}
required:
- goal
title: set_warning参数
type: object
type: UniLabJsonCommand
set_warning: set_warning:
feedback: {} feedback: {}
goal: goal:
@@ -741,10 +591,9 @@ tempsensor:
result: result:
success: success success: success
schema: schema:
description: ROS Action SendCmd 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: properties:
status: status:
type: string type: string
@@ -753,7 +602,6 @@ tempsensor:
title: SendCmd_Feedback title: SendCmd_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
command: command:
type: string type: string
@@ -762,7 +610,6 @@ tempsensor:
title: SendCmd_Goal title: SendCmd_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -782,7 +629,7 @@ tempsensor:
status_types: status_types:
value: float value: float
type: python type: python
description: Temperature sensor description: 高精度温度传感器设备用于实验室环境和设备的温度监测。该传感器通过Modbus RTU协议与控制系统通信提供实时准确的温度数据。具备高精度测量、报警温度设定、数据稳定性好等特点。适用于反应器监控、环境温度监测、设备保护等需要精确温度测量的实验场景为实验安全和数据可靠性提供保障。
handles: [] handles: []
icon: '' icon: ''
init_param_schema: init_param_schema:
@@ -809,3 +656,4 @@ tempsensor:
required: required:
- value - value
type: object type: object
version: 0.0.1

View File

@@ -1,26 +1,6 @@
gas_source.mock: gas_source.mock:
class: class:
action_value_mappings: action_value_mappings:
auto-close:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: close的参数schema
properties:
feedback: {}
goal:
properties: {}
required: []
type: object
result: {}
required:
- goal
title: close参数
type: object
type: UniLabJsonCommand
auto-is_closed: auto-is_closed:
feedback: {} feedback: {}
goal: {} goal: {}
@@ -61,50 +41,6 @@ gas_source.mock:
title: is_open参数 title: is_open参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-open:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: open的参数schema
properties:
feedback: {}
goal:
properties: {}
required: []
type: object
result: {}
required:
- goal
title: open参数
type: object
type: UniLabJsonCommand
auto-set_status:
feedback: {}
goal: {}
goal_default:
string: null
handles: []
result: {}
schema:
description: set_status的参数schema
properties:
feedback: {}
goal:
properties:
string:
type: string
required:
- string
type: object
result: {}
required:
- goal
title: set_status参数
type: object
type: UniLabJsonCommand
close: close:
feedback: {} feedback: {}
goal: {} goal: {}
@@ -112,22 +48,19 @@ gas_source.mock:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action EmptyIn 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {} properties: {}
required: [] required: []
title: EmptyIn_Feedback title: EmptyIn_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: {} properties: {}
required: [] required: []
title: EmptyIn_Goal title: EmptyIn_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -147,22 +80,19 @@ gas_source.mock:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action EmptyIn 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {} properties: {}
required: [] required: []
title: EmptyIn_Feedback title: EmptyIn_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: {} properties: {}
required: [] required: []
title: EmptyIn_Goal title: EmptyIn_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -184,16 +114,14 @@ gas_source.mock:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action StrSingleInput 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {} properties: {}
required: [] required: []
title: StrSingleInput_Feedback title: StrSingleInput_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
string: string:
type: string type: string
@@ -202,7 +130,6 @@ gas_source.mock:
title: StrSingleInput_Goal title: StrSingleInput_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -222,7 +149,7 @@ gas_source.mock:
status_types: status_types:
status: str status: str
type: python type: python
description: Mock gas source description: 模拟气体源设备,用于系统测试和开发调试。该设备模拟真实气体源的开关控制和状态监测功能,支持气体供应的启停操作。提供与真实气体源相同的接口和状态反馈,便于在没有实际硬件的情况下进行系统集成测试和算法验证。适用于气路系统调试、软件开发和实验流程验证等场景。
handles: handles:
- data_key: fluid_out - data_key: fluid_out
data_source: executor data_source: executor
@@ -246,29 +173,10 @@ gas_source.mock:
required: required:
- status - status
type: object type: object
version: 0.0.1
vacuum_pump.mock: vacuum_pump.mock:
class: class:
action_value_mappings: action_value_mappings:
auto-close:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: close的参数schema
properties:
feedback: {}
goal:
properties: {}
required: []
type: object
result: {}
required:
- goal
title: close参数
type: object
type: UniLabJsonCommand
auto-is_closed: auto-is_closed:
feedback: {} feedback: {}
goal: {} goal: {}
@@ -309,50 +217,6 @@ vacuum_pump.mock:
title: is_open参数 title: is_open参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-open:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: open的参数schema
properties:
feedback: {}
goal:
properties: {}
required: []
type: object
result: {}
required:
- goal
title: open参数
type: object
type: UniLabJsonCommand
auto-set_status:
feedback: {}
goal: {}
goal_default:
string: null
handles: []
result: {}
schema:
description: set_status的参数schema
properties:
feedback: {}
goal:
properties:
string:
type: string
required:
- string
type: object
result: {}
required:
- goal
title: set_status参数
type: object
type: UniLabJsonCommand
close: close:
feedback: {} feedback: {}
goal: {} goal: {}
@@ -360,22 +224,19 @@ vacuum_pump.mock:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action EmptyIn 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {} properties: {}
required: [] required: []
title: EmptyIn_Feedback title: EmptyIn_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: {} properties: {}
required: [] required: []
title: EmptyIn_Goal title: EmptyIn_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -395,22 +256,19 @@ vacuum_pump.mock:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action EmptyIn 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {} properties: {}
required: [] required: []
title: EmptyIn_Feedback title: EmptyIn_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: {} properties: {}
required: [] required: []
title: EmptyIn_Goal title: EmptyIn_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -432,16 +290,14 @@ vacuum_pump.mock:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action StrSingleInput 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {} properties: {}
required: [] required: []
title: StrSingleInput_Feedback title: StrSingleInput_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
string: string:
type: string type: string
@@ -450,7 +306,6 @@ vacuum_pump.mock:
title: StrSingleInput_Goal title: StrSingleInput_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -470,7 +325,7 @@ vacuum_pump.mock:
status_types: status_types:
status: str status: str
type: python type: python
description: Mock vacuum pump description: 模拟真空泵设备,用于系统测试和开发调试。该设备模拟真实真空泵的抽气功能和状态控制,支持真空系统的启停操作和状态监测。提供与真实真空泵相同的接口和控制逻辑,便于在没有实际硬件的情况下进行真空系统的集成测试。适用于真空工艺调试、软件开发和实验流程验证等场景。
handles: handles:
- data_key: fluid_in - data_key: fluid_in
data_source: handle data_source: handle
@@ -494,3 +349,4 @@ vacuum_pump.mock:
required: required:
- status - status
type: object type: object
version: 0.0.1

File diff suppressed because it is too large Load Diff

View File

@@ -8,22 +8,19 @@ zhida_hplc:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action EmptyIn 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {} properties: {}
required: [] required: []
title: EmptyIn_Feedback title: EmptyIn_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: {} properties: {}
required: [] required: []
title: EmptyIn_Goal title: EmptyIn_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -36,26 +33,6 @@ zhida_hplc:
title: EmptyIn title: EmptyIn
type: object type: object
type: EmptyIn type: EmptyIn
auto-abort:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: abort的参数schema
properties:
feedback: {}
goal:
properties: {}
required: []
type: object
result: {}
required:
- goal
title: abort参数
type: object
type: UniLabJsonCommand
auto-close: auto-close:
feedback: {} feedback: {}
goal: {} goal: {}
@@ -63,7 +40,7 @@ zhida_hplc:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: close的参数schema description: HPLC设备连接关闭函数。安全地断开与智达HPLC设备的TCP socket连接释放网络资源。该函数确保连接的正确关闭避免网络资源泄露。通常在设备使用完毕或系统关闭时调用。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -83,7 +60,7 @@ zhida_hplc:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: connect的参数schema description: HPLC设备连接建立函数。与智达HPLC设备建立TCP socket通信连接配置通信超时参数。该函数是设备使用前的必要步骤建立成功后可进行状态查询、方法获取、任务启动等操作。连接失败时会抛出异常。
properties: properties:
feedback: {} feedback: {}
goal: goal:
@@ -96,30 +73,6 @@ zhida_hplc:
title: connect参数 title: connect参数
type: object type: object
type: UniLabJsonCommand type: UniLabJsonCommand
auto-start:
feedback: {}
goal: {}
goal_default:
text: null
handles: []
result: {}
schema:
description: start的参数schema
properties:
feedback: {}
goal:
properties:
text:
type: string
required:
- text
type: object
result: {}
required:
- goal
title: start参数
type: object
type: UniLabJsonCommand
get_methods: get_methods:
feedback: {} feedback: {}
goal: {} goal: {}
@@ -127,22 +80,19 @@ zhida_hplc:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action EmptyIn 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {} properties: {}
required: [] required: []
title: EmptyIn_Feedback title: EmptyIn_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: {} properties: {}
required: [] required: []
title: EmptyIn_Goal title: EmptyIn_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -164,16 +114,14 @@ zhida_hplc:
handles: [] handles: []
result: {} result: {}
schema: schema:
description: ROS Action StrSingleInput 的 JSON Schema description: ''
properties: properties:
feedback: feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {} properties: {}
required: [] required: []
title: StrSingleInput_Feedback title: StrSingleInput_Feedback
type: object type: object
goal: goal:
description: Action 目标 - 从客户端发送到服务器
properties: properties:
string: string:
type: string type: string
@@ -182,7 +130,6 @@ zhida_hplc:
title: StrSingleInput_Goal title: StrSingleInput_Goal
type: object type: object
result: result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: properties:
return_info: return_info:
type: string type: string
@@ -203,7 +150,7 @@ zhida_hplc:
methods: dict methods: dict
status: dict status: dict
type: python type: python
description: Zhida HPLC description: 智达高效液相色谱HPLC分析设备用于实验室样品的分离、检测和定量分析。该设备通过TCP socket与HPLC控制系统通信支持远程控制和状态监控。具备自动进样、梯度洗脱、多检测器数据采集等功能可执行复杂的色谱分析方法。适用于化学分析、药物检测、环境监测、生物样品分析等需要高精度分离分析的实验室应用场景。
handles: [] handles: []
icon: '' icon: ''
init_param_schema: init_param_schema:
@@ -230,3 +177,4 @@ zhida_hplc:
- status - status
- methods - methods
type: object type: object
version: 0.0.1

View File

@@ -2,6 +2,8 @@ import copy
import io import io
import os import os
import sys import sys
import inspect
import importlib
from pathlib import Path from pathlib import Path
from typing import Any, Dict, List from typing import Any, Dict, List
@@ -63,7 +65,7 @@ class Registry:
}, },
"feedback": {}, "feedback": {},
"result": {"success": "success"}, "result": {"success": "success"},
"schema": ros_action_to_json_schema(self.ResourceCreateFromOuter), "schema": ros_action_to_json_schema(self.ResourceCreateFromOuter, '用于创建或更新物料资源,每次传入多个物料信息。'),
"goal_default": yaml.safe_load( "goal_default": yaml.safe_load(
io.StringIO(get_yaml_from_goal_type(self.ResourceCreateFromOuter.Goal)) io.StringIO(get_yaml_from_goal_type(self.ResourceCreateFromOuter.Goal))
), ),
@@ -84,7 +86,7 @@ class Registry:
}, },
"feedback": {}, "feedback": {},
"result": {"success": "success"}, "result": {"success": "success"},
"schema": ros_action_to_json_schema(self.ResourceCreateFromOuterEasy), "schema": ros_action_to_json_schema(self.ResourceCreateFromOuterEasy, '用于创建或更新物料资源,每次传入一个物料信息。'),
"goal_default": yaml.safe_load( "goal_default": yaml.safe_load(
io.StringIO(get_yaml_from_goal_type(self.ResourceCreateFromOuterEasy.Goal)) io.StringIO(get_yaml_from_goal_type(self.ResourceCreateFromOuterEasy.Goal))
), ),
@@ -99,18 +101,25 @@ class Registry:
} }
] ]
}, },
# todo: support nested keys, switch to non ros message schema
"placeholder_keys": {
"res_id": "unilabos_resources", # 将当前实验室的全部物料id作为下拉框可选择
"device_id": "unilabos_devices", # 将当前实验室的全部设备id作为下拉框可选择
"parent": "unilabos_devices", # 将当前实验室的全部设备id作为下拉框可选择
},
}, },
"test_latency": { "test_latency": {
"type": self.EmptyIn, "type": self.EmptyIn,
"goal": {}, "goal": {},
"feedback": {}, "feedback": {},
"result": {"latency_ms": "latency_ms", "time_diff_ms": "time_diff_ms"}, "result": {"latency_ms": "latency_ms", "time_diff_ms": "time_diff_ms"},
"schema": ros_action_to_json_schema(self.EmptyIn), "schema": ros_action_to_json_schema(self.EmptyIn, '用于测试延迟的动作,返回延迟时间和时间差。'),
"goal_default": {}, "goal_default": {},
"handles": {}, "handles": {},
}, },
}, },
}, },
"version": "0.0.1",
"icon": "icon_device.webp", "icon": "icon_device.webp",
"registry_type": "device", "registry_type": "device",
"handles": [], "handles": [],
@@ -161,6 +170,54 @@ class Registry:
else: else:
logger.debug(f"[UniLab Registry] Res File-{i+1}/{len(files)} Not Valid YAML File: {file.absolute()}") logger.debug(f"[UniLab Registry] Res File-{i+1}/{len(files)} Not Valid YAML File: {file.absolute()}")
def _extract_class_docstrings(self, module_string: str) -> Dict[str, str]:
"""
从模块字符串中提取类和方法的docstring信息
Args:
module_string: 模块字符串,格式为 "module.path:ClassName"
Returns:
包含类和方法docstring信息的字典
"""
docstrings = {"class_docstring": "", "methods": {}}
if not module_string or ":" not in module_string:
return docstrings
try:
module_path, class_name = module_string.split(":", 1)
# 动态导入模块
module = importlib.import_module(module_path)
# 获取类
if hasattr(module, class_name):
cls = getattr(module, class_name)
# 获取类的docstring
class_doc = inspect.getdoc(cls)
if class_doc:
docstrings["class_docstring"] = class_doc.strip()
# 获取所有方法的docstring
for method_name, method in inspect.getmembers(cls, predicate=inspect.isfunction):
method_doc = inspect.getdoc(method)
if method_doc:
docstrings["methods"][method_name] = method_doc.strip()
# 也获取属性方法的docstring
for method_name, method in inspect.getmembers(cls, predicate=lambda x: isinstance(x, property)):
if hasattr(method, "fget") and method.fget:
method_doc = inspect.getdoc(method.fget)
if method_doc:
docstrings["methods"][method_name] = method_doc.strip()
except Exception as e:
logger.warning(f"[UniLab Registry] 无法提取docstring信息模块: {module_string}, 错误: {str(e)}")
return docstrings
def _replace_type_with_class(self, type_name: str, device_id: str, field_name: str) -> Any: def _replace_type_with_class(self, type_name: str, device_id: str, field_name: str) -> Any:
""" """
将类型名称替换为实际的类对象 将类型名称替换为实际的类对象
@@ -274,15 +331,13 @@ class Registry:
param_type = arg_info.get("type", "") param_type = arg_info.get("type", "")
param_default = arg_info.get("default") param_default = arg_info.get("default")
param_required = arg_info.get("required", True) param_required = arg_info.get("required", True)
schema["properties"][param_name] = self._generate_schema_from_info( schema["properties"][param_name] = self._generate_schema_from_info(param_name, param_type, param_default)
param_name, param_type, param_default
)
if param_required: if param_required:
schema["required"].append(param_name) schema["required"].append(param_name)
return { return {
"title": f"{method_name}参数", "title": f"{method_name}参数",
"description": f"{method_name}的参数schema", "description": f"",
"type": "object", "type": "object",
"properties": {"goal": schema, "feedback": {}, "result": {}}, "properties": {"goal": schema, "feedback": {}, "result": {}},
"required": ["goal"], "required": ["goal"],
@@ -313,6 +368,8 @@ class Registry:
# 在添加到注册表前处理类型替换 # 在添加到注册表前处理类型替换
for device_id, device_config in data.items(): for device_id, device_config in data.items():
# 添加文件路径信息 - 使用规范化的完整文件路径 # 添加文件路径信息 - 使用规范化的完整文件路径
if "version" not in device_config:
device_config["version"] = "0.0.1"
if "description" not in device_config: if "description" not in device_config:
device_config["description"] = "" device_config["description"] = ""
if "icon" not in device_config: if "icon" not in device_config:
@@ -348,6 +405,14 @@ class Registry:
sorted(device_config["class"]["status_types"].items()) sorted(device_config["class"]["status_types"].items())
) )
if complete_registry: if complete_registry:
# 保存原有的description信息
old_descriptions = {}
for action_name, action_config in device_config["class"]["action_value_mappings"].items():
if "description" in action_config.get("schema", {}):
description = action_config["schema"]["description"]
if len(description):
old_descriptions[action_name] = action_config["schema"]["description"]
device_config["class"]["action_value_mappings"] = { device_config["class"]["action_value_mappings"] = {
k: v k: v
for k, v in device_config["class"]["action_value_mappings"].items() for k, v in device_config["class"]["action_value_mappings"].items()
@@ -365,9 +430,15 @@ class Registry:
"goal_default": {i["name"]: i["default"] for i in v["args"]}, "goal_default": {i["name"]: i["default"] for i in v["args"]},
"handles": [], "handles": [],
} }
# 不生成已配置action的动作
for k, v in enhanced_info["action_methods"].items() for k, v in enhanced_info["action_methods"].items()
if k not in device_config["class"]["action_value_mappings"]
} }
) )
# 恢复原有的description信息auto开头的不修改
for action_name, description in old_descriptions.items():
device_config["class"]["action_value_mappings"][action_name]["schema"]["description"] = description
device_config["init_param_schema"] = {} device_config["init_param_schema"] = {}
device_config["init_param_schema"]["config"] = self._generate_unilab_json_command_schema( device_config["init_param_schema"]["config"] = self._generate_unilab_json_command_schema(
enhanced_info["init_params"], "__init__" enhanced_info["init_params"], "__init__"
@@ -471,6 +542,13 @@ class Registry:
}, },
**schema["properties"]["goal"]["properties"], **schema["properties"]["goal"]["properties"],
} }
# 将 placeholder_keys 信息添加到 schema 中
if "placeholder_keys" in action_config and action_config.get("schema", {}).get(
"properties", {}
).get("goal", {}):
action_config["schema"]["properties"]["goal"]["_unilabos_placeholder_info"] = action_config[
"placeholder_keys"
]
msg = {"id": device_id, **device_info_copy} msg = {"id": device_id, **device_info_copy}
devices.append(msg) devices.append(msg)

View File

@@ -132,7 +132,11 @@ _msg_converter: Dict[Type, Any] = {
Bool: lambda x: Bool(data=bool(x)), Bool: lambda x: Bool(data=bool(x)),
str: str, str: str,
String: lambda x: String(data=str(x)), String: lambda x: String(data=str(x)),
Point: lambda x: Point(x=x.x, y=x.y, z=x.z) if not isinstance(x, dict) else Point(x=x.get("x", 0.0), y=x.get("y", 0.0), z=x.get("z", 0.0)), Point: lambda x: (
Point(x=x.x, y=x.y, z=x.z)
if not isinstance(x, dict)
else Point(x=float(x.get("x", 0.0)), y=float(x.get("y", 0.0)), z=float(x.get("z", 0.0)))
),
Resource: lambda x: Resource( Resource: lambda x: Resource(
id=x.get("id", ""), id=x.get("id", ""),
name=x.get("name", ""), name=x.get("name", ""),
@@ -142,7 +146,13 @@ _msg_converter: Dict[Type, Any] = {
type=x.get("type", ""), type=x.get("type", ""),
category=x.get("class", "") or x.get("type", ""), category=x.get("class", "") or x.get("type", ""),
pose=( pose=(
Pose(position=Point(x=float(x.get("position", {}).get("x", 0.0)), y=float(x.get("position", {}).get("y", 0.0)), z=float(x.get("position", {}).get("z", 0.0)))) Pose(
position=Point(
x=float(x.get("position", {}).get("x", 0.0)),
y=float(x.get("position", {}).get("y", 0.0)),
z=float(x.get("position", {}).get("z", 0.0)),
)
)
if x.get("position", None) is not None if x.get("position", None) is not None
else Pose() else Pose()
), ),
@@ -151,6 +161,7 @@ _msg_converter: Dict[Type, Any] = {
), ),
} }
def json_or_yaml_loads(data: str) -> Any: def json_or_yaml_loads(data: str) -> Any:
try: try:
return json.loads(data) return json.loads(data)
@@ -161,6 +172,7 @@ def json_or_yaml_loads(data: str) -> Any:
pass pass
raise e raise e
# ROS消息到Python转换器 # ROS消息到Python转换器
_msg_converter_back: Dict[Type, Any] = { _msg_converter_back: Dict[Type, Any] = {
float: float, float: float,
@@ -571,30 +583,30 @@ from unilabos.utils.import_manager import ImportManager
from unilabos.config.config import ROSConfig from unilabos.config.config import ROSConfig
basic_type_map = { basic_type_map = {
'bool': {'type': 'boolean'}, "bool": {"type": "boolean"},
'int8': {'type': 'integer', 'minimum': -128, 'maximum': 127}, "int8": {"type": "integer", "minimum": -128, "maximum": 127},
'uint8': {'type': 'integer', 'minimum': 0, 'maximum': 255}, "uint8": {"type": "integer", "minimum": 0, "maximum": 255},
'int16': {'type': 'integer', 'minimum': -32768, 'maximum': 32767}, "int16": {"type": "integer", "minimum": -32768, "maximum": 32767},
'uint16': {'type': 'integer', 'minimum': 0, 'maximum': 65535}, "uint16": {"type": "integer", "minimum": 0, "maximum": 65535},
'int32': {'type': 'integer', 'minimum': -2147483648, 'maximum': 2147483647}, "int32": {"type": "integer", "minimum": -2147483648, "maximum": 2147483647},
'uint32': {'type': 'integer', 'minimum': 0, 'maximum': 4294967295}, "uint32": {"type": "integer", "minimum": 0, "maximum": 4294967295},
'int64': {'type': 'integer'}, "int64": {"type": "integer"},
'uint64': {'type': 'integer', 'minimum': 0}, "uint64": {"type": "integer", "minimum": 0},
'double': {'type': 'number'}, "double": {"type": "number"},
'float': {'type': 'number'}, "float": {"type": "number"},
'float32': {'type': 'number'}, "float32": {"type": "number"},
'float64': {'type': 'number'}, "float64": {"type": "number"},
'string': {'type': 'string'}, "string": {"type": "string"},
'boolean': {'type': 'boolean'}, "boolean": {"type": "boolean"},
'char': {'type': 'string', 'maxLength': 1}, "char": {"type": "string", "maxLength": 1},
'byte': {'type': 'integer', 'minimum': 0, 'maximum': 255}, "byte": {"type": "integer", "minimum": 0, "maximum": 255},
} }
def ros_field_type_to_json_schema(type_info: Type | str, slot_type: str=None) -> Dict[str, Any]: def ros_field_type_to_json_schema(type_info: Type | str, slot_type: str = None) -> Dict[str, Any]:
""" """
将 ROS 字段类型转换为 JSON Schema 类型定义 将 ROS 字段类型转换为 JSON Schema 类型定义
Args: Args:
type_info: ROS 类型 type_info: ROS 类型
slot_type: ROS 类型 slot_type: ROS 类型
@@ -603,10 +615,7 @@ def ros_field_type_to_json_schema(type_info: Type | str, slot_type: str=None) ->
对应的 JSON Schema 类型定义 对应的 JSON Schema 类型定义
""" """
if isinstance(type_info, UnboundedSequence): if isinstance(type_info, UnboundedSequence):
return { return {"type": "array", "items": ros_field_type_to_json_schema(type_info.value_type)}
'type': 'array',
'items': ros_field_type_to_json_schema(type_info.value_type)
}
if isinstance(type_info, NamespacedType): if isinstance(type_info, NamespacedType):
cls_name = ".".join(type_info.namespaces) + ":" + type_info.name cls_name = ".".join(type_info.namespaces) + ":" + type_info.name
type_class = msg_converter_manager.get_class(cls_name) type_class = msg_converter_manager.get_class(cls_name)
@@ -614,20 +623,20 @@ def ros_field_type_to_json_schema(type_info: Type | str, slot_type: str=None) ->
elif isinstance(type_info, BasicType): elif isinstance(type_info, BasicType):
return ros_field_type_to_json_schema(type_info.typename) return ros_field_type_to_json_schema(type_info.typename)
elif isinstance(type_info, UnboundedString): elif isinstance(type_info, UnboundedString):
return basic_type_map['string'] return basic_type_map["string"]
elif isinstance(type_info, str): elif isinstance(type_info, str):
if type_info in basic_type_map: if type_info in basic_type_map:
return basic_type_map[type_info] return basic_type_map[type_info]
# 处理时间和持续时间类型 # 处理时间和持续时间类型
if type_info in ('time', 'duration', 'builtin_interfaces/Time', 'builtin_interfaces/Duration'): if type_info in ("time", "duration", "builtin_interfaces/Time", "builtin_interfaces/Duration"):
return { return {
'type': 'object', "type": "object",
'properties': { "properties": {
'sec': {'type': 'integer', 'description': ''}, "sec": {"type": "integer", "description": ""},
'nanosec': {'type': 'integer', 'description': '纳秒'} "nanosec": {"type": "integer", "description": "纳秒"},
}, },
'required': ['sec', 'nanosec'] "required": ["sec", "nanosec"],
} }
else: else:
return ros_message_to_json_schema(type_info) return ros_message_to_json_schema(type_info)
@@ -638,9 +647,7 @@ def ros_field_type_to_json_schema(type_info: Type | str, slot_type: str=None) ->
# 'type': 'array', # 'type': 'array',
# 'items': ros_field_type_to_json_schema(item_type) # 'items': ros_field_type_to_json_schema(item_type)
# } # }
# # 处理复杂类型(尝试加载并处理) # # 处理复杂类型(尝试加载并处理)
# try: # try:
# # 如果它是一个完整的消息类型规范 (包名/msg/类型名) # # 如果它是一个完整的消息类型规范 (包名/msg/类型名)
@@ -655,34 +662,31 @@ def ros_field_type_to_json_schema(type_info: Type | str, slot_type: str=None) ->
# logger.debug(f"无法解析类型 {field_type}: {str(e)}") # logger.debug(f"无法解析类型 {field_type}: {str(e)}")
# return {'type': 'object', 'description': f'未知类型: {field_type}'} # return {'type': 'object', 'description': f'未知类型: {field_type}'}
def ros_message_to_json_schema(msg_class: Any) -> Dict[str, Any]: def ros_message_to_json_schema(msg_class: Any) -> Dict[str, Any]:
""" """
将 ROS 消息类转换为 JSON Schema 将 ROS 消息类转换为 JSON Schema
Args: Args:
msg_class: ROS 消息类 msg_class: ROS 消息类
Returns: Returns:
对应的 JSON Schema 定义 对应的 JSON Schema 定义
""" """
schema = { schema = {"type": "object", "properties": {}, "required": []}
'type': 'object',
'properties': {},
'required': []
}
# 获取类名作为标题 # 获取类名作为标题
if hasattr(msg_class, '__name__'): if hasattr(msg_class, "__name__"):
schema['title'] = msg_class.__name__ schema["title"] = msg_class.__name__
# 获取消息的字段和字段类型 # 获取消息的字段和字段类型
try: try:
for ind, slot_info in enumerate(msg_class._fields_and_field_types.items()): for ind, slot_info in enumerate(msg_class._fields_and_field_types.items()):
slot_name, slot_type = slot_info slot_name, slot_type = slot_info
type_info = msg_class.SLOT_TYPES[ind] type_info = msg_class.SLOT_TYPES[ind]
field_schema = ros_field_type_to_json_schema(type_info, slot_type) field_schema = ros_field_type_to_json_schema(type_info, slot_type)
schema['properties'][slot_name] = field_schema schema["properties"][slot_name] = field_schema
schema['required'].append(slot_name) schema["required"].append(slot_name)
# if hasattr(msg_class, 'get_fields_and_field_types'): # if hasattr(msg_class, 'get_fields_and_field_types'):
# fields_and_types = msg_class.get_fields_and_field_types() # fields_and_types = msg_class.get_fields_and_field_types()
# #
@@ -707,61 +711,66 @@ def ros_message_to_json_schema(msg_class: Any) -> Dict[str, Any]:
# schema['required'].append(clean_name) # schema['required'].append(clean_name)
except Exception as e: except Exception as e:
# 如果获取字段类型失败,添加错误信息 # 如果获取字段类型失败,添加错误信息
schema['description'] = f"解析消息字段时出错: {str(e)}" schema["description"] = f"解析消息字段时出错: {str(e)}"
logger.error(f"解析 {msg_class.__name__} 消息字段失败: {str(e)}") logger.error(f"解析 {msg_class.__name__} 消息字段失败: {str(e)}")
return schema return schema
def ros_action_to_json_schema(action_class: Any) -> Dict[str, Any]:
def ros_action_to_json_schema(action_class: Any, description="") -> Dict[str, Any]:
""" """
将 ROS Action 类转换为 JSON Schema 将 ROS Action 类转换为 JSON Schema
Args: Args:
action_class: ROS Action 类 action_class: ROS Action 类
description: 描述
Returns: Returns:
完整的 JSON Schema 定义 完整的 JSON Schema 定义
""" """
if not hasattr(action_class, 'Goal') or not hasattr(action_class, 'Feedback') or not hasattr(action_class, 'Result'): if (
not hasattr(action_class, "Goal")
or not hasattr(action_class, "Feedback")
or not hasattr(action_class, "Result")
):
raise ValueError(f"{action_class.__name__} 不是有效的 ROS Action 类") raise ValueError(f"{action_class.__name__} 不是有效的 ROS Action 类")
# 创建基础 schema # 创建基础 schema
schema = { schema = {
'title': action_class.__name__, "title": action_class.__name__,
'description': f"ROS Action {action_class.__name__} 的 JSON Schema", "description": description,
'type': 'object', "type": "object",
'properties': { "properties": {
'goal': { "goal": {
'description': 'Action 目标 - 从客户端发送到服务器', # 'description': 'Action 目标 - 从客户端发送到服务器',
**ros_message_to_json_schema(action_class.Goal) **ros_message_to_json_schema(action_class.Goal)
}, },
'feedback': { "feedback": {
'description': 'Action 反馈 - 执行过程中从服务器发送到客户端', # 'description': 'Action 反馈 - 执行过程中从服务器发送到客户端',
**ros_message_to_json_schema(action_class.Feedback) **ros_message_to_json_schema(action_class.Feedback)
}, },
'result': { "result": {
'description': 'Action 结果 - 完成后从服务器发送到客户端', # 'description': 'Action 结果 - 完成后从服务器发送到客户端',
**ros_message_to_json_schema(action_class.Result) **ros_message_to_json_schema(action_class.Result)
} },
}, },
'required': ['goal'] "required": ["goal"],
} }
return schema return schema
def convert_ros_action_to_jsonschema( def convert_ros_action_to_jsonschema(
action_name_or_type: Union[str, Type], action_name_or_type: Union[str, Type], output_file: Optional[str] = None, format: str = "json"
output_file: Optional[str] = None,
format: str = 'json'
) -> Dict[str, Any]: ) -> Dict[str, Any]:
""" """
将 ROS Action 类型转换为 JSON Schema并可选地保存到文件 将 ROS Action 类型转换为 JSON Schema并可选地保存到文件
Args: Args:
action_name_or_type: ROS Action 类型名称或类 action_name_or_type: ROS Action 类型名称或类
output_file: 可选,输出 JSON Schema 的文件路径 output_file: 可选,输出 JSON Schema 的文件路径
format: 输出格式,'json''yaml' format: 输出格式,'json''yaml'
Returns: Returns:
JSON Schema 定义(字典) JSON Schema 定义(字典)
""" """
@@ -771,21 +780,21 @@ def convert_ros_action_to_jsonschema(
action_type = get_ros_type_by_msgname(action_name_or_type) action_type = get_ros_type_by_msgname(action_name_or_type)
else: else:
action_type = action_name_or_type action_type = action_name_or_type
# 生成 JSON Schema # 生成 JSON Schema
schema = ros_action_to_json_schema(action_type) schema = ros_action_to_json_schema(action_type)
# 如果指定了输出文件,将 Schema 保存到文件 # 如果指定了输出文件,将 Schema 保存到文件
if output_file: if output_file:
if format.lower() == 'json': if format.lower() == "json":
with open(output_file, 'w', encoding='utf-8') as f: with open(output_file, "w", encoding="utf-8") as f:
json.dump(schema, f, indent=2, ensure_ascii=False) json.dump(schema, f, indent=2, ensure_ascii=False)
elif format.lower() == 'yaml': elif format.lower() == "yaml":
with open(output_file, 'w', encoding='utf-8') as f: with open(output_file, "w", encoding="utf-8") as f:
yaml.safe_dump(schema, f, default_flow_style=False, allow_unicode=True) yaml.safe_dump(schema, f, default_flow_style=False, allow_unicode=True)
else: else:
raise ValueError(f"不支持的格式: {format},请使用 'json''yaml'") raise ValueError(f"不支持的格式: {format},请使用 'json''yaml'")
return schema return schema
@@ -794,14 +803,14 @@ if __name__ == "__main__":
# 示例:转换 NavigateToPose action # 示例:转换 NavigateToPose action
try: try:
from nav2_msgs.action import NavigateToPose from nav2_msgs.action import NavigateToPose
# 转换为 JSON Schema 并打印 # 转换为 JSON Schema 并打印
schema = convert_ros_action_to_jsonschema(NavigateToPose) schema = convert_ros_action_to_jsonschema(NavigateToPose)
print(json.dumps(schema, indent=2, ensure_ascii=False)) print(json.dumps(schema, indent=2, ensure_ascii=False))
# 保存到文件 # 保存到文件
# convert_ros_action_to_jsonschema(NavigateToPose, "navigate_to_pose_schema.json") # convert_ros_action_to_jsonschema(NavigateToPose, "navigate_to_pose_schema.json")
# 或者使用字符串形式的 action 名称 # 或者使用字符串形式的 action 名称
# schema = convert_ros_action_to_jsonschema("nav2_msgs/action/NavigateToPose") # schema = convert_ros_action_to_jsonschema("nav2_msgs/action/NavigateToPose")
except ImportError: except ImportError:

View File

@@ -307,7 +307,7 @@ class BaseROS2DeviceNode(Node, Generic[T]):
# 创建动作服务 # 创建动作服务
if self.create_action_server: if self.create_action_server:
for action_name, action_value_mapping in self._action_value_mappings.items(): for action_name, action_value_mapping in self._action_value_mappings.items():
if action_name.startswith("auto-"): if action_name.startswith("auto-") or str(action_value_mapping.get("type", "")).startswith("UniLabJsonCommand"):
continue continue
self.create_ros_action_server(action_name, action_value_mapping) self.create_ros_action_server(action_name, action_value_mapping)
@@ -923,11 +923,18 @@ class ROS2DeviceNode:
driver_class.__module__.startswith("pylabrobot") driver_class.__module__.startswith("pylabrobot")
or driver_class.__name__ == "LiquidHandlerAbstract" or driver_class.__name__ == "LiquidHandlerAbstract"
or driver_class.__name__ == "LiquidHandlerBiomek" or driver_class.__name__ == "LiquidHandlerBiomek"
or driver_class.__name__ == "PRCXI9300Handler"
) )
# TODO: 要在创建之前预先请求服务器是否有当前id的物料放到resource_tracker中让pylabrobot进行创建 # TODO: 要在创建之前预先请求服务器是否有当前id的物料放到resource_tracker中让pylabrobot进行创建
# 创建设备类实例 # 创建设备类实例
if use_pylabrobot_creator: if use_pylabrobot_creator:
# 先对pylabrobot的子资源进行加载不然subclass无法认出
# 在下方对于加载Deck等Resource要手动import
# noinspection PyUnresolvedReferences
from unilabos.devices.liquid_handling.prcxi.prcxi import PRCXI9300Deck
# noinspection PyUnresolvedReferences
from unilabos.devices.liquid_handling.prcxi.prcxi import PRCXI9300Container
self._driver_creator = PyLabRobotCreator( self._driver_creator = PyLabRobotCreator(
driver_class, children=children, resource_tracker=self.resource_tracker driver_class, children=children, resource_tracker=self.resource_tracker
) )

View File

@@ -459,7 +459,7 @@ class HostNode(BaseROS2DeviceNode):
self.devices_instances[device_id] = d self.devices_instances[device_id] = d
# noinspection PyProtectedMember # noinspection PyProtectedMember
for action_name, action_value_mapping in d._ros_node._action_value_mappings.items(): for action_name, action_value_mapping in d._ros_node._action_value_mappings.items():
if action_name.startswith("auto-"): if action_name.startswith("auto-") or str(action_value_mapping.get("type", "")).startswith("UniLabJsonCommand"):
continue continue
action_id = f"/devices/{device_id}/{action_name}" action_id = f"/devices/{device_id}/{action_name}"
if action_id not in self._action_clients: if action_id not in self._action_clients:
@@ -603,8 +603,7 @@ class HostNode(BaseROS2DeviceNode):
if action_name == "test_latency" and server_info is not None: if action_name == "test_latency" and server_info is not None:
self.server_latest_timestamp = server_info.get("send_timestamp", 0.0) self.server_latest_timestamp = server_info.get("send_timestamp", 0.0)
if action_id not in self._action_clients: if action_id not in self._action_clients:
self.lab_logger().error(f"[Host Node] ActionClient {action_id} not found.") raise ValueError(f"ActionClient {action_id} not found.")
return
action_client: ActionClient = self._action_clients[action_id] action_client: ActionClient = self._action_clients[action_id]

View File

@@ -134,7 +134,7 @@ class ROS2ProtocolNode(BaseROS2DeviceNode):
if d is not None and hasattr(d, "ros_node_instance"): if d is not None and hasattr(d, "ros_node_instance"):
node = d.ros_node_instance node = d.ros_node_instance
for action_name, action_mapping in node._action_value_mappings.items(): for action_name, action_mapping in node._action_value_mappings.items():
if action_name.startswith("auto-"): if action_name.startswith("auto-") or str(action_mapping.get("type", "")).startswith("UniLabJsonCommand"):
continue continue
action_id = f"/devices/{device_id_abs}/{action_name}" action_id = f"/devices/{device_id_abs}/{action_name}"
if action_id not in self._action_clients: if action_id not in self._action_clients:

View File

@@ -148,7 +148,7 @@ class PyLabRobotCreator(DeviceClassCreator[T]):
contain_model = not issubclass(target_type, Deck) contain_model = not issubclass(target_type, Deck)
resource, target_type = self._process_resource_mapping(resource, target_type) resource, target_type = self._process_resource_mapping(resource, target_type)
resource_instance: Resource = resource_ulab_to_plr(resource, contain_model) resource_instance: Resource = resource_ulab_to_plr(resource, contain_model)
states[prefix_path] = resource_instance.serialize_all_state()
# 使用 prefix_path 作为 key 存储资源状态 # 使用 prefix_path 作为 key 存储资源状态
if to_dict: if to_dict:
serialized = resource_instance.serialize() serialized = resource_instance.serialize()
@@ -199,7 +199,7 @@ class PyLabRobotCreator(DeviceClassCreator[T]):
spect = inspect.signature(deserialize_method) spect = inspect.signature(deserialize_method)
spec_args = spect.parameters spec_args = spect.parameters
for param_name, param_value in data.copy().items(): for param_name, param_value in data.copy().items():
if "_resource_child_name" in param_value and "_resource_type" not in param_value: if isinstance(param_value, dict) and "_resource_child_name" in param_value and "_resource_type" not in param_value:
arg_value = spec_args[param_name].annotation arg_value = spec_args[param_name].annotation
data[param_name]["_resource_type"] = self.device_cls.__module__ + ":" + arg_value data[param_name]["_resource_type"] = self.device_cls.__module__ + ":" + arg_value
logger.debug(f"自动补充 _resource_type: {data[param_name]['_resource_type']}") logger.debug(f"自动补充 _resource_type: {data[param_name]['_resource_type']}")
@@ -230,7 +230,7 @@ class PyLabRobotCreator(DeviceClassCreator[T]):
spect = inspect.signature(self.device_cls.__init__) spect = inspect.signature(self.device_cls.__init__)
spec_args = spect.parameters spec_args = spect.parameters
for param_name, param_value in data.copy().items(): for param_name, param_value in data.copy().items():
if "_resource_child_name" in param_value and "_resource_type" not in param_value: if isinstance(param_value, dict) and "_resource_child_name" in param_value and "_resource_type" not in param_value:
arg_value = spec_args[param_name].annotation arg_value = spec_args[param_name].annotation
data[param_name]["_resource_type"] = self.device_cls.__module__ + ":" + arg_value data[param_name]["_resource_type"] = self.device_cls.__module__ + ":" + arg_value
logger.debug(f"自动补充 _resource_type: {data[param_name]['_resource_type']}") logger.debug(f"自动补充 _resource_type: {data[param_name]['_resource_type']}")

View File

@@ -148,7 +148,7 @@ def configure_logger():
"""配置日志记录器""" """配置日志记录器"""
# 获取根日志记录器 # 获取根日志记录器
root_logger = logging.getLogger() root_logger = logging.getLogger()
root_logger.setLevel(logging.DEBUG) # 修改为DEBUG以显示所有级别 root_logger.setLevel(logging.INFO) # 修改为DEBUG以显示所有级别
# 移除已存在的处理器 # 移除已存在的处理器
for handler in root_logger.handlers[:]: for handler in root_logger.handlers[:]:
@@ -156,7 +156,7 @@ def configure_logger():
# 创建控制台处理器 # 创建控制台处理器
console_handler = logging.StreamHandler() console_handler = logging.StreamHandler()
console_handler.setLevel(logging.DEBUG) # 修改为DEBUG以显示所有级别 console_handler.setLevel(logging.INFO) # 修改为DEBUG以显示所有级别
# 使用自定义的颜色格式化器 # 使用自定义的颜色格式化器
color_formatter = ColoredFormatter() color_formatter = ColoredFormatter()