mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2025-12-17 21:11:12 +00:00
Merge branch '37-biomek-i5i7' into device_visualization
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
liquid_handler:
|
||||
description: Liquid handler device controlled by pylabrobot
|
||||
icon: icon_yiyezhan.webp
|
||||
class:
|
||||
module: unilabos.devices.liquid_handling.liquid_handler_abstract:LiquidHandlerAbstract
|
||||
type: python
|
||||
@@ -22,8 +23,8 @@ liquid_handler:
|
||||
is_96_well: is_96_well
|
||||
top: top
|
||||
none_keys: none_keys
|
||||
feedback: { }
|
||||
result: { }
|
||||
feedback: {}
|
||||
result: {}
|
||||
add_liquid:
|
||||
type: LiquidHandlerAdd
|
||||
goal:
|
||||
@@ -43,8 +44,8 @@ liquid_handler:
|
||||
mix_rate: mix_rate
|
||||
mix_liquid_height: mix_liquid_height
|
||||
none_keys: none_keys
|
||||
feedback: { }
|
||||
result: { }
|
||||
feedback: {}
|
||||
result: {}
|
||||
transfer_liquid:
|
||||
type: LiquidHandlerTransfer
|
||||
goal:
|
||||
@@ -69,8 +70,8 @@ liquid_handler:
|
||||
mix_liquid_height: mix_liquid_height
|
||||
delays: delays
|
||||
none_keys: none_keys
|
||||
feedback: { }
|
||||
result: { }
|
||||
feedback: {}
|
||||
result: {}
|
||||
mix:
|
||||
type: LiquidHandlerMix
|
||||
goal:
|
||||
@@ -81,16 +82,16 @@ liquid_handler:
|
||||
offsets: offsets
|
||||
mix_rate: mix_rate
|
||||
none_keys: none_keys
|
||||
feedback: { }
|
||||
result: { }
|
||||
feedback: {}
|
||||
result: {}
|
||||
move_to:
|
||||
type: LiquidHandlerMoveTo
|
||||
goal:
|
||||
well: well
|
||||
dis_to_top: dis_to_top
|
||||
channel: channel
|
||||
feedback: { }
|
||||
result: { }
|
||||
feedback: {}
|
||||
result: {}
|
||||
aspirate:
|
||||
type: LiquidHandlerAspirate
|
||||
goal:
|
||||
@@ -245,6 +246,21 @@ liquid_handler:
|
||||
target_vols: target_vols
|
||||
aspiration_flow_rate: aspiration_flow_rate
|
||||
dispense_flow_rates: dispense_flow_rates
|
||||
handles:
|
||||
input:
|
||||
- handler_key: liquid-input
|
||||
label: Liquid Input
|
||||
data_type: resource
|
||||
io_type: target
|
||||
data_source: handle
|
||||
data_key: liquid
|
||||
output:
|
||||
- handler_key: liquid-output
|
||||
label: Liquid Output
|
||||
data_type: resource
|
||||
io_type: source
|
||||
data_source: executor
|
||||
data_key: liquid
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
@@ -272,3 +288,174 @@ liquid_handler.revvity:
|
||||
status: status
|
||||
result:
|
||||
success: success
|
||||
|
||||
liquid_handler.biomek:
|
||||
description: Biomek液体处理器设备,基于pylabrobot控制
|
||||
icon: icon_yiyezhan.webp
|
||||
class:
|
||||
module: unilabos.devices.liquid_handling.biomek:LiquidHandlerBiomek
|
||||
type: python
|
||||
status_types: {}
|
||||
action_value_mappings:
|
||||
create_protocol:
|
||||
type: LiquidHandlerProtocolCreation
|
||||
goal:
|
||||
protocol_name: protocol_name
|
||||
protocol_description: protocol_description
|
||||
protocol_version: protocol_version
|
||||
protocol_author: protocol_author
|
||||
protocol_date: protocol_date
|
||||
protocol_type: protocol_type
|
||||
none_keys: none_keys
|
||||
feedback: {}
|
||||
result: {}
|
||||
run_protocol:
|
||||
type: EmptyIn
|
||||
goal: {}
|
||||
feedback: {}
|
||||
result: {}
|
||||
transfer_liquid:
|
||||
type: LiquidHandlerTransfer
|
||||
goal:
|
||||
asp_vols: asp_vols
|
||||
dis_vols: dis_vols
|
||||
sources: sources
|
||||
targets: targets
|
||||
tip_racks: tip_racks
|
||||
use_channels: use_channels
|
||||
asp_flow_rates: asp_flow_rates
|
||||
dis_flow_rates: dis_flow_rates
|
||||
offsets: offsets
|
||||
touch_tip: touch_tip
|
||||
liquid_height: liquid_height
|
||||
blow_out_air_volume: blow_out_air_volume
|
||||
spread: spread
|
||||
is_96_well: is_96_well
|
||||
mix_stage: mix_stage
|
||||
mix_times: mix_times
|
||||
mix_vol: mix_vol
|
||||
mix_rate: mix_rate
|
||||
mix_liquid_height: mix_liquid_height
|
||||
delays: delays
|
||||
none_keys: none_keys
|
||||
feedback: {}
|
||||
result: {}
|
||||
handles:
|
||||
input:
|
||||
- handler_key: liquid-input
|
||||
label: Liquid Input
|
||||
data_type: resource
|
||||
io_type: target
|
||||
data_source: handle
|
||||
data_key: liquid
|
||||
output:
|
||||
- handler_key: liquid-output
|
||||
label: Liquid Output
|
||||
data_type: resource
|
||||
io_type: source
|
||||
data_source: executor
|
||||
data_key: liquid
|
||||
transfer_biomek:
|
||||
type: LiquidHandlerTransferBiomek
|
||||
goal:
|
||||
source: source
|
||||
target: target
|
||||
tip_rack: tip_rack
|
||||
volume: volume
|
||||
aspirate_techniques: aspirate_techniques
|
||||
dispense_techniques: dispense_techniques
|
||||
feedback: {}
|
||||
result: {}
|
||||
handles:
|
||||
input:
|
||||
- handler_key: sources
|
||||
label: sources
|
||||
data_type: resource
|
||||
data_source: handle
|
||||
data_key: liquid
|
||||
- handler_key: targets
|
||||
label: targets
|
||||
data_type: resource
|
||||
data_source: executor
|
||||
data_key: liquid
|
||||
- handler_key: tip_rack
|
||||
label: tip_rack
|
||||
data_type: resource
|
||||
data_source: executor
|
||||
data_key: liquid
|
||||
output:
|
||||
- handler_key: sources_out
|
||||
label: sources
|
||||
data_type: resource
|
||||
data_source: handle
|
||||
data_key: liquid
|
||||
- handler_key: targets_out
|
||||
label: targets
|
||||
data_type: resource
|
||||
data_source: executor
|
||||
data_key: liquid
|
||||
oscillation_biomek:
|
||||
type: LiquidHandlerOscillateBiomek
|
||||
goal:
|
||||
rpm: rpm
|
||||
time: time
|
||||
feedback: {}
|
||||
result: {}
|
||||
handles:
|
||||
input:
|
||||
- handler_key: plate
|
||||
label: plate
|
||||
data_type: resource
|
||||
data_source: handle
|
||||
data_key: liquid
|
||||
output:
|
||||
- handler_key: plate_out
|
||||
label: plate
|
||||
data_type: resource
|
||||
data_source: handle
|
||||
data_key: liquid
|
||||
move_biomek:
|
||||
type: LiquidHandlerMoveBiomek
|
||||
goal:
|
||||
source: resource
|
||||
target: target
|
||||
feedback: {}
|
||||
result:
|
||||
name: name
|
||||
handles:
|
||||
input:
|
||||
- handler_key: sources
|
||||
label: sources
|
||||
data_type: resource
|
||||
data_source: handle
|
||||
data_key: liquid
|
||||
output:
|
||||
- handler_key: targets
|
||||
label: targets
|
||||
data_type: resource
|
||||
data_source: handle
|
||||
data_key: liquid
|
||||
incubation_biomek:
|
||||
type: LiquidHandlerIncubateBiomek
|
||||
goal:
|
||||
time: time
|
||||
feedback: {}
|
||||
result: {}
|
||||
handles:
|
||||
input:
|
||||
- handler_key: plate
|
||||
label: plate
|
||||
data_type: resource
|
||||
data_source: handle
|
||||
data_key: liquid
|
||||
output:
|
||||
- handler_key: plate_out
|
||||
label: plate
|
||||
data_type: resource
|
||||
data_source: handle
|
||||
data_key: liquid
|
||||
schema:
|
||||
type: object
|
||||
properties: {}
|
||||
required: []
|
||||
additionalProperties: false
|
||||
|
||||
@@ -23,20 +23,51 @@ syringe_pump_with_valve.runze:
|
||||
type: string
|
||||
description: The position of the valve
|
||||
required:
|
||||
- status
|
||||
- position
|
||||
- valve_position
|
||||
- status
|
||||
- position
|
||||
- valve_position
|
||||
additionalProperties: false
|
||||
|
||||
|
||||
solenoid_valve.mock:
|
||||
description: Mock solenoid valve
|
||||
class:
|
||||
module: unilabos.devices.pump_and_valve.solenoid_valve_mock:SolenoidValveMock
|
||||
type: python
|
||||
status_types:
|
||||
status: String
|
||||
valve_position: String
|
||||
action_value_mappings:
|
||||
open:
|
||||
type: EmptyIn
|
||||
goal: {}
|
||||
feedback: {}
|
||||
result: {}
|
||||
close:
|
||||
type: EmptyIn
|
||||
goal: {}
|
||||
feedback: {}
|
||||
result: {}
|
||||
handles:
|
||||
input:
|
||||
- handler_key: fluid-input
|
||||
label: Fluid Input
|
||||
data_type: fluid
|
||||
output:
|
||||
- handler_key: fluid-output
|
||||
label: Fluid Output
|
||||
data_type: fluid
|
||||
init_param_schema:
|
||||
type: object
|
||||
properties:
|
||||
port:
|
||||
type: string
|
||||
description: "通信端口"
|
||||
default: "COM6"
|
||||
required:
|
||||
- port
|
||||
|
||||
solenoid_valve:
|
||||
description: Solenoid valve
|
||||
class:
|
||||
module: unilabos.devices.pump_and_valve.solenoid_valve:SolenoidValve
|
||||
type: python
|
||||
type: python
|
||||
|
||||
@@ -22,9 +22,76 @@ vacuum_pump.mock:
|
||||
string: string
|
||||
feedback: {}
|
||||
result: {}
|
||||
handles:
|
||||
input:
|
||||
- handler_key: fluid-input
|
||||
label: Fluid Input
|
||||
data_type: fluid
|
||||
io_type: target
|
||||
data_source: handle
|
||||
data_key: fluid_in
|
||||
output:
|
||||
- handler_key: fluid-output
|
||||
label: Fluid Output
|
||||
data_type: fluid
|
||||
io_type: source
|
||||
data_source: executor
|
||||
data_key: fluid_out
|
||||
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: {}
|
||||
feedback: {}
|
||||
result: {}
|
||||
close:
|
||||
type: EmptyIn
|
||||
goal: {}
|
||||
feedback: {}
|
||||
result: {}
|
||||
set_status:
|
||||
type: StrSingleInput
|
||||
goal:
|
||||
string: string
|
||||
feedback: {}
|
||||
result: {}
|
||||
handles:
|
||||
input:
|
||||
- handler_key: fluid-input
|
||||
label: Fluid Input
|
||||
data_type: fluid
|
||||
io_type: target
|
||||
data_source: handle
|
||||
data_key: fluid_in
|
||||
output:
|
||||
- handler_key: fluid-output
|
||||
label: Fluid Output
|
||||
data_type: fluid
|
||||
io_type: source
|
||||
data_source: executor
|
||||
data_key: fluid_out
|
||||
init_param_schema:
|
||||
type: object
|
||||
properties:
|
||||
port:
|
||||
type: string
|
||||
description: "通信端口"
|
||||
default: "COM6"
|
||||
required:
|
||||
- port
|
||||
|
||||
@@ -4,4 +4,4 @@ workstation:
|
||||
module: unilabos.ros.nodes.presets.protocol_node:ROS2ProtocolNode
|
||||
type: ros2
|
||||
schema:
|
||||
properties: {}
|
||||
properties: {}
|
||||
|
||||
@@ -25,9 +25,7 @@ class Registry:
|
||||
self.ResourceCreateFromOuterEasy = self._replace_type_with_class(
|
||||
"ResourceCreateFromOuterEasy", "host_node", f"动作 create_resource"
|
||||
)
|
||||
self.EmptyIn = self._replace_type_with_class(
|
||||
"EmptyIn", "host_node", f""
|
||||
)
|
||||
self.EmptyIn = self._replace_type_with_class("EmptyIn", "host_node", f"")
|
||||
self.device_type_registry = {}
|
||||
self.resource_type_registry = {}
|
||||
self._setup_called = False # 跟踪setup是否已调用
|
||||
@@ -66,6 +64,7 @@ class Registry:
|
||||
"goal_default": yaml.safe_load(
|
||||
io.StringIO(get_yaml_from_goal_type(self.ResourceCreateFromOuter.Goal))
|
||||
),
|
||||
"handles": {},
|
||||
},
|
||||
"create_resource": {
|
||||
"type": self.ResourceCreateFromOuterEasy,
|
||||
@@ -86,6 +85,15 @@ class Registry:
|
||||
"goal_default": yaml.safe_load(
|
||||
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"
|
||||
}]
|
||||
},
|
||||
},
|
||||
"test_latency": {
|
||||
"type": self.EmptyIn,
|
||||
@@ -94,11 +102,14 @@ class Registry:
|
||||
"result": {"latency_ms": "latency_ms", "time_diff_ms": "time_diff_ms"},
|
||||
"schema": ros_action_to_json_schema(self.EmptyIn),
|
||||
"goal_default": {},
|
||||
"handles": {},
|
||||
},
|
||||
},
|
||||
},
|
||||
"icon": "icon_device.webp",
|
||||
"registry_type": "device",
|
||||
"handles": [],
|
||||
"init_param_schema": {},
|
||||
"schema": {"properties": {}, "additionalProperties": False, "type": "object"},
|
||||
"file_path": "/",
|
||||
}
|
||||
@@ -132,6 +143,10 @@ class Registry:
|
||||
resource_info["description"] = ""
|
||||
if "icon" not in resource_info:
|
||||
resource_info["icon"] = ""
|
||||
if "handles" not in resource_info:
|
||||
resource_info["handles"] = []
|
||||
if "init_param_schema" not in resource_info:
|
||||
resource_info["init_param_schema"] = {}
|
||||
resource_info["registry_type"] = "resource"
|
||||
self.resource_type_registry.update(data)
|
||||
logger.debug(
|
||||
@@ -194,6 +209,10 @@ class Registry:
|
||||
device_config["description"] = ""
|
||||
if "icon" not in device_config:
|
||||
device_config["icon"] = ""
|
||||
if "handles" not in device_config:
|
||||
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:
|
||||
# 处理状态类型
|
||||
@@ -206,6 +225,8 @@ class Registry:
|
||||
# 处理动作值映射
|
||||
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}"
|
||||
|
||||
Reference in New Issue
Block a user