mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2025-12-18 05:21:19 +00:00
Merge branch '37-biomek-i5i7' of https://github.com/dptech-corp/Uni-Lab-OS into 37-biomek-i5i7
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import requests
|
||||
from typing import List, Sequence, Optional, Union, Literal
|
||||
from geometry_msgs.msg import Point
|
||||
#from unilabos_msgs.msg import Resource
|
||||
from pylabrobot.liquid_handling import LiquidHandler
|
||||
from unilabos_msgs.msg import Resource
|
||||
|
||||
from pylabrobot.resources import (
|
||||
TipRack,
|
||||
@@ -22,8 +23,8 @@ class LiquidHandlerBiomek(LiquidHandlerAbstract):
|
||||
该类用于处理Biomek液体处理器的特定操作。
|
||||
"""
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
def __init__(self, backend=None, deck=None, *args, **kwargs):
|
||||
super().__init__(backend, deck, *args, **kwargs)
|
||||
self._status = "Idle" # 初始状态为 Idle
|
||||
self._success = False # 初始成功状态为 False
|
||||
self._status_queue = kwargs.get("status_queue", None) # 状态队列
|
||||
@@ -71,6 +72,10 @@ class LiquidHandlerBiomek(LiquidHandlerAbstract):
|
||||
}
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def deserialize(cls, data: dict, allow_marshal: bool = False) -> LiquidHandler:
|
||||
return LiquidHandler.deserialize(data, allow_marshal)
|
||||
|
||||
|
||||
def create_protocol(
|
||||
self,
|
||||
@@ -259,7 +264,7 @@ class LiquidHandlerBiomek(LiquidHandlerAbstract):
|
||||
}
|
||||
transfer_params["items"] = items
|
||||
|
||||
transfer_params["Solvent"] = solvent if solvent else "Water"
|
||||
transfer_params["Solvent"] = "Water"
|
||||
TipLocation = tip_racks[0].name
|
||||
transfer_params["TipLocation"] = TipLocation
|
||||
|
||||
@@ -343,8 +348,10 @@ class LiquidHandlerBiomek(LiquidHandlerAbstract):
|
||||
return
|
||||
|
||||
|
||||
steps_info = '''
|
||||
{
|
||||
if __name__ == "__main__":
|
||||
|
||||
steps_info = '''
|
||||
{
|
||||
"steps": [
|
||||
{
|
||||
"step_number": 1,
|
||||
@@ -603,8 +610,8 @@ steps_info = '''
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
'''
|
||||
}
|
||||
'''
|
||||
|
||||
|
||||
|
||||
@@ -622,6 +629,16 @@ labware_with_liquid = '''
|
||||
"A1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "Tip Rack BC230 TL2",
|
||||
"parent": "deck",
|
||||
"slot_on_deck": "TL2",
|
||||
"class_name": "BC230",
|
||||
"liquid_type": [],
|
||||
"liquid_volume": [],
|
||||
"liquid_input_wells": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "Tip Rack BC230 TL2",
|
||||
"parent": "deck",
|
||||
@@ -805,9 +822,11 @@ labware_with_liquid = '''
|
||||
"liquid_input_wells": [
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
'''
|
||||
|
||||
|
||||
'''
|
||||
|
||||
handler = LiquidHandlerBiomek()
|
||||
|
||||
|
||||
@@ -340,6 +340,17 @@ liquid_handler.biomek:
|
||||
none_keys: none_keys
|
||||
feedback: {}
|
||||
result: {}
|
||||
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: {}
|
||||
schema:
|
||||
type: object
|
||||
properties: {}
|
||||
|
||||
@@ -805,7 +805,9 @@ class ROS2DeviceNode:
|
||||
self.resource_tracker = DeviceNodeResourceTracker()
|
||||
|
||||
# use_pylabrobot_creator 使用 cls的包路径检测
|
||||
use_pylabrobot_creator = driver_class.__module__.startswith("pylabrobot") or driver_class.__name__ == "LiquidHandlerAbstract"
|
||||
use_pylabrobot_creator = (driver_class.__module__.startswith("pylabrobot")
|
||||
or driver_class.__name__ == "LiquidHandlerAbstract"
|
||||
or driver_class.__name__ == "LiquidHandlerBiomek")
|
||||
|
||||
# TODO: 要在创建之前预先请求服务器是否有当前id的物料,放到resource_tracker中,让pylabrobot进行创建
|
||||
# 创建设备类实例
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Resource source
|
||||
Resource target
|
||||
Resource tip_rack
|
||||
string source
|
||||
string target
|
||||
string tip_rack
|
||||
float64 volume
|
||||
string aspirate_technique
|
||||
string dispense_technique
|
||||
|
||||
|
||||
Reference in New Issue
Block a user