mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2025-12-17 13:01:12 +00:00
biomek switch back to non-test
This commit is contained in:
1710
test/experiments/plr_test_converted_slim.json
Normal file
1710
test/experiments/plr_test_converted_slim.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -10,6 +10,8 @@ from copy import deepcopy
|
||||
|
||||
import yaml
|
||||
|
||||
from unilabos.resources.graphio import tree_to_list
|
||||
|
||||
# 首先添加项目根目录到路径
|
||||
current_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
unilabos_dir = os.path.dirname(os.path.dirname(current_dir))
|
||||
@@ -145,9 +147,8 @@ def main():
|
||||
)
|
||||
devices_and_resources = dict_from_graph(graph_res.physical_setup_graph)
|
||||
args_dict["resources_config"] = initialize_resources(list(deepcopy(devices_and_resources).values()))
|
||||
args_dict["resources_config"] = list(devices_and_resources.values())
|
||||
args_dict["devices_config"] = dict_to_nested_dict(deepcopy(devices_and_resources), devices_only=False)
|
||||
# args_dict["resources_config"] = dict_to_tree(devices_and_resources, devices_only=False)
|
||||
|
||||
args_dict["graph"] = graph_res.physical_setup_graph
|
||||
else:
|
||||
if args_dict["devices"] is None or args_dict["resources"] is None:
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
import json
|
||||
import pathlib
|
||||
from typing import Sequence, Optional, List, Union, Literal
|
||||
|
||||
import requests
|
||||
from typing import List, Sequence, Optional, Union, Literal
|
||||
from geometry_msgs.msg import Point
|
||||
from pylabrobot.liquid_handling import LiquidHandler
|
||||
from unilabos_msgs.msg import Resource
|
||||
|
||||
from pylabrobot.resources import (
|
||||
TipRack,
|
||||
Container,
|
||||
Coordinate,
|
||||
)
|
||||
from unilabos_msgs.msg import Resource
|
||||
|
||||
from unilabos.ros.nodes.resource_tracker import DeviceNodeResourceTracker # type: ignore
|
||||
from .liquid_handler_abstract import LiquidHandlerAbstract
|
||||
|
||||
import json
|
||||
from typing import Sequence, Optional, List, Union, Literal
|
||||
|
||||
#class LiquidHandlerBiomek(LiquidHandlerAbstract):
|
||||
class LiquidHandlerBiomek:
|
||||
"""
|
||||
Biomek液体处理器的实现类,继承自LiquidHandlerAbstract。
|
||||
@@ -214,7 +212,6 @@ class LiquidHandlerBiomek:
|
||||
liquid_type: list[str],
|
||||
liquid_volume: list[int],
|
||||
slot_on_deck: int,
|
||||
|
||||
):
|
||||
"""
|
||||
创建一个新的资源。
|
||||
@@ -236,9 +233,8 @@ class LiquidHandlerBiomek:
|
||||
# TODO:需要对好接口,下面这个是临时的
|
||||
for resource in resources:
|
||||
res_id = resource.id
|
||||
class_name = resource.class_name
|
||||
class_name = resource.name
|
||||
parent = bind_parent_id
|
||||
bind_locations = Coordinate.from_point(resource.bind_location)
|
||||
liquid_input_slot = liquid_input_slot
|
||||
liquid_type = liquid_type
|
||||
liquid_volume = liquid_volume
|
||||
@@ -248,14 +244,14 @@ class LiquidHandlerBiomek:
|
||||
"id": res_id,
|
||||
"class": class_name,
|
||||
"parent": parent,
|
||||
"bind_locations": bind_locations.to_dict(),
|
||||
"bind_locations": bind_location,
|
||||
"liquid_input_slot": liquid_input_slot,
|
||||
"liquid_type": liquid_type,
|
||||
"liquid_volume": liquid_volume,
|
||||
"slot_on_deck": slot_on_deck,
|
||||
}
|
||||
self.temp_protocol["labwares"].append(resource)
|
||||
return resource
|
||||
return resources
|
||||
|
||||
def transfer_liquid(
|
||||
self,
|
||||
@@ -439,8 +435,6 @@ class LiquidHandlerBiomek:
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
def transfer_biomek(
|
||||
self,
|
||||
source: str,
|
||||
|
||||
@@ -293,7 +293,7 @@ liquid_handler.biomek:
|
||||
description: Biomek液体处理器设备,基于pylabrobot控制
|
||||
icon: icon_yiyezhan.webp
|
||||
class:
|
||||
module: unilabos.devices.liquid_handling.biomek_test:LiquidHandlerBiomek
|
||||
module: unilabos.devices.liquid_handling.biomek:LiquidHandlerBiomek
|
||||
type: python
|
||||
status_types: {}
|
||||
action_value_mappings:
|
||||
|
||||
Reference in New Issue
Block a user