新增注册表补全功能,修复Protocol执行失败

This commit is contained in:
Xuwznln
2025-06-27 23:45:05 +08:00
parent f9a9e91d56
commit bbc49e9aab
39 changed files with 21761 additions and 3336 deletions

View File

@@ -1,10 +1,10 @@
io_snrd:
description: IO Board with 16 IOs
class:
module: ilabos.device_comms.SRND_16_IO:SRND_16_IO
type: python
hardware_interface:
name: modbus_client
extra_info: []
read: read_io_coil
write: write_io_coil
#io_snrd:
# description: IO Board with 16 IOs
# class:
# module: unilabos.device_comms.SRND_16_IO:SRND_16_IO
# type: python
# hardware_interface:
# name: modbus_client
# extra_info: []
# read: read_io_coil
# write: write_io_coil

View File

@@ -1,7 +1,117 @@
serial:
description: Serial communication interface, used when sharing same serial port for multiple devices
class:
action_value_mappings:
auto-handle_serial_request:
feedback: {}
goal: {}
goal_default:
request: null
response: null
handles: []
result: {}
schema:
description: UniLabJsonCommand handle_serial_request 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand handle_serial_request 的参数schema
properties:
request:
description: '参数: request'
type: string
response:
description: '参数: response'
type: string
required:
- request
- response
type: object
result: {}
required:
- goal
title: handle_serial_request 命令参数
type: object
type: UniLabJsonCommand
auto-read_data:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand read_data 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand read_data 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: read_data 命令参数
type: object
type: UniLabJsonCommand
auto-send_command:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: UniLabJsonCommand send_command 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand send_command 的参数schema
properties:
command:
description: '参数: command'
type: string
required:
- command
type: object
result: {}
required:
- goal
title: send_command 命令参数
type: object
type: UniLabJsonCommand
module: unilabos.ros.nodes.presets.serial_node:ROS2SerialNode
status_types: {}
type: ros2
schema:
properties: {}
description: Serial communication interface, used when sharing same serial port
for multiple devices
handles: []
icon: ''
init_param_schema:
description: UniLabJsonCommand __init__ 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties:
baudrate:
default: 9600
description: '参数: baudrate'
type: integer
device_id:
description: '参数: device_id'
type: string
port:
description: '参数: port'
type: string
resource_tracker:
description: '参数: resource_tracker'
type: string
required:
- device_id
- port
type: object
result: {}
required:
- goal
title: __init__ 命令参数
type: object

View File

@@ -1,67 +0,0 @@
# 光学表征设备:红外、紫外可见、拉曼等
raman_home_made:
description: Raman spectroscopy device
class:
module: unilabos.devices.raman_uv.home_made_raman:RamanObj
type: python
status_types:
status: String
action_value_mappings:
raman_cmd:
type: SendCmd
goal:
command: command
feedback: {}
result:
success: success
schema:
properties:
status:
type: string
required:
- status
additionalProperties: false
type: object
hplc.agilent:
description: HPLC device
class:
module: unilabos.devices.hplc.AgilentHPLC:HPLCDriver
type: python
status_types:
device_status: String
could_run: Bool
driver_init_ok: Bool
is_running: Bool
finish_status: String
status_text: String
action_value_mappings:
execute_command_from_outer:
type: SendCmd
goal:
command: command
feedback: {}
result:
success: success
schema:
properties:
device_status:
type: string
could_run:
type: boolean
driver_init_ok:
type: boolean
is_running:
type: boolean
finish_status:
type: string
status_text:
type: string
required:
- device_status
- could_run
- driver_init_ok
- is_running
- finish_status
- status_text
additionalProperties: false
type: object

View File

@@ -1,9 +1,55 @@
hotel.thermo_orbitor_rs2_hotel:
description: Thermo Orbitor RS2 Hotel
class:
class:
action_value_mappings:
auto-get_rotation:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand get_rotation 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand get_rotation 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: get_rotation 命令参数
type: object
type: UniLabJsonCommand
module: unilabos.devices.resource_container.container:HotelContainer
status_types: {}
type: python
description: Thermo Orbitor RS2 Hotel
handles: []
icon: ''
init_param_schema:
description: UniLabJsonCommand __init__ 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties:
device_config:
description: '参数: device_config'
type: object
rotation:
description: '参数: rotation'
type: object
required:
- rotation
- device_config
type: object
result: {}
required:
- goal
title: __init__ 命令参数
type: object
model:
type: device
mesh: thermo_orbitor_rs2_hotel
type: device

View File

@@ -1,56 +1,608 @@
laiyu_add_solid:
description: Laiyu Add Solid
class:
module: unilabos.devices.laiyu_add_solid.laiyu:Laiyu
type: python
status_types: {}
action_value_mappings:
add_powder_tube:
feedback: {}
goal:
compound_mass: compound_mass
powder_tube_number: powder_tube_number
target_tube_position: target_tube_position
goal_default:
compound_mass: 0.0
powder_tube_number: 0
target_tube_position: ''
handles: []
result:
actual_mass_mg: actual_mass_mg
schema:
description: ROS Action SolidDispenseAddPowderTube 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {}
required: []
title: SolidDispenseAddPowderTube_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties:
compound_mass:
type: number
powder_tube_number:
maximum: 2147483647
minimum: -2147483648
type: integer
target_tube_position:
type: string
required:
- powder_tube_number
- target_tube_position
- compound_mass
title: SolidDispenseAddPowderTube_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties:
actual_mass_mg:
type: number
return_info:
type: string
success:
type: boolean
required:
- return_info
- actual_mass_mg
- success
title: SolidDispenseAddPowderTube_Result
type: object
required:
- goal
title: SolidDispenseAddPowderTube
type: object
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: UniLabJsonCommand add_powder_tube 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand add_powder_tube 的参数schema
properties:
compound_mass:
description: '参数: compound_mass'
type: string
powder_tube_number:
description: '参数: powder_tube_number'
type: string
target_tube_position:
description: '参数: 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:
feedback: {}
goal: {}
goal_default:
data: null
handles: []
result: {}
schema:
description: UniLabJsonCommand calculate_crc 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand calculate_crc 的参数schema
properties:
data:
description: '参数: data'
type: string
required:
- data
type: object
result: {}
required:
- goal
title: calculate_crc 命令参数
type: object
type: UniLabJsonCommand
auto-discharge:
feedback: {}
goal: {}
goal_default:
float_in: null
handles: []
result: {}
schema:
description: UniLabJsonCommand discharge 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand discharge 的参数schema
properties:
float_in:
description: '参数: 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: UniLabJsonCommand move_to_plate 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand move_to_plate 的参数schema
properties:
string:
description: '参数: 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: UniLabJsonCommand move_to_xyz 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand move_to_xyz 的参数schema
properties:
x:
description: '参数: x'
type: number
y:
description: '参数: y'
type: number
z:
description: '参数: 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: UniLabJsonCommand pick_powder_tube 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand pick_powder_tube 的参数schema
properties:
int_input:
description: '参数: 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: UniLabJsonCommand put_powder_tube 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand put_powder_tube 的参数schema
properties:
int_input:
description: '参数: 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: UniLabJsonCommand reset 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand reset 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: reset 命令参数
type: object
type: UniLabJsonCommand
auto-send_command:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: UniLabJsonCommand send_command 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand send_command 的参数schema
properties:
command:
description: '参数: command'
type: string
required:
- command
type: object
result: {}
required:
- goal
title: send_command 命令参数
type: object
type: UniLabJsonCommand
discharge:
feedback: {}
goal:
float_input: float_input
goal_default:
float_in: 0.0
handles: []
result: {}
schema:
description: ROS Action FloatSingleInput 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {}
required: []
title: FloatSingleInput_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties:
float_in:
type: number
required:
- float_in
title: FloatSingleInput_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties:
return_info:
type: string
success:
type: boolean
required:
- return_info
- success
title: FloatSingleInput_Result
type: object
required:
- goal
title: FloatSingleInput
type: object
type: FloatSingleInput
move_to_plate:
feedback: {}
goal:
string: string
goal_default:
string: ''
handles: []
result: {}
schema:
description: ROS Action StrSingleInput 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {}
required: []
title: StrSingleInput_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties:
string:
type: string
required:
- string
title: StrSingleInput_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties:
return_info:
type: string
success:
type: boolean
required:
- return_info
- success
title: StrSingleInput_Result
type: object
required:
- goal
title: StrSingleInput
type: object
type: StrSingleInput
move_to_xyz:
type: Point3DSeparateInput
feedback: {}
goal:
x: x
y: y
z: z
feedback: {}
goal_default:
x: 0.0
y: 0.0
z: 0.0
handles: []
result: {}
schema:
description: ROS Action Point3DSeparateInput 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {}
required: []
title: Point3DSeparateInput_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties:
x:
type: number
y:
type: number
z:
type: number
required:
- x
- y
- z
title: Point3DSeparateInput_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties:
return_info:
type: string
success:
type: boolean
required:
- return_info
- success
title: Point3DSeparateInput_Result
type: object
required:
- goal
title: Point3DSeparateInput
type: object
type: Point3DSeparateInput
pick_powder_tube:
type: IntSingleInput
feedback: {}
goal:
int_input: int_input
feedback: {}
goal_default:
int_input: 0
handles: []
result: {}
schema:
description: ROS Action IntSingleInput 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {}
required: []
title: IntSingleInput_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties:
int_input:
maximum: 2147483647
minimum: -2147483648
type: integer
required:
- int_input
title: IntSingleInput_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties:
return_info:
type: string
success:
type: boolean
required:
- return_info
- success
title: IntSingleInput_Result
type: object
required:
- goal
title: IntSingleInput
type: object
type: IntSingleInput
put_powder_tube:
type: IntSingleInput
feedback: {}
goal:
int_input: int_input
feedback: {}
goal_default:
int_input: 0
handles: []
result: {}
schema:
description: ROS Action IntSingleInput 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {}
required: []
title: IntSingleInput_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties:
int_input:
maximum: 2147483647
minimum: -2147483648
type: integer
required:
- int_input
title: IntSingleInput_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties:
return_info:
type: string
success:
type: boolean
required:
- return_info
- success
title: IntSingleInput_Result
type: object
required:
- goal
title: IntSingleInput
type: object
type: IntSingleInput
reset:
type: EmptyIn
feedback: {}
goal: {}
feedback: {}
goal_default: {}
handles: []
result: {}
add_powder_tube:
type: SolidDispenseAddPowderTube
goal:
powder_tube_number: powder_tube_number
target_tube_position: target_tube_position
compound_mass: compound_mass
feedback: {}
result:
actual_mass_mg: actual_mass_mg
move_to_plate:
type: StrSingleInput
goal:
string: string
feedback: {}
result: {}
discharge:
type: FloatSingleInput
goal:
float_input: float_input
feedback: {}
result: {}
schema:
properties: {}
schema:
description: ROS Action EmptyIn 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {}
required: []
title: EmptyIn_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties: {}
required: []
title: EmptyIn_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties:
return_info:
type: string
required:
- return_info
title: EmptyIn_Result
type: object
required:
- goal
title: EmptyIn
type: object
type: EmptyIn
module: unilabos.devices.laiyu_add_solid.laiyu:Laiyu
status_types:
status: str
type: python
description: Laiyu Add Solid
handles: []
icon: ''
init_param_schema:
description: UniLabJsonCommand __init__ 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties:
baudrate:
default: 115200
description: '参数: baudrate'
type: integer
port:
description: '参数: port'
type: string
timeout:
default: 0.5
description: '参数: timeout'
type: number
required:
- port
type: object
result: {}
required:
- goal
title: __init__ 命令参数
type: object

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,56 +1,328 @@
moveit.toyo_xyz:
description: Toyo XYZ
class:
module: unilabos.devices.ros_dev.moveit_interface:MoveitInterface
type: python
action_value_mappings:
set_position:
type: SendCmd
goal:
command: command
feedback: { }
result: { }
pick_and_place:
type: SendCmd
goal:
command: command
feedback: { }
result: { }
set_status:
type: SendCmd
goal:
command: command
feedback: { }
result: { }
model:
type: device
mesh: toyo_xyz
moveit.arm_slider:
description: Arm with Slider
model:
type: device
mesh: arm_slider
class:
module: unilabos.devices.ros_dev.moveit_interface:MoveitInterface
type: python
action_value_mappings:
set_position:
type: SendCmd
goal:
command: command
feedback: {}
result: {}
pick_and_place:
type: SendCmd
feedback: {}
goal:
command: command
feedback: {}
goal_default:
command: ''
handles: []
result: {}
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
set_position:
feedback: {}
goal:
command: command
goal_default:
command: ''
handles: []
result: {}
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
set_status:
type: SendCmd
feedback: {}
goal:
command: command
feedback: {}
goal_default:
command: ''
handles: []
result: {}
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.ros_dev.moveit_interface:MoveitInterface
status_types: {}
type: python
description: Arm with Slider
handles: []
icon: ''
init_param_schema:
description: UniLabJsonCommand __init__ 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: __init__ 命令参数
type: object
model:
mesh: arm_slider
type: device
moveit.toyo_xyz:
class:
action_value_mappings:
pick_and_place:
feedback: {}
goal:
command: command
goal_default:
command: ''
handles: []
result: {}
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
set_position:
feedback: {}
goal:
command: command
goal_default:
command: ''
handles: []
result: {}
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
set_status:
feedback: {}
goal:
command: command
goal_default:
command: ''
handles: []
result: {}
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.ros_dev.moveit_interface:MoveitInterface
status_types: {}
type: python
description: Toyo XYZ
handles: []
icon: ''
init_param_schema:
description: UniLabJsonCommand __init__ 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: __init__ 命令参数
type: object
model:
mesh: toyo_xyz
type: device

View File

@@ -1,73 +1,492 @@
separator.homemade:
description: Separator device with homemade grbl controller
class:
module: unilabos.devices.separator.homemade_grbl_conductivity:SeparatorController
type: python
status_types:
sensordata: Float64
status: String
action_value_mappings:
stir:
type: Stir
goal:
stir_time: stir_time,
stir_speed: stir_speed
settling_time: settling_time
feedback:
status: status
result:
success: success
valve_open_cmd:
type: SendCmd
goal:
command: command
feedback:
status: status
result":
success: success
schema:
type: object
properties:
status:
type: string
description: The status of the device
sensordata:
type: number
description: 电导传感器数据
required:
- status
- sensordata
additionalProperties: false
rotavap.one:
description: Rotavap device
class:
action_value_mappings:
auto-cmd_write:
feedback: {}
goal: {}
goal_default:
cmd: null
handles: []
result: {}
schema:
description: UniLabJsonCommand cmd_write 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand cmd_write 的参数schema
properties:
cmd:
description: '参数: cmd'
type: string
required:
- cmd
type: object
result: {}
required:
- goal
title: cmd_write 命令参数
type: object
type: UniLabJsonCommand
auto-main_loop:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand main_loop 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand main_loop 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: main_loop 命令参数
type: object
type: UniLabJsonCommand
auto-set_pump_time:
feedback: {}
goal: {}
goal_default:
time: null
handles: []
result: {}
schema:
description: UniLabJsonCommand set_pump_time 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand set_pump_time 的参数schema
properties:
time:
description: '参数: time'
type: string
required:
- time
type: object
result: {}
required:
- goal
title: set_pump_time 命令参数
type: object
type: UniLabJsonCommand
auto-set_rotate_time:
feedback: {}
goal: {}
goal_default:
time: null
handles: []
result: {}
schema:
description: UniLabJsonCommand set_rotate_time 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand set_rotate_time 的参数schema
properties:
time:
description: '参数: time'
type: string
required:
- time
type: object
result: {}
required:
- goal
title: set_rotate_time 命令参数
type: object
type: UniLabJsonCommand
auto-set_timer:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: UniLabJsonCommand set_timer 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand set_timer 的参数schema
properties:
command:
description: '参数: command'
type: string
required:
- command
type: object
result: {}
required:
- goal
title: set_timer 命令参数
type: object
type: UniLabJsonCommand
set_timer:
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.rotavap.rotavap_one:RotavapOne
type: python
status_types:
pump_time: Float64
rotate_time: Float64
type: python
description: Rotavap device
handles: []
icon: ''
init_param_schema:
description: UniLabJsonCommand __init__ 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties:
port:
description: '参数: port'
type: string
rate:
default: 9600
description: '参数: rate'
type: integer
required:
- port
type: object
result: {}
required:
- goal
title: __init__ 命令参数
type: object
separator.homemade:
class:
action_value_mappings:
set_timer:
type: SendCmd
goal:
command: command
auto-read_sensor_loop:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand read_sensor_loop 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand read_sensor_loop 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: read_sensor_loop 命令参数
type: object
type: UniLabJsonCommand
auto-stir:
feedback: {}
goal: {}
goal_default:
settling_time: 10
stir_speed: 300
stir_time: 10
handles: []
result: {}
schema:
description: UniLabJsonCommand stir 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand stir 的参数schema
properties:
settling_time:
default: 10
description: '参数: settling_time'
type: number
stir_speed:
default: 300
description: '参数: stir_speed'
type: number
stir_time:
default: 10
description: '参数: stir_time'
type: number
required: []
type: object
result: {}
required:
- goal
title: stir 命令参数
type: object
type: UniLabJsonCommand
auto-valve_open:
feedback: {}
goal: {}
goal_default:
condition: null
value: null
handles: []
result: {}
schema:
description: UniLabJsonCommand valve_open 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand valve_open 的参数schema
properties:
condition:
description: '参数: condition'
type: string
value:
description: '参数: value'
type: string
required:
- condition
- value
type: object
result: {}
required:
- goal
title: valve_open 命令参数
type: object
type: UniLabJsonCommand
auto-valve_open_cmd:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: UniLabJsonCommand valve_open_cmd 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand valve_open_cmd 的参数schema
properties:
command:
description: '参数: command'
type: string
required:
- command
type: object
result: {}
required:
- goal
title: valve_open_cmd 命令参数
type: object
type: UniLabJsonCommand
auto-write:
feedback: {}
goal: {}
goal_default:
data: null
handles: []
result: {}
schema:
description: UniLabJsonCommand write 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand write 的参数schema
properties:
data:
description: '参数: data'
type: string
required:
- data
type: object
result: {}
required:
- goal
title: write 命令参数
type: object
type: UniLabJsonCommand
stir:
feedback:
status: status
goal:
settling_time: settling_time
stir_speed: stir_speed
stir_time: stir_time,
goal_default:
settling_time: 0.0
stir_speed: 0.0
stir_time: 0.0
handles: []
result:
success: success
schema:
type: object
schema:
description: ROS Action Stir 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties:
status:
type: string
required:
- status
title: Stir_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties:
settling_time:
type: number
stir_speed:
type: number
stir_time:
type: number
required:
- stir_time
- stir_speed
- settling_time
title: Stir_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties:
return_info:
type: string
success:
type: boolean
required:
- return_info
- success
title: Stir_Result
type: object
required:
- goal
title: Stir
type: object
type: Stir
valve_open_cmd:
feedback:
status: status
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.separator.homemade_grbl_conductivity:SeparatorController
status_types:
sensordata: Float64
status: String
type: python
description: Separator device with homemade grbl controller
handles: []
icon: ''
init_param_schema:
description: UniLabJsonCommand __init__ 的参数schema
properties:
temperature:
type: number
description: 旋蒸水浴温度
pump_time:
type: number
description: The pump time of the device
rotate_time:
type: number
description: The rotate time of the device
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties:
baudrate_executor:
default: 115200
description: '参数: baudrate_executor'
type: integer
baudrate_sensor:
default: 115200
description: '参数: baudrate_sensor'
type: integer
port_executor:
description: '参数: port_executor'
type: string
port_sensor:
description: '参数: port_sensor'
type: string
required:
- port_executor
- port_sensor
type: object
result: {}
required:
- pump_time
- rotate_time
additionalProperties: false
- goal
title: __init__ 命令参数
type: object

File diff suppressed because it is too large Load Diff

View File

@@ -1,29 +1,138 @@
# 仙工智能底盘(知行使用)
agv.SEER:
description: SEER AGV
class:
module: unilabos.devices.agv.agv_navigator:AgvNavigator
type: python
status_types:
pose: Float64MultiArray
status: String
action_value_mappings:
auto-send:
feedback: {}
goal: {}
goal_default:
cmd: null
ex_data: ''
obj: receive_socket
handles: []
result: {}
schema:
description: UniLabJsonCommand send 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand send 的参数schema
properties:
cmd:
description: '参数: cmd'
type: string
ex_data:
default: ''
description: '参数: ex_data'
type: string
obj:
default: receive_socket
description: '参数: obj'
type: string
required:
- cmd
type: object
result: {}
required:
- goal
title: send 命令参数
type: object
type: UniLabJsonCommand
auto-send_nav_task:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: UniLabJsonCommand send_nav_task 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand send_nav_task 的参数schema
properties:
command:
description: '参数: command'
type: string
required:
- command
type: object
result: {}
required:
- goal
title: send_nav_task 命令参数
type: object
type: UniLabJsonCommand
send_nav_task:
type: SendCmd
feedback: {}
goal:
command: command
feedback: {}
goal_default:
command: ''
handles: []
result:
success: success
schema:
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.agv.agv_navigator:AgvNavigator
status_types:
pose: list
status: str
type: python
description: SEER AGV
handles: []
icon: ''
init_param_schema:
description: UniLabJsonCommand __init__ 的参数schema
properties:
pose:
type: array
items:
type: number
status:
type: string
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties:
host:
description: '参数: host'
type: string
required:
- host
type: object
result: {}
required:
- status
additionalProperties: false
type: object
- goal
title: __init__ 命令参数
type: object

View File

@@ -1,37 +1,202 @@
robotic_arm.UR:
description: UR robotic arm
class:
module: unilabos.devices.agv.ur_arm_task:UrArmTask
type: python
status_types:
arm_pose: Float64MultiArray
gripper_pose: Float64
arm_status: String
gripper_status: String
action_value_mappings:
auto-arm_init:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand arm_init 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand arm_init 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: arm_init 命令参数
type: object
type: UniLabJsonCommand
auto-load_pose_data:
feedback: {}
goal: {}
goal_default:
data: null
handles: []
result: {}
schema:
description: UniLabJsonCommand load_pose_data 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand load_pose_data 的参数schema
properties:
data:
description: '参数: data'
type: string
required:
- data
type: object
result: {}
required:
- goal
title: load_pose_data 命令参数
type: object
type: UniLabJsonCommand
auto-load_pose_file:
feedback: {}
goal: {}
goal_default:
file: null
handles: []
result: {}
schema:
description: UniLabJsonCommand load_pose_file 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand load_pose_file 的参数schema
properties:
file:
description: '参数: file'
type: string
required:
- file
type: object
result: {}
required:
- goal
title: load_pose_file 命令参数
type: object
type: UniLabJsonCommand
auto-move_pos_task:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: UniLabJsonCommand move_pos_task 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand move_pos_task 的参数schema
properties:
command:
description: '参数: command'
type: string
required:
- command
type: object
result: {}
required:
- goal
title: move_pos_task 命令参数
type: object
type: UniLabJsonCommand
auto-reload_pose:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand reload_pose 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand reload_pose 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: reload_pose 命令参数
type: object
type: UniLabJsonCommand
move_pos_task:
type: SendCmd
feedback: {}
goal:
command: command
feedback: {}
goal_default:
command: ''
handles: []
result:
success: success
schema:
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.agv.ur_arm_task:UrArmTask
status_types:
arm_pose: list
arm_status: str
gripper_pose: float
gripper_status: str
type: python
description: UR robotic arm
handles: []
icon: ''
init_param_schema:
description: UniLabJsonCommand __init__ 的参数schema
properties:
arm_pose:
type: array
items:
type: number
gripper_pose:
type: number
arm_status:
type: string
description: 机械臂设备状态
gripper_status:
type: string
description: 机械爪设备状态
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties:
host:
description: '参数: host'
type: string
retry:
default: 30
description: '参数: retry'
type: integer
required:
- host
type: object
result: {}
required:
- arm_status
- gripper_status
additionalProperties: false
type: object
- goal
title: __init__ 命令参数
type: object

View File

@@ -1,37 +1,174 @@
gripper.mock:
description: Mock gripper
class:
module: unilabos.devices.gripper.mock:MockGripper
type: python
status_types:
position: Float64
torque: Float64
status: String
action_value_mappings:
push_to:
type: GripperCommand
goal:
command.position: position
command.max_effort: torque
feedback:
position: position
effort: torque
result:
position: position
effort: torque
gripper.misumi_rz:
description: Misumi RZ gripper
class:
module: unilabos.devices.motor:Grasp.EleGripper
type: python
status_types:
status: String
action_value_mappings:
execute_command_from_outer:
type: SendCmd
feedback: {}
goal:
command: command
feedback: {}
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.motor.Grasp:EleGripper
status_types:
status: String
type: python
description: Misumi RZ gripper
handles: []
icon: ''
init_param_schema:
description: UniLabJsonCommand __init__ 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: __init__ 命令参数
type: object
gripper.mock:
class:
action_value_mappings:
push_to:
feedback:
effort: torque
position: position
goal:
command.max_effort: torque
command.position: position
goal_default:
command:
max_effort: 0.0
position: 0.0
handles: []
result:
effort: torque
position: position
schema:
description: ROS Action GripperCommand 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties:
effort:
type: number
position:
type: number
reached_goal:
type: boolean
stalled:
type: boolean
required:
- position
- effort
- stalled
- reached_goal
title: GripperCommand_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties:
command:
properties:
max_effort:
type: number
position:
type: number
required:
- position
- max_effort
title: GripperCommand
type: object
required:
- command
title: GripperCommand_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties:
effort:
type: number
position:
type: number
reached_goal:
type: boolean
stalled:
type: boolean
required:
- position
- effort
- stalled
- reached_goal
title: GripperCommand_Result
type: object
required:
- goal
title: GripperCommand
type: object
type: GripperCommand
module: unilabos.devices.gripper.mock:MockGripper
status_types:
position: Float64
status: String
torque: Float64
type: python
description: Mock gripper
handles: []
icon: ''
init_param_schema:
description: UniLabJsonCommand __init__ 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: __init__ 命令参数
type: object

View File

@@ -1,57 +1,542 @@
linear_motion.grbl:
description: Grbl CNC
class:
module: unilabos.devices.cnc.grbl_sync:GrblCNC
type: python
action_value_mappings:
move_through_points: &move_through_points
type: NavigateThroughPoses
goal:
poses[].pose.position: positions[]
feedback:
move_through_points:
feedback:
current_pose.pose.position: position
navigation_time.sec: time_spent
estimated_time_remaining.sec: time_remaining
navigation_time.sec: time_spent
number_of_poses_remaining: pose_number_remaining
result: {}
set_spindle_speed:
type: SingleJointPosition
goal:
position: spindle_speed
poses[].pose.position: positions[]
goal_default:
behavior_tree: ''
poses:
- header:
frame_id: ''
stamp:
nanosec: 0
sec: 0
pose:
orientation:
w: 1.0
x: 0.0
y: 0.0
z: 0.0
position:
x: 0.0
y: 0.0
z: 0.0
handles: []
result: {}
schema:
description: ROS Action NavigateThroughPoses 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties:
current_pose:
properties:
header:
properties:
frame_id:
type: string
stamp:
properties:
nanosec:
maximum: 4294967295
minimum: 0
type: integer
sec:
maximum: 2147483647
minimum: -2147483648
type: integer
required:
- sec
- nanosec
title: Time
type: object
required:
- stamp
- frame_id
title: Header
type: object
pose:
properties:
orientation:
properties:
w:
type: number
x:
type: number
y:
type: number
z:
type: number
required:
- x
- y
- z
- w
title: Quaternion
type: object
position:
properties:
x:
type: number
y:
type: number
z:
type: number
required:
- x
- y
- z
title: Point
type: object
required:
- position
- orientation
title: Pose
type: object
required:
- header
- pose
title: PoseStamped
type: object
distance_remaining:
type: number
estimated_time_remaining:
properties:
nanosec:
maximum: 4294967295
minimum: 0
type: integer
sec:
maximum: 2147483647
minimum: -2147483648
type: integer
required:
- sec
- nanosec
title: Duration
type: object
navigation_time:
properties:
nanosec:
maximum: 4294967295
minimum: 0
type: integer
sec:
maximum: 2147483647
minimum: -2147483648
type: integer
required:
- sec
- nanosec
title: Duration
type: object
number_of_poses_remaining:
maximum: 32767
minimum: -32768
type: integer
number_of_recoveries:
maximum: 32767
minimum: -32768
type: integer
required:
- current_pose
- navigation_time
- estimated_time_remaining
- number_of_recoveries
- distance_remaining
- number_of_poses_remaining
title: NavigateThroughPoses_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties:
behavior_tree:
type: string
poses:
items:
properties:
header:
properties:
frame_id:
type: string
stamp:
properties:
nanosec:
maximum: 4294967295
minimum: 0
type: integer
sec:
maximum: 2147483647
minimum: -2147483648
type: integer
required:
- sec
- nanosec
title: Time
type: object
required:
- stamp
- frame_id
title: Header
type: object
pose:
properties:
orientation:
properties:
w:
type: number
x:
type: number
y:
type: number
z:
type: number
required:
- x
- y
- z
- w
title: Quaternion
type: object
position:
properties:
x:
type: number
y:
type: number
z:
type: number
required:
- x
- y
- z
title: Point
type: object
required:
- position
- orientation
title: Pose
type: object
required:
- header
- pose
title: PoseStamped
type: object
type: array
required:
- poses
- behavior_tree
title: NavigateThroughPoses_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties:
result:
properties: {}
required: []
title: Empty
type: object
required:
- result
title: NavigateThroughPoses_Result
type: object
required:
- goal
title: NavigateThroughPoses
type: object
type: NavigateThroughPoses
set_spindle_speed:
feedback:
position: spindle_speed
goal:
position: spindle_speed
goal_default:
max_velocity: 0.0
min_duration:
nanosec: 0
sec: 0
position: 0.0
handles: []
result: {}
schema:
type: object
properties:
position:
type: array
items:
type: number
description: The position of the device
spindle_speed:
type: number
description: The spindle speed of the device
required:
- position
- spindle_speed
additionalProperties: false
motor.iCL42:
description: iCL42 motor
class:
module: unilabos.devices.motor.iCL42:iCL42Driver
schema:
description: ROS Action SingleJointPosition 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties:
error:
type: number
header:
properties:
frame_id:
type: string
stamp:
properties:
nanosec:
maximum: 4294967295
minimum: 0
type: integer
sec:
maximum: 2147483647
minimum: -2147483648
type: integer
required:
- sec
- nanosec
title: Time
type: object
required:
- stamp
- frame_id
title: Header
type: object
position:
type: number
velocity:
type: number
required:
- header
- position
- velocity
- error
title: SingleJointPosition_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties:
max_velocity:
type: number
min_duration:
properties:
nanosec:
maximum: 4294967295
minimum: 0
type: integer
sec:
maximum: 2147483647
minimum: -2147483648
type: integer
required:
- sec
- nanosec
title: Duration
type: object
position:
type: number
required:
- position
- min_duration
- max_velocity
title: SingleJointPosition_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties: {}
required: []
title: SingleJointPosition_Result
type: object
required:
- goal
title: SingleJointPosition
type: object
type: SingleJointPosition
module: unilabos.devices.cnc.grbl_sync:GrblCNC
status_types: {}
type: python
status_types:
motor_position: Int64
is_executing_run: Bool
success: Bool
description: Grbl CNC
handles: []
icon: ''
init_param_schema:
description: UniLabJsonCommand __init__ 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: __init__ 命令参数
type: object
motor.iCL42:
class:
action_value_mappings:
auto-execute_run_motor:
feedback: {}
goal: {}
goal_default:
mode: null
position: null
velocity: null
handles: []
result: {}
schema:
description: UniLabJsonCommand execute_run_motor 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand execute_run_motor 的参数schema
properties:
mode:
description: '参数: mode'
type: string
position:
description: '参数: position'
type: number
velocity:
description: '参数: velocity'
type: integer
required:
- mode
- position
- velocity
type: object
result: {}
required:
- goal
title: execute_run_motor 命令参数
type: object
type: UniLabJsonCommand
auto-init_device:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand init_device 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand init_device 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: init_device 命令参数
type: object
type: UniLabJsonCommand
auto-run_motor:
feedback: {}
goal: {}
goal_default:
mode: null
position: null
velocity: null
handles: []
result: {}
schema:
description: UniLabJsonCommand run_motor 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand run_motor 的参数schema
properties:
mode:
description: '参数: mode'
type: string
position:
description: '参数: position'
type: number
velocity:
description: '参数: velocity'
type: integer
required:
- mode
- position
- velocity
type: object
result: {}
required:
- goal
title: run_motor 命令参数
type: object
type: UniLabJsonCommand
execute_command_from_outer:
type: SendCmd
feedback: {}
goal:
command: command
feedback: {}
goal_default:
command: ''
handles: []
result:
success: success
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.motor.iCL42:iCL42Driver
status_types:
is_executing_run: bool
motor_position: int
success: bool
type: python
description: iCL42 motor
handles: []
icon: ''
init_param_schema:
description: UniLabJsonCommand __init__ 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties:
device_address:
default: 1
description: '参数: device_address'
type: integer
device_com:
default: COM9
description: '参数: device_com'
type: string
required: []
type: object
result: {}
required:
- goal
title: __init__ 命令参数
type: object

View File

@@ -1,5 +1,355 @@
lh_joint_publisher:
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-find_resource_parent:
feedback: {}
goal: {}
goal_default:
resource_id: null
handles: []
result: {}
schema:
description: UniLabJsonCommand find_resource_parent 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand find_resource_parent 的参数schema
properties:
resource_id:
description: '参数: resource_id'
type: string
required:
- resource_id
type: object
result: {}
required:
- goal
title: find_resource_parent 命令参数
type: object
type: UniLabJsonCommand
auto-inverse_kinematics:
feedback: {}
goal: {}
goal_default:
parent_id: null
x: null
x_joint: null
y: null
y_joint: null
z: null
z_joint: null
handles: []
result: {}
schema:
description: UniLabJsonCommand inverse_kinematics 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand inverse_kinematics 的参数schema
properties:
parent_id:
description: '参数: parent_id'
type: string
x:
description: '参数: x'
type: string
x_joint:
description: '参数: x_joint'
type: object
y:
description: '参数: y'
type: string
y_joint:
description: '参数: y_joint'
type: object
z:
description: '参数: z'
type: string
z_joint:
description: '参数: z_joint'
type: object
required:
- x
- y
- z
- parent_id
- x_joint
- y_joint
- z_joint
type: object
result: {}
required:
- goal
title: inverse_kinematics 命令参数
type: object
type: UniLabJsonCommand
auto-lh_joint_action_callback:
feedback: {}
goal: {}
goal_default:
goal_handle: null
handles: []
result: {}
schema:
description: UniLabJsonCommand lh_joint_action_callback 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand lh_joint_action_callback 的参数schema
properties:
goal_handle:
description: '参数: goal_handle'
type: string
required:
- goal_handle
type: object
result: {}
required:
- goal
title: lh_joint_action_callback 命令参数
type: object
type: UniLabJsonCommand
auto-lh_joint_pub_callback:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand lh_joint_pub_callback 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand lh_joint_pub_callback 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: lh_joint_pub_callback 命令参数
type: object
type: UniLabJsonCommand
auto-move_joints:
feedback: {}
goal: {}
goal_default:
option: null
resource_names: null
speed: 0.1
x: null
x_joint: null
y: null
y_joint: null
z: null
z_joint: null
handles: []
result: {}
schema:
description: UniLabJsonCommand move_joints 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand move_joints 的参数schema
properties:
option:
description: '参数: option'
type: string
resource_names:
description: '参数: resource_names'
type: string
speed:
default: 0.1
description: '参数: speed'
type: number
x:
description: '参数: x'
type: string
x_joint:
description: '参数: x_joint'
type: string
y:
description: '参数: y'
type: string
y_joint:
description: '参数: y_joint'
type: string
z:
description: '参数: z'
type: string
z_joint:
description: '参数: z_joint'
type: string
required:
- resource_names
- x
- y
- z
- option
type: object
result: {}
required:
- goal
title: move_joints 命令参数
type: object
type: UniLabJsonCommand
auto-move_to:
feedback: {}
goal: {}
goal_default:
joint_positions: null
parent_id: null
speed: null
handles: []
result: {}
schema:
description: UniLabJsonCommand move_to 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand move_to 的参数schema
properties:
joint_positions:
description: '参数: joint_positions'
type: string
parent_id:
description: '参数: parent_id'
type: string
speed:
description: '参数: speed'
type: string
required:
- joint_positions
- speed
- parent_id
type: object
result: {}
required:
- goal
title: move_to 命令参数
type: object
type: UniLabJsonCommand
auto-resource_move:
feedback: {}
goal: {}
goal_default:
channels: null
link_name: null
resource_id: null
handles: []
result: {}
schema:
description: UniLabJsonCommand resource_move 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand resource_move 的参数schema
properties:
channels:
description: '参数: channels'
type: string
link_name:
description: '参数: link_name'
type: string
resource_id:
description: '参数: resource_id'
type: string
required:
- resource_id
- link_name
- channels
type: object
result: {}
required:
- goal
title: resource_move 命令参数
type: object
type: UniLabJsonCommand
auto-send_resource_action:
feedback: {}
goal: {}
goal_default:
link_name: null
resource_id_list: null
handles: []
result: {}
schema:
description: UniLabJsonCommand send_resource_action 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand send_resource_action 的参数schema
properties:
link_name:
description: '参数: link_name'
type: string
resource_id_list:
description: '参数: resource_id_list'
type: string
required:
- resource_id_list
- link_name
type: object
result: {}
required:
- goal
title: send_resource_action 命令参数
type: object
type: UniLabJsonCommand
module: unilabos.devices.ros_dev.liquid_handler_joint_publisher:LiquidHandlerJointPublisher
status_types: {}
type: ros2
description: ''
handles: []
icon: ''
init_param_schema:
description: UniLabJsonCommand __init__ 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties:
device_id:
default: lh_joint_publisher
description: '参数: device_id'
type: string
rate:
default: 50
description: '参数: rate'
type: integer
resource_tracker:
description: '参数: resource_tracker'
type: string
resources_config:
description: '参数: resources_config'
type: array
required:
- resources_config
- resource_tracker
type: object
result: {}
required:
- goal
title: __init__ 命令参数
type: object

View File

@@ -1,65 +1,884 @@
heaterstirrer.dalong:
description: DaLong heater stirrer
chiller:
class:
module: unilabos.devices.heaterstirrer.dalong:HeaterStirrer_DaLong
type: python
status_types:
temp: Float64
temp_warning: Float64
stir_speed: Float64
action_value_mappings:
set_temp_warning:
type: SendCmd
goal:
command: temp
auto-build_modbus_frame:
feedback: {}
goal: {}
goal_default:
device_address: null
function_code: null
register_address: null
value: null
handles: []
result: {}
schema:
description: UniLabJsonCommand build_modbus_frame 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand build_modbus_frame 的参数schema
properties:
device_address:
description: '参数: device_address'
type: integer
function_code:
description: '参数: function_code'
type: integer
register_address:
description: '参数: register_address'
type: integer
value:
description: '参数: value'
type: integer
required:
- device_address
- function_code
- register_address
- value
type: object
result: {}
required:
- goal
title: build_modbus_frame 命令参数
type: object
type: UniLabJsonCommand
auto-convert_temperature_to_modbus_value:
feedback: {}
goal: {}
goal_default:
decimal_points: 1
temperature: null
handles: []
result: {}
schema:
description: UniLabJsonCommand convert_temperature_to_modbus_value 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand convert_temperature_to_modbus_value 的参数schema
properties:
decimal_points:
default: 1
description: '参数: decimal_points'
type: integer
temperature:
description: '参数: temperature'
type: number
required:
- temperature
type: object
result: {}
required:
- goal
title: convert_temperature_to_modbus_value 命令参数
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-set_temperature:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: UniLabJsonCommand set_temperature 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand set_temperature 的参数schema
properties:
command:
description: '参数: command'
type: string
required:
- command
type: object
result: {}
required:
- goal
title: set_temperature 命令参数
type: object
type: UniLabJsonCommand
auto-stop:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand stop 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand stop 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: stop 命令参数
type: object
type: UniLabJsonCommand
set_temperature:
feedback: {}
goal:
command: command
goal_default:
command: ''
handles: []
result:
success: success
set_temp_target:
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
goal:
command: temp
module: unilabos.devices.temperature.chiller:Chiller
status_types: {}
type: python
description: Chiller
handles: []
icon: ''
init_param_schema:
description: UniLabJsonCommand __init__ 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties:
port:
description: '参数: port'
type: string
rate:
default: 9600
description: '参数: rate'
type: integer
required:
- port
type: object
result: {}
required:
- goal
title: __init__ 命令参数
type: object
heaterstirrer.dalong:
class:
action_value_mappings:
auto-close:
feedback: {}
result:
success: success
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand close 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand close 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: close 命令参数
type: object
type: UniLabJsonCommand
auto-get_status:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand get_status 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand get_status 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: get_status 命令参数
type: object
type: UniLabJsonCommand
auto-get_temp:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand get_temp 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand get_temp 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: get_temp 命令参数
type: object
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: UniLabJsonCommand heatchill 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand heatchill 的参数schema
properties:
purpose:
default: reaction
description: '参数: purpose'
type: string
stir:
default: true
description: '参数: stir'
type: boolean
stir_speed:
default: 300
description: '参数: stir_speed'
type: number
temp:
description: '参数: temp'
type: number
time:
default: 3600
description: '参数: time'
type: number
vessel:
description: '参数: vessel'
type: string
required:
- vessel
- temp
type: object
result: {}
required:
- goal
title: heatchill 命令参数
type: object
type: UniLabJsonCommand
auto-set_stir_speed:
feedback: {}
goal: {}
goal_default:
speed: null
handles: []
result: {}
schema:
description: UniLabJsonCommand set_stir_speed 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand set_stir_speed 的参数schema
properties:
speed:
description: '参数: speed'
type: number
required:
- speed
type: object
result: {}
required:
- goal
title: set_stir_speed 命令参数
type: object
type: UniLabJsonCommand
auto-set_temp_inner:
feedback: {}
goal: {}
goal_default:
temp: null
type: warning
handles: []
result: {}
schema:
description: UniLabJsonCommand set_temp_inner 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand set_temp_inner 的参数schema
properties:
temp:
description: '参数: temp'
type: number
type:
default: warning
description: '参数: type'
type: string
required:
- temp
type: object
result: {}
required:
- goal
title: set_temp_inner 命令参数
type: object
type: UniLabJsonCommand
auto-set_temp_target:
feedback: {}
goal: {}
goal_default:
temp: null
handles: []
result: {}
schema:
description: UniLabJsonCommand set_temp_target 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand set_temp_target 的参数schema
properties:
temp:
description: '参数: 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: UniLabJsonCommand set_temp_warning 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand set_temp_warning 的参数schema
properties:
temp:
description: '参数: temp'
type: string
required:
- temp
type: object
result: {}
required:
- goal
title: set_temp_warning 命令参数
type: object
type: UniLabJsonCommand
heatchill:
type: HeatChill
goal:
vessel: vessel
temp: temp
time: time
purpose: purpose
feedback:
status: status
result:
success: success
chiller:
description: Chiller
class:
module: unilabos.devices.temperature.chiller:Chiller
type: python
action_value_mappings:
set_temperature:
type: SendCmd
goal:
command: command
feedback: {}
purpose: purpose
temp: temp
time: time
vessel: vessel
goal_default:
purpose: ''
stir: false
stir_speed: 0.0
temp: 0.0
time: 0.0
vessel: ''
handles: []
result:
success: success
tempsensor:
description: Temperature sensor
class:
module: unilabos.devices.temperature.sensor_node:TempSensorNode
type: python
schema:
description: ROS Action HeatChill 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties:
status:
type: string
required:
- status
title: HeatChill_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties:
purpose:
type: string
stir:
type: boolean
stir_speed:
type: number
temp:
type: number
time:
type: number
vessel:
type: string
required:
- vessel
- temp
- time
- stir
- stir_speed
- purpose
title: HeatChill_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties:
return_info:
type: string
success:
type: boolean
required:
- return_info
- success
title: HeatChill_Result
type: object
required:
- goal
title: HeatChill
type: object
type: HeatChill
set_temp_target:
feedback: {}
goal:
command: temp
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
set_temp_warning:
feedback: {}
goal:
command: temp
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.heaterstirrer.dalong:HeaterStirrer_DaLong
status_types:
value: Float64
warning: Float64
status: str
stir_speed: float
temp: float
temp_target: float
temp_warning: float
type: python
description: DaLong heater stirrer
handles: []
icon: ''
init_param_schema:
description: UniLabJsonCommand __init__ 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties:
baudrate:
default: 9600
description: '参数: baudrate'
type: integer
port:
default: COM6
description: '参数: port'
type: string
temp_warning:
default: 50.0
description: '参数: temp_warning'
type: number
required: []
type: object
result: {}
required:
- goal
title: __init__ 命令参数
type: object
tempsensor:
class:
action_value_mappings:
auto-build_modbus_request:
feedback: {}
goal: {}
goal_default:
device_id: null
function_code: null
register_address: null
register_count: null
handles: []
result: {}
schema:
description: UniLabJsonCommand build_modbus_request 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand build_modbus_request 的参数schema
properties:
device_id:
description: '参数: device_id'
type: string
function_code:
description: '参数: function_code'
type: string
register_address:
description: '参数: register_address'
type: string
register_count:
description: '参数: register_count'
type: string
required:
- device_id
- function_code
- register_address
- register_count
type: object
result: {}
required:
- goal
title: build_modbus_request 命令参数
type: object
type: UniLabJsonCommand
auto-calculate_crc:
feedback: {}
goal: {}
goal_default:
data: null
handles: []
result: {}
schema:
description: UniLabJsonCommand calculate_crc 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand calculate_crc 的参数schema
properties:
data:
description: '参数: data'
type: string
required:
- data
type: object
result: {}
required:
- goal
title: calculate_crc 命令参数
type: object
type: UniLabJsonCommand
auto-read_modbus_response:
feedback: {}
goal: {}
goal_default:
response: null
handles: []
result: {}
schema:
description: UniLabJsonCommand read_modbus_response 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand read_modbus_response 的参数schema
properties:
response:
description: '参数: response'
type: string
required:
- response
type: object
result: {}
required:
- goal
title: read_modbus_response 命令参数
type: object
type: UniLabJsonCommand
auto-send_prototype_command:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: UniLabJsonCommand send_prototype_command 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand send_prototype_command 的参数schema
properties:
command:
description: '参数: command'
type: string
required:
- command
type: object
result: {}
required:
- goal
title: send_prototype_command 命令参数
type: object
type: UniLabJsonCommand
auto-set_warning:
feedback: {}
goal: {}
goal_default:
command: null
handles: []
result: {}
schema:
description: UniLabJsonCommand set_warning 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand set_warning 的参数schema
properties:
command:
description: '参数: command'
type: string
required:
- command
type: object
result: {}
required:
- goal
title: set_warning 命令参数
type: object
type: UniLabJsonCommand
set_warning:
type: SendCmd
feedback: {}
goal:
command: command
feedback: {}
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.temperature.sensor_node:TempSensorNode
status_types:
value: float
warning: Float64
type: python
description: Temperature sensor
handles: []
icon: ''
init_param_schema:
description: UniLabJsonCommand __init__ 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties:
address:
description: '参数: address'
type: string
baudrate:
default: 9600
description: '参数: baudrate'
type: integer
port:
description: '参数: port'
type: string
warning:
description: '参数: warning'
type: string
required:
- port
- warning
- address
type: object
result: {}
required:
- goal
title: __init__ 命令参数
type: object

View File

@@ -1,81 +1,556 @@
vacuum_pump.mock:
description: Mock vacuum pump
class:
module: unilabos.devices.pump_and_valve.vacuum_pump_mock:VacuumPumpMock
type: python
status_types:
status: String
action_value_mappings:
open:
type: EmptyIn
goal: {}
feedback: {}
result: {}
close:
type: EmptyIn
goal: {}
feedback: {}
result: {}
set_status:
type: StrSingleInput
goal:
string: string
feedback: {}
result: {}
handles:
- handler_key: out
label: out
data_type: fluid
io_type: source
data_source: handle
data_key: fluid_in
init_param_schema:
type: object
properties:
port:
type: string
description: "通信端口"
default: "COM6"
required:
- port
gas_source.mock:
description: Mock gas source
class:
module: unilabos.devices.pump_and_valve.vacuum_pump_mock:VacuumPumpMock
type: python
status_types:
status: String
action_value_mappings:
open:
type: EmptyIn
goal: {}
auto-close:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand close 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand close 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: close 命令参数
type: object
type: UniLabJsonCommand
auto-get_status:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand get_status 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand get_status 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: get_status 命令参数
type: object
type: UniLabJsonCommand
auto-is_closed:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand is_closed 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand is_closed 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: is_closed 命令参数
type: object
type: UniLabJsonCommand
auto-is_open:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand is_open 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand is_open 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: is_open 命令参数
type: object
type: UniLabJsonCommand
auto-open:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand open 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand open 的参数schema
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: UniLabJsonCommand set_status 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand set_status 的参数schema
properties:
string:
description: '参数: string'
type: string
required:
- string
type: object
result: {}
required:
- goal
title: set_status 命令参数
type: object
type: UniLabJsonCommand
close:
type: EmptyIn
goal: {}
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: ROS Action EmptyIn 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {}
required: []
title: EmptyIn_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties: {}
required: []
title: EmptyIn_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties:
return_info:
type: string
required:
- return_info
title: EmptyIn_Result
type: object
required:
- goal
title: EmptyIn
type: object
type: EmptyIn
open:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: ROS Action EmptyIn 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {}
required: []
title: EmptyIn_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties: {}
required: []
title: EmptyIn_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties:
return_info:
type: string
required:
- return_info
title: EmptyIn_Result
type: object
required:
- goal
title: EmptyIn
type: object
type: EmptyIn
set_status:
type: StrSingleInput
feedback: {}
goal:
string: string
feedback: {}
goal_default:
string: ''
handles: []
result: {}
schema:
description: ROS Action StrSingleInput 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {}
required: []
title: StrSingleInput_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties:
string:
type: string
required:
- string
title: StrSingleInput_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties:
return_info:
type: string
success:
type: boolean
required:
- return_info
- success
title: StrSingleInput_Result
type: object
required:
- goal
title: StrSingleInput
type: object
type: StrSingleInput
module: unilabos.devices.pump_and_valve.vacuum_pump_mock:VacuumPumpMock
status_types:
status: str
type: python
description: Mock gas source
handles:
- handler_key: out
label: out
data_type: fluid
io_type: source
data_source: executor
data_key: fluid_out
- data_key: fluid_out
data_source: executor
data_type: fluid
handler_key: out
io_type: source
label: out
icon: ''
init_param_schema:
type: object
description: UniLabJsonCommand __init__ 的参数schema
properties:
port:
type: string
description: "通信端口"
default: "COM6"
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties:
port:
default: COM6
description: '参数: port'
type: string
required: []
type: object
result: {}
required:
- port
- goal
title: __init__ 命令参数
type: object
vacuum_pump.mock:
class:
action_value_mappings:
auto-close:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand close 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand close 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: close 命令参数
type: object
type: UniLabJsonCommand
auto-get_status:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand get_status 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand get_status 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: get_status 命令参数
type: object
type: UniLabJsonCommand
auto-is_closed:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand is_closed 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand is_closed 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: is_closed 命令参数
type: object
type: UniLabJsonCommand
auto-is_open:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand is_open 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand is_open 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: is_open 命令参数
type: object
type: UniLabJsonCommand
auto-open:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand open 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand open 的参数schema
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: UniLabJsonCommand set_status 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand set_status 的参数schema
properties:
string:
description: '参数: string'
type: string
required:
- string
type: object
result: {}
required:
- goal
title: set_status 命令参数
type: object
type: UniLabJsonCommand
close:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: ROS Action EmptyIn 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {}
required: []
title: EmptyIn_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties: {}
required: []
title: EmptyIn_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties:
return_info:
type: string
required:
- return_info
title: EmptyIn_Result
type: object
required:
- goal
title: EmptyIn
type: object
type: EmptyIn
open:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: ROS Action EmptyIn 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {}
required: []
title: EmptyIn_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties: {}
required: []
title: EmptyIn_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties:
return_info:
type: string
required:
- return_info
title: EmptyIn_Result
type: object
required:
- goal
title: EmptyIn
type: object
type: EmptyIn
set_status:
feedback: {}
goal:
string: string
goal_default:
string: ''
handles: []
result: {}
schema:
description: ROS Action StrSingleInput 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {}
required: []
title: StrSingleInput_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties:
string:
type: string
required:
- string
title: StrSingleInput_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties:
return_info:
type: string
success:
type: boolean
required:
- return_info
- success
title: StrSingleInput_Result
type: object
required:
- goal
title: StrSingleInput
type: object
type: StrSingleInput
module: unilabos.devices.pump_and_valve.vacuum_pump_mock:VacuumPumpMock
status_types:
status: str
type: python
description: Mock vacuum pump
handles:
- data_key: fluid_in
data_source: handle
data_type: fluid
handler_key: out
io_type: source
label: out
icon: ''
init_param_schema:
description: UniLabJsonCommand __init__ 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties:
port:
default: COM6
description: '参数: port'
type: string
required: []
type: object
result: {}
required:
- goal
title: __init__ 命令参数
type: object

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,27 +1,259 @@
zhida_hplc:
description: Zhida HPLC
class:
module: unilabos.devices.zhida_hplc.zhida:ZhidaClient
type: python
status_types:
status: String
action_value_mappings:
abort:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: ROS Action EmptyIn 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {}
required: []
title: EmptyIn_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties: {}
required: []
title: EmptyIn_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties:
return_info:
type: string
required:
- return_info
title: EmptyIn_Result
type: object
required:
- goal
title: EmptyIn
type: object
type: EmptyIn
auto-abort:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand abort 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand abort 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: abort 命令参数
type: object
type: UniLabJsonCommand
auto-close:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand close 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand close 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: close 命令参数
type: object
type: UniLabJsonCommand
auto-connect:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand connect 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand connect 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: connect 命令参数
type: object
type: UniLabJsonCommand
auto-get_methods:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: UniLabJsonCommand get_methods 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand get_methods 的参数schema
properties: {}
required: []
type: object
result: {}
required:
- goal
title: get_methods 命令参数
type: object
type: UniLabJsonCommand
auto-start:
feedback: {}
goal: {}
goal_default:
text: null
handles: []
result: {}
schema:
description: UniLabJsonCommand start 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand start 的参数schema
properties:
text:
description: '参数: text'
type: string
required:
- text
type: object
result: {}
required:
- goal
title: start 命令参数
type: object
type: UniLabJsonCommand
get_methods:
feedback: {}
goal: {}
goal_default: {}
handles: []
result: {}
schema:
description: ROS Action EmptyIn 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {}
required: []
title: EmptyIn_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties: {}
required: []
title: EmptyIn_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties:
return_info:
type: string
required:
- return_info
title: EmptyIn_Result
type: object
required:
- goal
title: EmptyIn
type: object
type: EmptyIn
start:
type: StrSingleInput
feedback: {}
goal:
string: string
feedback: {}
goal_default:
string: ''
handles: []
result: {}
abort:
type: EmptyIn
goal: {}
feedback: {}
result: {}
get_methods:
type: EmptyIn
goal: {}
feedback: {}
result: {}
schema:
properties: {}
schema:
description: ROS Action StrSingleInput 的 JSON Schema
properties:
feedback:
description: Action 反馈 - 执行过程中从服务器发送到客户端
properties: {}
required: []
title: StrSingleInput_Feedback
type: object
goal:
description: Action 目标 - 从客户端发送到服务器
properties:
string:
type: string
required:
- string
title: StrSingleInput_Goal
type: object
result:
description: Action 结果 - 完成后从服务器发送到客户端
properties:
return_info:
type: string
success:
type: boolean
required:
- return_info
- success
title: StrSingleInput_Result
type: object
required:
- goal
title: StrSingleInput
type: object
type: StrSingleInput
module: unilabos.devices.zhida_hplc.zhida:ZhidaClient
status_types:
status: dict
type: python
description: Zhida HPLC
handles: []
icon: ''
init_param_schema:
description: UniLabJsonCommand __init__ 的参数schema
properties:
feedback: {}
goal:
description: UniLabJsonCommand __init__ 的参数schema
properties:
host:
default: 192.168.1.47
description: '参数: host'
type: string
port:
default: 5792
description: '参数: port'
type: integer
timeout:
default: 10.0
description: '参数: timeout'
type: number
required: []
type: object
result: {}
required:
- goal
title: __init__ 命令参数
type: object

View File

@@ -1,14 +1,17 @@
import copy
import io
import os
import sys
from pathlib import Path
from typing import Any
from typing import Any, Dict, List
import yaml
from unilabos.ros.msgs.message_converter import msg_converter_manager, ros_action_to_json_schema
from unilabos.utils import logger
from unilabos.utils.decorator import singleton
from unilabos.utils.import_manager import get_enhanced_class_info
from unilabos.utils.type_check import NoAliasDumper
DEFAULT_PATHS = [Path(__file__).absolute().parent]
@@ -32,7 +35,7 @@ class Registry:
# 其他状态变量
# self.is_host_mode = False # 移至BasicConfig中
def setup(self):
def setup(self, complete_registry=False):
# 检查是否已调用过setup
if self._setup_called:
logger.critical("[UniLab Registry] setup方法已被调用过不允许多次调用")
@@ -86,13 +89,15 @@ class Registry:
io.StringIO(get_yaml_from_goal_type(self.ResourceCreateFromOuterEasy.Goal))
),
"handles": {
"output": [{
"handler_key": "labware",
"label": "Labware",
"data_type": "resource",
"data_source": "handle",
"data_key": "liquid"
}]
"output": [
{
"handler_key": "labware",
"label": "Labware",
"data_type": "resource",
"data_source": "handle",
"data_key": "liquid",
}
]
},
},
"test_latency": {
@@ -110,7 +115,6 @@ class Registry:
"registry_type": "device",
"handles": [],
"init_param_schema": {},
"schema": {"properties": {}, "additionalProperties": False, "type": "object"},
"file_path": "/",
}
}
@@ -121,13 +125,13 @@ class Registry:
sys_path = path.parent
logger.debug(f"[UniLab Registry] Path {i+1}/{len(self.registry_paths)}: {sys_path}")
sys.path.append(str(sys_path))
self.load_device_types(path)
self.load_resource_types(path)
self.load_device_types(path, complete_registry)
self.load_resource_types(path, complete_registry)
logger.info("[UniLab Registry] 注册表设置完成")
# 标记setup已被调用
self._setup_called = True
def load_resource_types(self, path: os.PathLike):
def load_resource_types(self, path: os.PathLike, complete_registry: bool):
abs_path = Path(path).absolute()
resource_path = abs_path / "resources"
files = list(resource_path.glob("*/*.yaml"))
@@ -176,7 +180,7 @@ class Registry:
if not type_name or type_name == "":
logger.warning(f"[UniLab Registry] 设备 {device_id}{field_name} 类型为空,跳过替换")
return type_name
if "." in type_name:
if ":" in type_name:
type_class = msg_converter_manager.get_class(type_name)
else:
type_class = msg_converter_manager.search_class(type_name)
@@ -186,7 +190,72 @@ class Registry:
logger.error(f"[UniLab Registry] 无法找到类型 '{type_name}' 用于设备 {device_id}{field_name}")
sys.exit(1)
def load_device_types(self, path: os.PathLike):
def _generate_unilab_json_command_schema(self, method_args: List[Dict[str, Any]], method_name: str) -> Dict[str, Any]:
"""
根据UniLabJsonCommand方法信息生成JSON Schema暂不支持嵌套类型
Args:
method_args: 方法信息字典包含args等
method_name: 方法名称
Returns:
JSON Schema格式的参数schema
"""
schema = {
"description": f"UniLabJsonCommand {method_name} 的参数schema",
"type": "object",
"properties": {},
"required": [],
}
for arg_info in method_args:
param_name = arg_info.get("name", "")
param_type = arg_info.get("type")
param_default = arg_info.get("default")
param_required = arg_info.get("required", True)
prop_schema = {"description": f"参数: {param_name}"}
# 根据类型设置schema FIXME 不完整
if param_type:
param_type_lower = param_type.lower()
if param_type_lower in ["str", "string"]:
prop_schema["type"] = "string"
elif param_type_lower in ["int", "integer"]:
prop_schema["type"] = "integer"
elif param_type_lower in ["float", "number"]:
prop_schema["type"] = "number"
elif param_type_lower in ["bool", "boolean"]:
prop_schema["type"] = "boolean"
elif param_type_lower in ["list", "array"]:
prop_schema["type"] = "array"
elif param_type_lower in ["dict", "object"]:
prop_schema["type"] = "object"
else:
# 默认为字符串类型
prop_schema["type"] = "string"
else:
# 如果没有类型信息,默认为字符串
prop_schema["type"] = "string"
# 设置默认值
if param_default is not None:
prop_schema["default"] = param_default
schema["properties"][param_name] = prop_schema
# 如果是必需参数添加到required列表
if param_required:
schema["required"].append(param_name)
return {
"title": f"{method_name} 命令参数",
"description": f"UniLabJsonCommand {method_name} 的参数schema",
"type": "object",
"properties": {"goal": schema, "feedback": {}, "result": {}},
"required": ["goal"],
}
def load_device_types(self, path: os.PathLike, complete_registry: bool):
abs_path = Path(path).absolute()
devices_path = abs_path / "devices"
device_comms_path = abs_path / "device_comms"
@@ -199,12 +268,18 @@ class Registry:
from unilabos.app.web.utils.action_utils import get_yaml_from_goal_type
for i, file in enumerate(files):
data = yaml.safe_load(open(file, encoding="utf-8"))
with open(file, encoding="utf-8", mode="r") as f:
data = yaml.safe_load(io.StringIO(f.read()))
complete_data = {}
action_str_type_mapping = {
"UniLabJsonCommand": "UniLabJsonCommand",
"UniLabJsonCommandAsync": "UniLabJsonCommandAsync",
}
status_str_type_mapping = {}
if data:
# 在添加到注册表前处理类型替换
for device_id, device_config in data.items():
# 添加文件路径信息 - 使用规范化的完整文件路径
device_config["file_path"] = str(file.absolute()).replace("\\", "/")
if "description" not in device_config:
device_config["description"] = ""
if "icon" not in device_config:
@@ -213,42 +288,108 @@ class Registry:
device_config["handles"] = []
if "init_param_schema" not in device_config:
device_config["init_param_schema"] = {}
device_config["registry_type"] = "device"
if "class" in device_config:
# 处理状态类型
if "status_types" in device_config["class"]:
for status_name, status_type in device_config["class"]["status_types"].items():
device_config["class"]["status_types"][status_name] = self._replace_type_with_class(
status_type, device_id, f"状态 {status_name}"
)
if "status_types" not in device_config["class"]:
device_config["class"]["status_types"] = {}
if "action_value_mappings" not in device_config["class"]:
device_config["class"]["action_value_mappings"] = {}
enhanced_info = {}
if complete_registry:
enhanced_info = get_enhanced_class_info(device_config["class"]["module"], use_dynamic=True)
device_config["class"]["status_types"].update(
{k: v["return_type"] for k, v in enhanced_info["status_methods"].items()}
)
for status_name, status_type in device_config["class"]["status_types"].items():
if status_type in ["Any", "None"]:
status_type = "String" # 替换成ROS的String便于显示
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(
sorted(device_config["class"]["status_types"].items())
)
# 处理动作值映射
if "action_value_mappings" in device_config["class"]:
for action_name, action_config in device_config["class"]["action_value_mappings"].items():
if "handles" not in action_config:
action_config["handles"] = []
if "type" in action_config:
action_config["type"] = self._replace_type_with_class(
action_config["type"], device_id, f"动作 {action_name}"
device_config["class"]["action_value_mappings"].update(
{
f"auto-{k}": {
"type": "UniLabJsonCommandAsync" if v["is_async"] else "UniLabJsonCommand",
"goal": {},
"feedback": {},
"result": {},
"schema": self._generate_unilab_json_command_schema(v["args"], k),
"goal_default": {i["name"]: i["default"] for i in v["args"]},
"handles": [],
}
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.pop("schema", None)
device_config["class"]["action_value_mappings"] = dict(
sorted(device_config["class"]["action_value_mappings"].items())
)
for action_name, action_config in device_config["class"]["action_value_mappings"].items():
if "handles" not in action_config:
action_config["handles"] = []
if "type" in action_config:
action_type_str: str = action_config["type"]
# 通过Json发放指令而不是通过特殊的ros action进行处理
if not action_type_str.startswith("UniLabJsonCommand"):
target_type = self._replace_type_with_class(
action_type_str, device_id, f"动作 {action_name}"
)
if action_config["type"] is not None:
action_str_type_mapping[action_type_str] = target_type
if target_type is not None:
action_config["goal_default"] = yaml.safe_load(
io.StringIO(get_yaml_from_goal_type(action_config["type"].Goal))
io.StringIO(get_yaml_from_goal_type(target_type.Goal))
)
action_config["schema"] = ros_action_to_json_schema(action_config["type"])
action_config["schema"] = ros_action_to_json_schema(target_type)
else:
logger.warning(
f"[UniLab Registry] 设备 {device_id} 的动作 {action_name} 类型为空,跳过替换"
)
self.device_type_registry.update(data)
for device_id in data.keys():
complete_data[device_id] = copy.deepcopy(dict(sorted(device_config.items()))) # 稍后dump到文件
for status_name, status_type in device_config["class"]["status_types"].items():
device_config["class"]["status_types"][status_name] = status_str_type_mapping[status_type]
for action_name, action_config in device_config["class"]["action_value_mappings"].items():
action_config["type"] = action_str_type_mapping[action_config["type"]]
for additional_action in ["_execute_driver_command", "_execute_driver_command_async"]:
device_config["class"]["action_value_mappings"][additional_action] = {
"type": self._replace_type_with_class(
"StrSingleInput", device_id, f"动作 {additional_action}"
),
"goal": {"string": "string"},
"feedback": {},
"result": {},
"schema": ros_action_to_json_schema(
self._replace_type_with_class(
"StrSingleInput", device_id, f"动作 {additional_action}"
)
),
"goal_default": yaml.safe_load(
io.StringIO(
get_yaml_from_goal_type(
self._replace_type_with_class(
"StrSingleInput", device_id, f"动作 {additional_action}"
).Goal
)
)
),
"handles": [],
}
if "registry_type" not in device_config:
device_config["registry_type"] = "device"
device_config["file_path"] = str(file.absolute()).replace("\\", "/")
device_config["registry_type"] = "device"
logger.debug(
f"[UniLab Registry] Device-{current_device_number} File-{i+1}/{len(files)} Add {device_id} "
+ f"[{data[device_id].get('name', '未命名设备')}]"
)
current_device_number += 1
complete_data = dict(sorted(complete_data.items()))
complete_data = copy.deepcopy(complete_data)
with open(file, "w", encoding="utf-8") as f:
yaml.dump(complete_data, f, allow_unicode=True, default_flow_style=False, Dumper=NoAliasDumper)
self.device_type_registry.update(data)
else:
logger.debug(
f"[UniLab Registry] Device File-{i+1}/{len(files)} Not Valid YAML File: {file.absolute()}"
@@ -273,7 +414,7 @@ class Registry:
lab_registry = Registry()
def build_registry(registry_paths=None):
def build_registry(registry_paths=None, complete_registry=False):
"""
构建或获取Registry单例实例
@@ -297,6 +438,6 @@ def build_registry(registry_paths=None):
lab_registry.registry_paths.append(path)
# 初始化注册表
lab_registry.setup()
lab_registry.setup(complete_registry)
return lab_registry