支持通过导入方式补全注册表,新增工作流unilabos_device_id字段

This commit is contained in:
Xuwznln
2025-06-28 01:19:54 +08:00
parent bbc49e9aab
commit 15f3f8518b
17 changed files with 4457 additions and 52 deletions

View File

@@ -0,0 +1,505 @@
hplc.agilent:
class:
action_value_mappings:
auto-check_status:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand check_status 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand check_status 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: check_status 命令参数
type: object
type: UniLabJsonCommand
auto-execute_command_from_outer:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: UniLabJsonCommand execute_command_from_outer 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand execute_command_from_outer 的参数schema
properties:
command:
description: '参数: command'
type: string
required:
- command
type: object
result: {}
required:
- goal
title: execute_command_from_outer 命令参数
type: object
type: UniLabJsonCommand
auto-extract_data_from_txt:
feedback: {}
goal: {}
goal_default:
file_path: null
handles: []
result: {}
schema:
description: UniLabJsonCommand extract_data_from_txt 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand extract_data_from_txt 的参数schema
properties:
file_path:
description: '参数: file_path'
type: string
required:
- file_path
type: object
result: {}
required:
- goal
title: extract_data_from_txt 命令参数
type: object
type: UniLabJsonCommand
auto-get_data_file:
feedback: {}
goal: {}
goal_default:
after_time: null
mat_index: null
handles: []
result: {}
schema:
description: UniLabJsonCommand get_data_file 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand get_data_file 的参数schema
properties:
after_time:
description: '参数: after_time'
type: string
mat_index:
description: '参数: mat_index'
type: string
required: []
type: object
result: {}
required:
- goal
title: get_data_file 命令参数
type: object
type: UniLabJsonCommand
auto-start_sequence:
feedback: {}
goal: {}
goal_default:
params: null
resource: null
wf_name: null
handles: []
result: {}
schema:
description: UniLabJsonCommand start_sequence 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand start_sequence 的参数schema
properties:
params:
description: '参数: params'
type: string
resource:
description: '参数: resource'
type: object
wf_name:
description: '参数: wf_name'
type: string
required:
- wf_name
type: object
result: {}
required:
- goal
title: start_sequence 命令参数
type: object
type: UniLabJsonCommand
auto-try_close_sub_device:
feedback: {}
goal: {}
goal_default:
device_name: null
handles: []
result: {}
schema:
description: UniLabJsonCommand try_close_sub_device 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand try_close_sub_device 的参数schema
properties:
device_name:
description: '参数: device_name'
type: string
required: []
type: object
result: {}
required:
- goal
title: try_close_sub_device 命令参数
type: object
type: UniLabJsonCommand
auto-try_open_sub_device:
feedback: {}
goal: {}
goal_default:
device_name: null
handles: []
result: {}
schema:
description: UniLabJsonCommand try_open_sub_device 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand try_open_sub_device 的参数schema
properties:
device_name:
description: '参数: device_name'
type: string
required: []
type: object
result: {}
required:
- goal
title: try_open_sub_device 命令参数
type: object
type: UniLabJsonCommand
execute_command_from_outer:
feedback: {}
goal:
command: command
goal_default:
command: ''
handles: []
result:
success: success
schema:
description: ROS Action SendCmd 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties:
status:
type: string
required:
- status
title: SendCmd_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties:
command:
type: string
required:
- command
title: SendCmd_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties:
return_info:
type: string
success:
type: boolean
required:
- return_info
- success
title: SendCmd_Result
type: object
required:
- goal
title: SendCmd
type: object
type: SendCmd
module: unilabos.devices.hplc.AgilentHPLC:HPLCDriver
status_types:
could_run: bool
device_status: str
driver_init_ok: bool
finish_status: str
get_data_file: tuple
is_running: bool
status_text: str
success: bool
type: python
description: HPLC device
handles: []
icon: ''
init_param_schema:
description: UniLabJsonCommand __init__ 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties:
driver_debug:
default: false
description: '参数: driver_debug'
type: boolean
required: []
type: object
result: {}
required:
- goal
title: __init__ 命令参数
type: object
raman_home_made:
class:
action_value_mappings:
auto-ccd_time:
feedback: {}
goal: {}
goal_default:
int_time: null
handles: []
result: {}
schema:
description: UniLabJsonCommand ccd_time 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand ccd_time 的参数schema
properties:
int_time:
description: '参数: int_time'
type: string
required:
- int_time
type: object
result: {}
required:
- goal
title: ccd_time 命令参数
type: object
type: UniLabJsonCommand
auto-laser_on_power:
feedback: {}
goal: {}
goal_default:
output_voltage_laser: null
handles: []
result: {}
schema:
description: UniLabJsonCommand laser_on_power 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand laser_on_power 的参数schema
properties:
output_voltage_laser:
description: '参数: output_voltage_laser'
type: string
required:
- output_voltage_laser
type: object
result: {}
required:
- goal
title: laser_on_power 命令参数
type: object
type: UniLabJsonCommand
auto-raman_cmd:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: UniLabJsonCommand raman_cmd 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand raman_cmd 的参数schema
properties:
command:
description: '参数: command'
type: string
required:
- command
type: object
result: {}
required:
- goal
title: raman_cmd 命令参数
type: object
type: UniLabJsonCommand
auto-raman_without_background:
feedback: {}
goal: {}
goal_default:
int_time: null
laser_power: null
handles: []
result: {}
schema:
description: UniLabJsonCommand raman_without_background 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand raman_without_background 的参数schema
properties:
int_time:
description: '参数: int_time'
type: string
laser_power:
description: '参数: laser_power'
type: string
required:
- int_time
- laser_power
type: object
result: {}
required:
- goal
title: raman_without_background 命令参数
type: object
type: UniLabJsonCommand
auto-raman_without_background_average:
feedback: {}
goal: {}
goal_default:
average: null
int_time: null
laser_power: null
sample_name: null
handles: []
result: {}
schema:
description: UniLabJsonCommand raman_without_background_average 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand raman_without_background_average 的参数schema
properties:
average:
description: '参数: average'
type: string
int_time:
description: '参数: int_time'
type: string
laser_power:
description: '参数: laser_power'
type: string
sample_name:
description: '参数: sample_name'
type: string
required:
- sample_name
- int_time
- laser_power
- average
type: object
result: {}
required:
- goal
title: raman_without_background_average 命令参数
type: object
type: UniLabJsonCommand
raman_cmd:
feedback: {}
goal:
command: command
goal_default:
command: ''
handles: []
result:
success: success
schema:
description: ROS Action SendCmd 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties:
status:
type: string
required:
- status
title: SendCmd_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties:
command:
type: string
required:
- command
title: SendCmd_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties:
return_info:
type: string
success:
type: boolean
required:
- return_info
- success
title: SendCmd_Result
type: object
required:
- goal
title: SendCmd
type: object
type: SendCmd
module: unilabos.devices.raman_uv.home_made_raman:RamanObj
status_types:
status: String
type: python
description: Raman spectroscopy device
handles: []
icon: ''
init_param_schema:
description: UniLabJsonCommand __init__ 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties:
baudrate_ccd:
default: 921600
description: '参数: baudrate_ccd'
type: integer
baudrate_laser:
default: 9600
description: '参数: baudrate_laser'
type: integer
port_ccd:
description: '参数: port_ccd'
type: string
port_laser:
description: '参数: port_laser'
type: string
required:
- port_laser
- port_ccd
type: object
result: {}
required:
- goal
title: __init__ 命令参数
type: object

View File

@@ -23,7 +23,8 @@ hotel.thermo_orbitor_rs2_hotel:
type: object
type: UniLabJsonCommand
module: unilabos.devices.resource_container.container:HotelContainer
status_types: {}
status_types:
get_rotation: String
type: python
description: Thermo Orbitor RS2 Hotel
handles: []

File diff suppressed because it is too large Load Diff

View File

@@ -250,6 +250,7 @@ mock_chiller:
module: unilabos.devices.mock.mock_chiller:MockChiller
status_types:
current_temperature: float
get_status_info: dict
is_cooling: bool
is_heating: bool
purpose: str
@@ -594,6 +595,7 @@ mock_filter:
filtered_volume: float
filtrate_vessel: str
flow_rate: float
get_status_info: dict
is_filtering: bool
pressure_drop: float
progress: float
@@ -1053,6 +1055,7 @@ mock_heater:
module: unilabos.devices.mock.mock_heater:MockHeater
status_types:
current_temperature: float
get_status_info: dict
heating_power: float
is_heating: bool
max_temperature: float
@@ -1510,6 +1513,7 @@ mock_pump:
current_device: str
flow_rate: float
from_vessel: str
get_status_info: dict
is_solid: bool
is_viscous: bool
max_flow_rate: float
@@ -2081,6 +2085,7 @@ mock_rotavap:
type: EmptyIn
module: unilabos.devices.mock.mock_rotavap:MockRotavap
status_types:
get_status_info: dict
pump_state: str
pump_time: float
rotate_speed: float
@@ -2573,6 +2578,7 @@ mock_separator:
status_types:
current_device: str
from_vessel: str
get_status_info: dict
product_phase: str
purpose: str
repeats: int
@@ -2865,6 +2871,7 @@ mock_solenoid_valve:
type: StrSingleInput
module: unilabos.devices.mock.mock_solenoid_valve:MockSolenoidValve
status_types:
get_valve_status: str
status: str
valve_status: str
type: python
@@ -3281,6 +3288,7 @@ mock_stirrer:
type: EmptyIn
module: unilabos.devices.mock.mock_stirrer:MockStirrer
status_types:
get_status_info: dict
heating_power: float
heating_state: str
max_stir_speed: float
@@ -3621,6 +3629,7 @@ mock_stirrer_new:
type: StopStir
module: unilabos.devices.mock.mock_stirrer_new:MockStirrer_new
status_types:
get_status_info: dict
max_stir_speed: float
progress: float
purpose: str
@@ -4125,6 +4134,7 @@ mock_vacuum:
type: EmptyIn
module: unilabos.devices.mock.mock_vacuum:MockVacuum
status_types:
get_status_info: dict
max_pump_speed: float
power_state: str
pump_efficiency: float

View File

@@ -1,6 +1,294 @@
moveit.arm_slider:
class:
action_value_mappings:
auto-check_tf_update_actions:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand check_tf_update_actions 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand check_tf_update_actions 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: check_tf_update_actions 命令参数
type: object
type: UniLabJsonCommand
auto-moveit_joint_task:
feedback: {}
goal: {}
goal_default:
joint_names: null
joint_positions: null
move_group: null
retry: 10
speed: 1
handles: []
result: {}
schema:
description: UniLabJsonCommand moveit_joint_task 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand moveit_joint_task 的参数schema
properties:
joint_names:
description: '参数: joint_names'
type: string
joint_positions:
description: '参数: joint_positions'
type: string
move_group:
description: '参数: move_group'
type: string
retry:
default: 10
description: '参数: retry'
type: string
speed:
default: 1
description: '参数: speed'
type: string
required:
- move_group
- joint_positions
type: object
result: {}
required:
- goal
title: moveit_joint_task 命令参数
type: object
type: UniLabJsonCommand
auto-moveit_task:
feedback: {}
goal: {}
goal_default:
cartesian: false
move_group: null
offsets:
- 0
- 0
- 0
position: null
quaternion: null
retry: 10
speed: 1
target_link: null
handles: []
result: {}
schema:
description: UniLabJsonCommand moveit_task 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand moveit_task 的参数schema
properties:
cartesian:
default: false
description: '参数: cartesian'
type: string
move_group:
description: '参数: move_group'
type: string
offsets:
default:
- 0
- 0
- 0
description: '参数: offsets'
type: string
position:
description: '参数: position'
type: string
quaternion:
description: '参数: quaternion'
type: string
retry:
default: 10
description: '参数: retry'
type: string
speed:
default: 1
description: '参数: speed'
type: string
target_link:
description: '参数: target_link'
type: string
required:
- move_group
- position
- quaternion
type: object
result: {}
required:
- goal
title: moveit_task 命令参数
type: object
type: UniLabJsonCommand
auto-pick_and_place:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: UniLabJsonCommand pick_and_place 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand pick_and_place 的参数schema
properties:
command:
description: '参数: command'
type: string
required:
- command
type: object
result: {}
required:
- goal
title: pick_and_place 命令参数
type: object
type: UniLabJsonCommand
auto-post_init:
feedback: {}
goal: {}
goal_default:
ros_node: null
handles: []
result: {}
schema:
description: UniLabJsonCommand post_init 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand post_init 的参数schema
properties:
ros_node:
description: '参数: ros_node'
type: string
required:
- ros_node
type: object
result: {}
required:
- goal
title: post_init 命令参数
type: object
type: UniLabJsonCommand
auto-resource_manager:
feedback: {}
goal: {}
goal_default:
parent_link: null
resource: null
handles: []
result: {}
schema:
description: UniLabJsonCommand resource_manager 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand resource_manager 的参数schema
properties:
parent_link:
description: '参数: parent_link'
type: string
resource:
description: '参数: resource'
type: string
required:
- resource
- parent_link
type: object
result: {}
required:
- goal
title: resource_manager 命令参数
type: object
type: UniLabJsonCommand
auto-set_position:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: UniLabJsonCommand set_position 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand set_position 的参数schema
properties:
command:
description: '参数: 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: UniLabJsonCommand set_status 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand set_status 的参数schema
properties:
command:
description: '参数: command'
type: string
required:
- command
type: object
result: {}
required:
- goal
title: set_status 命令参数
type: object
type: UniLabJsonCommand
auto-wait_for_resource_action:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand wait_for_resource_action 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand wait_for_resource_action 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: wait_for_resource_action 命令参数
type: object
type: UniLabJsonCommand
pick_and_place:
feedback: {}
goal:
@@ -151,8 +439,22 @@ moveit.arm_slider:
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties: {}
required: []
properties:
device_config:
description: '参数: device_config'
type: string
joint_poses:
description: '参数: joint_poses'
type: string
moveit_type:
description: '参数: moveit_type'
type: string
rotation:
description: '参数: rotation'
type: string
required:
- moveit_type
- joint_poses
type: object
result: {}
required:
@@ -165,6 +467,294 @@ moveit.arm_slider:
moveit.toyo_xyz:
class:
action_value_mappings:
auto-check_tf_update_actions:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand check_tf_update_actions 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand check_tf_update_actions 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: check_tf_update_actions 命令参数
type: object
type: UniLabJsonCommand
auto-moveit_joint_task:
feedback: {}
goal: {}
goal_default:
joint_names: null
joint_positions: null
move_group: null
retry: 10
speed: 1
handles: []
result: {}
schema:
description: UniLabJsonCommand moveit_joint_task 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand moveit_joint_task 的参数schema
properties:
joint_names:
description: '参数: joint_names'
type: string
joint_positions:
description: '参数: joint_positions'
type: string
move_group:
description: '参数: move_group'
type: string
retry:
default: 10
description: '参数: retry'
type: string
speed:
default: 1
description: '参数: speed'
type: string
required:
- move_group
- joint_positions
type: object
result: {}
required:
- goal
title: moveit_joint_task 命令参数
type: object
type: UniLabJsonCommand
auto-moveit_task:
feedback: {}
goal: {}
goal_default:
cartesian: false
move_group: null
offsets:
- 0
- 0
- 0
position: null
quaternion: null
retry: 10
speed: 1
target_link: null
handles: []
result: {}
schema:
description: UniLabJsonCommand moveit_task 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand moveit_task 的参数schema
properties:
cartesian:
default: false
description: '参数: cartesian'
type: string
move_group:
description: '参数: move_group'
type: string
offsets:
default:
- 0
- 0
- 0
description: '参数: offsets'
type: string
position:
description: '参数: position'
type: string
quaternion:
description: '参数: quaternion'
type: string
retry:
default: 10
description: '参数: retry'
type: string
speed:
default: 1
description: '参数: speed'
type: string
target_link:
description: '参数: target_link'
type: string
required:
- move_group
- position
- quaternion
type: object
result: {}
required:
- goal
title: moveit_task 命令参数
type: object
type: UniLabJsonCommand
auto-pick_and_place:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: UniLabJsonCommand pick_and_place 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand pick_and_place 的参数schema
properties:
command:
description: '参数: command'
type: string
required:
- command
type: object
result: {}
required:
- goal
title: pick_and_place 命令参数
type: object
type: UniLabJsonCommand
auto-post_init:
feedback: {}
goal: {}
goal_default:
ros_node: null
handles: []
result: {}
schema:
description: UniLabJsonCommand post_init 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand post_init 的参数schema
properties:
ros_node:
description: '参数: ros_node'
type: string
required:
- ros_node
type: object
result: {}
required:
- goal
title: post_init 命令参数
type: object
type: UniLabJsonCommand
auto-resource_manager:
feedback: {}
goal: {}
goal_default:
parent_link: null
resource: null
handles: []
result: {}
schema:
description: UniLabJsonCommand resource_manager 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand resource_manager 的参数schema
properties:
parent_link:
description: '参数: parent_link'
type: string
resource:
description: '参数: resource'
type: string
required:
- resource
- parent_link
type: object
result: {}
required:
- goal
title: resource_manager 命令参数
type: object
type: UniLabJsonCommand
auto-set_position:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: UniLabJsonCommand set_position 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand set_position 的参数schema
properties:
command:
description: '参数: 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: UniLabJsonCommand set_status 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand set_status 的参数schema
properties:
command:
description: '参数: command'
type: string
required:
- command
type: object
result: {}
required:
- goal
title: set_status 命令参数
type: object
type: UniLabJsonCommand
auto-wait_for_resource_action:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand wait_for_resource_action 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand wait_for_resource_action 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: wait_for_resource_action 命令参数
type: object
type: UniLabJsonCommand
pick_and_place:
feedback: {}
goal:
@@ -315,8 +905,22 @@ moveit.toyo_xyz:
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties: {}
required: []
properties:
device_config:
description: '参数: device_config'
type: string
joint_poses:
description: '参数: joint_poses'
type: string
moveit_type:
description: '参数: moveit_type'
type: string
rotation:
description: '参数: rotation'
type: string
required:
- moveit_type
- joint_poses
type: object
result: {}
required:

View File

@@ -224,6 +224,7 @@ solenoid_valve:
type: StrSingleInput
module: unilabos.devices.pump_and_valve.solenoid_valve:SolenoidValve
status_types:
get_valve_position: str
status: str
valve_position: str
type: python
@@ -454,6 +455,7 @@ solenoid_valve.mock:
type: EmptyIn
module: unilabos.devices.pump_and_valve.solenoid_valve_mock:SolenoidValveMock
status_types:
get_valve_position: str
status: str
valve_position: str
type: python
@@ -1087,6 +1089,14 @@ syringe_pump_with_valve.runze:
write: send_command
module: unilabos.devices.pump_and_valve.runze_backbone:RunzeSyringePump
status_types:
get_max_velocity: String
get_plunger_position: String
get_position: String
get_status: String
get_valve_position: str
get_velocity_end: String
get_velocity_grade: String
get_velocity_init: String
max_velocity: float
mode: int
position: float

View File

@@ -1,6 +1,410 @@
gripper.misumi_rz:
class:
action_value_mappings:
auto-data_loop:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand data_loop 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand data_loop 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: data_loop 命令参数
type: object
type: UniLabJsonCommand
auto-data_reader:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand data_reader 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand data_reader 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: data_reader 命令参数
type: object
type: UniLabJsonCommand
auto-gripper_move:
feedback: {}
goal: {}
goal_default:
force: null
pos: null
speed: null
handles: []
result: {}
schema:
description: UniLabJsonCommand gripper_move 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand gripper_move 的参数schema
properties:
force:
description: '参数: force'
type: string
pos:
description: '参数: pos'
type: string
speed:
description: '参数: speed'
type: string
required:
- pos
- speed
- force
type: object
result: {}
required:
- goal
title: gripper_move 命令参数
type: object
type: UniLabJsonCommand
auto-init_gripper:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand init_gripper 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand init_gripper 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: init_gripper 命令参数
type: object
type: UniLabJsonCommand
auto-modbus_crc:
feedback: {}
goal: {}
goal_default:
data: null
handles: []
result: {}
schema:
description: UniLabJsonCommand modbus_crc 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand modbus_crc 的参数schema
properties:
data:
description: '参数: data'
type: string
required:
- data
type: object
result: {}
required:
- goal
title: modbus_crc 命令参数
type: object
type: UniLabJsonCommand
auto-move_and_rotate:
feedback: {}
goal: {}
goal_default:
grasp_F: null
grasp_pos: null
grasp_v: null
spin_F: null
spin_pos: null
spin_v: null
handles: []
result: {}
schema:
description: UniLabJsonCommand move_and_rotate 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand move_and_rotate 的参数schema
properties:
grasp_F:
description: '参数: grasp_F'
type: string
grasp_pos:
description: '参数: grasp_pos'
type: string
grasp_v:
description: '参数: grasp_v'
type: string
spin_F:
description: '参数: spin_F'
type: string
spin_pos:
description: '参数: spin_pos'
type: string
spin_v:
description: '参数: spin_v'
type: string
required:
- spin_pos
- grasp_pos
- spin_v
- grasp_v
- spin_F
- grasp_F
type: object
result: {}
required:
- goal
title: move_and_rotate 命令参数
type: object
type: UniLabJsonCommand
auto-node_gripper_move:
feedback: {}
goal: {}
goal_default:
cmd: null
handles: []
result: {}
schema:
description: UniLabJsonCommand node_gripper_move 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand node_gripper_move 的参数schema
properties:
cmd:
description: '参数: cmd'
type: string
required:
- cmd
type: object
result: {}
required:
- goal
title: node_gripper_move 命令参数
type: object
type: UniLabJsonCommand
auto-node_rotate_move:
feedback: {}
goal: {}
goal_default:
cmd: null
handles: []
result: {}
schema:
description: UniLabJsonCommand node_rotate_move 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand node_rotate_move 的参数schema
properties:
cmd:
description: '参数: cmd'
type: string
required:
- cmd
type: object
result: {}
required:
- goal
title: node_rotate_move 命令参数
type: object
type: UniLabJsonCommand
auto-read_address:
feedback: {}
goal: {}
goal_default:
address: null
data_len: null
id: null
handles: []
result: {}
schema:
description: UniLabJsonCommand read_address 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand read_address 的参数schema
properties:
address:
description: '参数: address'
type: string
data_len:
description: '参数: data_len'
type: string
id:
description: '参数: id'
type: string
required:
- id
- address
- data_len
type: object
result: {}
required:
- goal
title: read_address 命令参数
type: object
type: UniLabJsonCommand
auto-rotate_move_abs:
feedback: {}
goal: {}
goal_default:
force: null
pos: null
speed: null
handles: []
result: {}
schema:
description: UniLabJsonCommand rotate_move_abs 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand rotate_move_abs 的参数schema
properties:
force:
description: '参数: force'
type: string
pos:
description: '参数: pos'
type: string
speed:
description: '参数: speed'
type: string
required:
- pos
- speed
- force
type: object
result: {}
required:
- goal
title: rotate_move_abs 命令参数
type: object
type: UniLabJsonCommand
auto-send_cmd:
feedback: {}
goal: {}
goal_default:
address: null
data: null
fun: null
id: null
handles: []
result: {}
schema:
description: UniLabJsonCommand send_cmd 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand send_cmd 的参数schema
properties:
address:
description: '参数: address'
type: string
data:
description: '参数: data'
type: string
fun:
description: '参数: fun'
type: string
id:
description: '参数: id'
type: string
required:
- id
- fun
- address
- data
type: object
result: {}
required:
- goal
title: send_cmd 命令参数
type: object
type: UniLabJsonCommand
auto-wait_for_gripper:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand wait_for_gripper 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand wait_for_gripper 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: wait_for_gripper 命令参数
type: object
type: UniLabJsonCommand
auto-wait_for_gripper_init:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand wait_for_gripper_init 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand wait_for_gripper_init 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: wait_for_gripper_init 命令参数
type: object
type: UniLabJsonCommand
auto-wait_for_rotate:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand wait_for_rotate 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand wait_for_rotate 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: wait_for_rotate 命令参数
type: object
type: UniLabJsonCommand
execute_command_from_outer:
feedback: {}
goal:
@@ -50,7 +454,7 @@ gripper.misumi_rz:
type: SendCmd
module: unilabos.devices.motor.Grasp:EleGripper
status_types:
status: String
status: str
type: python
description: Misumi RZ gripper
handles: []
@@ -61,8 +465,24 @@ gripper.misumi_rz:
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties: {}
required: []
properties:
baudrate:
default: 115200
description: '参数: baudrate'
type: integer
id:
default: 9
description: '参数: id'
type: integer
port:
description: '参数: port'
type: string
pos_error:
default: -11
description: '参数: pos_error'
type: integer
required:
- port
type: object
result: {}
required:
@@ -72,6 +492,80 @@ gripper.misumi_rz:
gripper.mock:
class:
action_value_mappings:
auto-edit_id:
feedback: {}
goal: {}
goal_default:
params: '{}'
resource:
Gripper1: {}
wf_name: gripper_run
handles: []
result: {}
schema:
description: UniLabJsonCommand edit_id 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand edit_id 的参数schema
properties:
params:
default: '{}'
description: '参数: params'
type: string
resource:
default:
Gripper1: {}
description: '参数: resource'
type: object
wf_name:
default: gripper_run
description: '参数: wf_name'
type: string
required: []
type: object
result: {}
required:
- goal
title: edit_id 命令参数
type: object
type: UniLabJsonCommand
auto-push_to:
feedback: {}
goal: {}
goal_default:
position: null
torque: null
velocity: 0.0
handles: []
result: {}
schema:
description: UniLabJsonCommand push_to 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand push_to 的参数schema
properties:
position:
description: '参数: position'
type: number
torque:
description: '参数: torque'
type: number
velocity:
default: 0.0
description: '参数: velocity'
type: number
required:
- position
- torque
type: object
result: {}
required:
- goal
title: push_to 命令参数
type: object
type: UniLabJsonCommand
push_to:
feedback:
effort: torque
@@ -151,9 +645,10 @@ gripper.mock:
type: GripperCommand
module: unilabos.devices.gripper.mock:MockGripper
status_types:
position: Float64
status: String
torque: Float64
position: float
status: str
torque: float
velocity: float
type: python
description: Mock gripper
handles: []

View File

@@ -1,6 +1,152 @@
linear_motion.grbl:
class:
action_value_mappings:
auto-initialize:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand initialize 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand initialize 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: initialize 命令参数
type: object
type: UniLabJsonCommand
auto-move_through_points:
feedback: {}
goal: {}
goal_default:
positions: null
handles: []
result: {}
schema:
description: UniLabJsonCommand move_through_points 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand move_through_points 的参数schema
properties:
positions:
description: '参数: positions'
type: array
required:
- positions
type: object
result: {}
required:
- goal
title: move_through_points 命令参数
type: object
type: UniLabJsonCommand
auto-set_position:
feedback: {}
goal: {}
goal_default:
position: null
handles: []
result: {}
schema:
description: UniLabJsonCommand set_position 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand set_position 的参数schema
properties:
position:
description: '参数: position'
type: string
required:
- position
type: object
result: {}
required:
- goal
title: set_position 命令参数
type: object
type: UniLabJsonCommand
auto-set_spindle_speed:
feedback: {}
goal: {}
goal_default:
max_velocity: 500
spindle_speed: null
handles: []
result: {}
schema:
description: UniLabJsonCommand set_spindle_speed 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand set_spindle_speed 的参数schema
properties:
max_velocity:
default: 500
description: '参数: max_velocity'
type: number
spindle_speed:
description: '参数: spindle_speed'
type: number
required:
- spindle_speed
type: object
result: {}
required:
- goal
title: set_spindle_speed 命令参数
type: object
type: UniLabJsonCommand
auto-stop_operation:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand stop_operation 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand stop_operation 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: stop_operation 命令参数
type: object
type: UniLabJsonCommand
auto-wait_error:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand wait_error 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand wait_error 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: wait_error 命令参数
type: object
type: UniLabJsonCommandAsync
move_through_points:
feedback:
current_pose.pose.position: position
@@ -347,7 +493,12 @@ linear_motion.grbl:
type: object
type: SingleJointPosition
module: unilabos.devices.cnc.grbl_sync:GrblCNC
status_types: {}
status_types:
get_position: String
get_status: String
position: unilabos.messages:Point3D
spindle_speed: float
status: str
type: python
description: Grbl CNC
handles: []
@@ -358,8 +509,26 @@ linear_motion.grbl:
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties: {}
required: []
properties:
address:
default: '1'
description: '参数: address'
type: string
limits:
default:
- -150
- 150
- -200
- 0
- -80
- 0
description: '参数: limits'
type: string
port:
description: '参数: port'
type: string
required:
- port
type: object
result: {}
required:

View File

@@ -182,7 +182,7 @@ lh_joint_publisher:
speed:
default: 0.1
description: '参数: speed'
type: number
type: string
x:
description: '参数: x'
type: string
@@ -268,7 +268,7 @@ lh_joint_publisher:
properties:
channels:
description: '参数: channels'
type: string
type: array
link_name:
description: '参数: link_name'
type: string
@@ -306,7 +306,7 @@ lh_joint_publisher:
type: string
resource_id_list:
description: '参数: resource_id_list'
type: string
type: array
required:
- resource_id_list
- link_name

View File

@@ -614,6 +614,8 @@ heaterstirrer.dalong:
type: SendCmd
module: unilabos.devices.heaterstirrer.dalong:HeaterStirrer_DaLong
status_types:
get_status: str
get_temp: String
status: str
stir_speed: float
temp: float

View File

@@ -247,6 +247,7 @@ gas_source.mock:
type: StrSingleInput
module: unilabos.devices.pump_and_valve.vacuum_pump_mock:VacuumPumpMock
status_types:
get_status: str
status: str
type: python
description: Mock gas source
@@ -525,6 +526,7 @@ vacuum_pump.mock:
type: StrSingleInput
module: unilabos.devices.pump_and_valve.vacuum_pump_mock:VacuumPumpMock
status_types:
get_status: str
status: str
type: python
description: Mock vacuum pump

File diff suppressed because it is too large Load Diff

View File

@@ -2298,6 +2298,42 @@ workstation:
title: create_ros_action_server 命令参数
type: object
type: UniLabJsonCommand
auto-execute_single_action:
feedback: {}
goal: {}
goal_default:
action_kwargs: null
action_name: null
device_id: null
handles: []
result: {}
schema:
description: UniLabJsonCommand execute_single_action 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand execute_single_action 的参数schema
properties:
action_kwargs:
description: '参数: action_kwargs'
type: string
action_name:
description: '参数: action_name'
type: string
device_id:
description: '参数: device_id'
type: string
required:
- device_id
- action_name
- action_kwargs
type: object
result: {}
required:
- goal
title: execute_single_action 命令参数
type: object
type: UniLabJsonCommandAsync
auto-initialize_device:
feedback: {}
goal: {}
@@ -2342,12 +2378,18 @@ workstation:
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties:
args:
description: '参数: args'
type: string
children:
description: '参数: children'
type: object
device_id:
description: '参数: device_id'
type: string
kwargs:
description: '参数: kwargs'
type: string
protocol_type:
description: '参数: protocol_type'
type: string
@@ -2359,6 +2401,8 @@ workstation:
- children
- protocol_type
- resource_tracker
- args
- kwargs
type: object
result: {}
required:

View File

@@ -226,6 +226,7 @@ zhida_hplc:
type: StrSingleInput
module: unilabos.devices.zhida_hplc.zhida:ZhidaClient
status_types:
get_methods: dict
status: dict
type: python
description: Zhida HPLC

View File

@@ -190,7 +190,9 @@ class Registry:
logger.error(f"[UniLab Registry] 无法找到类型 '{type_name}' 用于设备 {device_id}{field_name}")
sys.exit(1)
def _generate_unilab_json_command_schema(self, method_args: List[Dict[str, Any]], method_name: str) -> Dict[str, Any]:
def _generate_unilab_json_command_schema(
self, method_args: List[Dict[str, Any]], method_name: str
) -> Dict[str, Any]:
"""
根据UniLabJsonCommand方法信息生成JSON Schema暂不支持嵌套类型
@@ -302,6 +304,7 @@ class Registry:
for status_name, status_type in device_config["class"]["status_types"].items():
if status_type in ["Any", "None"]:
status_type = "String" # 替换成ROS的String便于显示
device_config["class"]["status_types"][status_name] = status_type
target_type = self._replace_type_with_class(status_type, device_id, f"状态 {status_name}")
status_str_type_mapping[status_type] = target_type
device_config["class"]["status_types"] = dict(
@@ -322,7 +325,9 @@ class Registry:
for k, v in enhanced_info["action_methods"].items()
}
)
device_config["init_param_schema"] = self._generate_unilab_json_command_schema(enhanced_info["init_params"], "__init__")
device_config["init_param_schema"] = self._generate_unilab_json_command_schema(
enhanced_info["init_params"], "__init__"
)
device_config.pop("schema", None)
device_config["class"]["action_value_mappings"] = dict(
sorted(device_config["class"]["action_value_mappings"].items())
@@ -398,7 +403,28 @@ class Registry:
def obtain_registry_device_info(self):
devices = []
for device_id, device_info in self.device_type_registry.items():
msg = {"id": device_id, **device_info}
device_info_copy = copy.deepcopy(device_info)
if "class" in device_info_copy and "action_value_mappings" in device_info_copy["class"]:
action_mappings = device_info_copy["class"]["action_value_mappings"]
for action_name, action_config in action_mappings.items():
if "schema" in action_config and action_config["schema"]:
schema = action_config["schema"]
# 确保schema结构存在
if (
"properties" in schema
and "goal" in schema["properties"]
and "properties" in schema["properties"]["goal"]
):
schema["properties"]["goal"]["properties"] = {
"unilabos_device_id": {
"type": "string",
"default": "",
"description": "UniLabOS设备ID用于指定执行动作的具体设备实例",
},
**schema["properties"]["goal"]["properties"],
}
msg = {"id": device_id, **device_info_copy}
devices.append(msg)
return devices

View File

@@ -168,10 +168,9 @@ class ROS2ProtocolNode(BaseROS2DeviceNode):
execution_error = ""
execution_success = False
protocol_return_value = None
self.get_logger().info(f"Executing {protocol_name} action...")
action_value_mapping = self._action_value_mappings[protocol_name]
try:
self.get_logger().info(f"Executing {protocol_name} action...")
action_value_mapping = self._action_value_mappings[protocol_name]
print("+" * 30)
print(protocol_steps_generator)
# 从目标消息中提取参数, 并调用Protocol生成器(根据设备连接图)生成action步骤

View File

@@ -207,7 +207,6 @@ class ImportManager:
dynamic_info = None
if use_dynamic:
try:
raise ValueError("强制使用动态导入") # 强制使用动态导入以测试功能
dynamic_info = self._get_dynamic_class_info(module_path)
result["dynamic_import_success"] = True
logger.debug(f"[ImportManager] 动态导入类 {module_path} 成功")
@@ -242,7 +241,7 @@ class ImportManager:
result = {
"class_name": class_name,
"init_params": {},
"init_params": [],
"status_methods": {},
"action_methods": {},
}
@@ -268,10 +267,10 @@ class ImportManager:
"required": param.default == inspect.Parameter.empty,
"default": param_default,
}
result["init_params"][param_name] = param_info
result["init_params"].append(param_info)
# 分析类的所有成员
for name, method in inspect.getmembers(cls):
for name, method in cls.__dict__.items():
if name.startswith("_"):
continue
@@ -551,7 +550,7 @@ class ImportManager:
if i >= num_required:
default_index = i - num_required
if default_index < len(defaults):
default_value: Constant = defaults[default_index]
default_value: Constant = defaults[default_index] # type: ignore
assert isinstance(default_value, Constant), "暂不支持对非常量类型进行推断,可反馈开源仓库"
arg_info["default"] = default_value.value
# 如果没有类型注解,尝试从默认值推断类型
@@ -565,7 +564,6 @@ class ImportManager:
return method_info
def _infer_type_from_default(self, node: ast.AST) -> Optional[str]:
"""从默认值推断参数类型"""
if isinstance(node, ast.Constant):
@@ -594,11 +592,6 @@ class ImportManager:
return "Optional[Any]"
elif node.id in ["True", "False"]:
return "bool"
elif isinstance(node, ast.Attribute):
# 处理类似 os.path.join 的情况
attr_str = self._extract_default_value(node)
if "path" in attr_str.lower():
return "str"
return None