From 727d2c2595f06323a45dd65e30348c36f93beca8 Mon Sep 17 00:00:00 2001 From: dijkstra402 Date: Sat, 1 Nov 2025 10:39:08 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3YB=20warehouse?= =?UTF-8?q?=E6=8E=92=E5=88=97=E6=96=B9=E5=BC=8F=E5=92=8C=E7=89=A9=E6=96=99?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=98=A0=E5=B0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改warehouse_factory为YB_warehouse_factory - 调整warehouse排列方式:左上角为A01,竖着排ABCD,横着排01、02、03 - 修正config.py中的物料名称拼写错误(YB_fen_ye_20ml_Bottle, YB_pei_ye_xiao_Bottle) - 添加缺失的warehouse函数(bioyond_warehouse_2x2x1, bioyond_warehouse_3x5x1, bioyond_warehouse_20x1x1) - 更新decks.py中的warehouse位置映射 - 删除废弃的bottles.py和warehouses.py文件 --- .../workstation/bioyond_studio/config.py | 6 +- unilabos/registry/devices/laiyu_liquid.yaml | 11 +- unilabos/registry/devices/liquid_handler.yaml | 33 +-- unilabos/resources/bioyond/YB_warehouses.py | 71 ++++- unilabos/resources/bioyond/bottles.py | 255 ------------------ unilabos/resources/bioyond/decks.py | 38 ++- unilabos/resources/bioyond/warehouses.py | 161 ----------- unilabos/resources/warehouse.py | 5 +- 8 files changed, 97 insertions(+), 483 deletions(-) delete mode 100644 unilabos/resources/bioyond/bottles.py delete mode 100644 unilabos/resources/bioyond/warehouses.py diff --git a/unilabos/devices/workstation/bioyond_studio/config.py b/unilabos/devices/workstation/bioyond_studio/config.py index 2eb3dbb4..99cbddaf 100644 --- a/unilabos/devices/workstation/bioyond_studio/config.py +++ b/unilabos/devices/workstation/bioyond_studio/config.py @@ -16,7 +16,7 @@ API_CONFIG = { "report_token": os.getenv("BIOYOND_REPORT_TOKEN", "CHANGE_ME_TOKEN"), # HTTP 服务配置 - "HTTP_host": os.getenv("BIOYOND_HTTP_HOST", "172.21.32.210"), # HTTP服务监听地址,监听计算机飞连ip地址 + "HTTP_host": os.getenv("BIOYOND_HTTP_HOST", "172.21.32.83"), # HTTP服务监听地址,监听计算机飞连ip地址 "HTTP_port": int(os.getenv("BIOYOND_HTTP_PORT", "8080")), "debug_mode": False,# 调试模式 } @@ -159,9 +159,9 @@ MATERIAL_TYPE_MAPPINGS = { "5ml分液瓶板": ("YB_6x5ml_DispensingVialCarrier", "3a192fa4-007d-ec7b-456e-2a8be7a13f23"), "5ml分液瓶": ("YB_fen_ye_5ml_Bottle", "3a192c2a-ebb7-58a1-480d-8b3863bf74f4"), "20ml分液瓶板": ("YB_6x20ml_DispensingVialCarrier", "3a192fa4-47db-3449-162a-eaf8aba57e27"), - "20ml分液瓶": ("YB_fen_ye_20ml_Bottler", "3a192c2b-19e8-f0a3-035e-041ca8ca1035"), + "20ml分液瓶": ("YB_fen_ye_20ml_Bottle", "3a192c2b-19e8-f0a3-035e-041ca8ca1035"), "配液瓶(小)板": ("YB_6x_SmallSolutionBottleCarrier", "3a190c8b-3284-af78-d29f-9a69463ad047"), - "配液瓶(小)": ("YB_pei_ye_xiao_Bottler", "3a190c8c-fe8f-bf48-0dc3-97afc7f508eb"), + "配液瓶(小)": ("YB_pei_ye_xiao_Bottle", "3a190c8c-fe8f-bf48-0dc3-97afc7f508eb"), "配液瓶(大)板": ("YB_4x_LargeSolutionBottleCarrier", "53e50377-32dc-4781-b3c0-5ce45bc7dc27"), "配液瓶(大)": ("YB_pei_ye_da_Bottle", "19c52ad1-51c5-494f-8854-576f4ca9c6ca"), "适配器块": ("YB_AdapterBlock", "efc3bb32-d504-4890-91c0-b64ed3ac80cf"), diff --git a/unilabos/registry/devices/laiyu_liquid.yaml b/unilabos/registry/devices/laiyu_liquid.yaml index 98201a7d..64c0c182 100644 --- a/unilabos/registry/devices/laiyu_liquid.yaml +++ b/unilabos/registry/devices/laiyu_liquid.yaml @@ -1361,8 +1361,7 @@ laiyu_liquid: mix_liquid_height: 0.0 mix_rate: 0 mix_stage: '' - mix_times: - - 0 + mix_times: 0 mix_vol: 0 none_keys: - '' @@ -1492,11 +1491,9 @@ laiyu_liquid: mix_stage: type: string mix_times: - items: - maximum: 2147483647 - minimum: -2147483648 - type: integer - type: array + maximum: 2147483647 + minimum: -2147483648 + type: integer mix_vol: maximum: 2147483647 minimum: -2147483648 diff --git a/unilabos/registry/devices/liquid_handler.yaml b/unilabos/registry/devices/liquid_handler.yaml index b21ccd7e..99c92333 100644 --- a/unilabos/registry/devices/liquid_handler.yaml +++ b/unilabos/registry/devices/liquid_handler.yaml @@ -3994,8 +3994,7 @@ liquid_handler: mix_liquid_height: 0.0 mix_rate: 0 mix_stage: '' - mix_times: - - 0 + mix_times: 0 mix_vol: 0 none_keys: - '' @@ -4151,11 +4150,9 @@ liquid_handler: mix_stage: type: string mix_times: - items: - maximum: 2147483647 - minimum: -2147483648 - type: integer - type: array + maximum: 2147483647 + minimum: -2147483648 + type: integer mix_vol: maximum: 2147483647 minimum: -2147483648 @@ -5015,8 +5012,7 @@ liquid_handler.biomek: mix_liquid_height: 0.0 mix_rate: 0 mix_stage: '' - mix_times: - - 0 + mix_times: 0 mix_vol: 0 none_keys: - '' @@ -5159,11 +5155,9 @@ liquid_handler.biomek: mix_stage: type: string mix_times: - items: - maximum: 2147483647 - minimum: -2147483648 - type: integer - type: array + maximum: 2147483647 + minimum: -2147483648 + type: integer mix_vol: maximum: 2147483647 minimum: -2147483648 @@ -7807,8 +7801,7 @@ liquid_handler.prcxi: mix_liquid_height: 0.0 mix_rate: 0 mix_stage: '' - mix_times: - - 0 + mix_times: 0 mix_vol: 0 none_keys: - '' @@ -7937,11 +7930,9 @@ liquid_handler.prcxi: mix_stage: type: string mix_times: - items: - maximum: 2147483647 - minimum: -2147483648 - type: integer - type: array + maximum: 2147483647 + minimum: -2147483648 + type: integer mix_vol: maximum: 2147483647 minimum: -2147483648 diff --git a/unilabos/resources/bioyond/YB_warehouses.py b/unilabos/resources/bioyond/YB_warehouses.py index c546759d..39f79eac 100644 --- a/unilabos/resources/bioyond/YB_warehouses.py +++ b/unilabos/resources/bioyond/YB_warehouses.py @@ -1,9 +1,9 @@ -from unilabos.resources.warehouse import WareHouse, warehouse_factory +from unilabos.resources.warehouse import WareHouse, YB_warehouse_factory def bioyond_warehouse_1x4x4(name: str) -> WareHouse: """创建BioYond 4x1x4仓库""" - return warehouse_factory( + return YB_warehouse_factory( name=name, num_items_x=1, num_items_y=4, @@ -20,7 +20,7 @@ def bioyond_warehouse_1x4x4(name: str) -> WareHouse: def bioyond_warehouse_1x4x2(name: str) -> WareHouse: """创建BioYond 4x1x2仓库""" - return warehouse_factory( + return YB_warehouse_factory( name=name, num_items_x=1, num_items_y=4, @@ -37,7 +37,7 @@ def bioyond_warehouse_1x4x2(name: str) -> WareHouse: # 定义benyond的堆栈 def bioyond_warehouse_1x2x2(name: str) -> WareHouse: """创建BioYond 4x1x4仓库""" - return warehouse_factory( + return YB_warehouse_factory( name=name, num_items_x=2, num_items_y=2, @@ -50,9 +50,26 @@ def bioyond_warehouse_1x2x2(name: str) -> WareHouse: item_dz=120.0, category="YB_warehouse", ) + +def bioyond_warehouse_2x2x1(name: str) -> WareHouse: + """创建BioYond 2x2x1仓库(自动堆栈)""" + return YB_warehouse_factory( + name=name, + num_items_x=2, + num_items_y=2, + num_items_z=1, + dx=10.0, + dy=10.0, + dz=10.0, + item_dx=137.0, + item_dy=96.0, + item_dz=120.0, + category="YB_warehouse", + ) + def bioyond_warehouse_10x1x1(name: str) -> WareHouse: """创建BioYond 4x1x4仓库""" - return warehouse_factory( + return YB_warehouse_factory( name=name, num_items_x=10, num_items_y=1, @@ -67,7 +84,7 @@ def bioyond_warehouse_10x1x1(name: str) -> WareHouse: ) def bioyond_warehouse_1x3x3(name: str) -> WareHouse: """创建BioYond 4x1x4仓库""" - return warehouse_factory( + return YB_warehouse_factory( name=name, num_items_x=1, num_items_y=3, @@ -82,7 +99,7 @@ def bioyond_warehouse_1x3x3(name: str) -> WareHouse: ) def bioyond_warehouse_2x1x3(name: str) -> WareHouse: """创建BioYond 4x1x4仓库""" - return warehouse_factory( + return YB_warehouse_factory( name=name, num_items_x=2, num_items_y=1, @@ -98,7 +115,7 @@ def bioyond_warehouse_2x1x3(name: str) -> WareHouse: def bioyond_warehouse_3x3x1(name: str) -> WareHouse: """创建BioYond 4x1x4仓库""" - return warehouse_factory( + return YB_warehouse_factory( name=name, num_items_x=3, num_items_y=3, @@ -113,7 +130,7 @@ def bioyond_warehouse_3x3x1(name: str) -> WareHouse: ) def bioyond_warehouse_5x1x1(name: str) -> WareHouse: """创建BioYond 4x1x4仓库""" - return warehouse_factory( + return YB_warehouse_factory( name=name, num_items_x=5, num_items_y=1, @@ -128,7 +145,7 @@ def bioyond_warehouse_5x1x1(name: str) -> WareHouse: ) def bioyond_warehouse_3x3x1_2(name: str) -> WareHouse: """创建BioYond 4x1x4仓库""" - return warehouse_factory( + return YB_warehouse_factory( name=name, num_items_x=3, num_items_y=3, @@ -144,7 +161,7 @@ def bioyond_warehouse_3x3x1_2(name: str) -> WareHouse: def bioyond_warehouse_liquid_and_lid_handling(name: str) -> WareHouse: """创建BioYond开关盖加液模块台面""" - return warehouse_factory( + return YB_warehouse_factory( name=name, num_items_x=2, num_items_y=5, @@ -157,4 +174,36 @@ def bioyond_warehouse_liquid_and_lid_handling(name: str) -> WareHouse: item_dz=120.0, category="warehouse", removed_positions=None + ) + +def bioyond_warehouse_3x5x1(name: str) -> WareHouse: + """创建BioYond 3x5x1仓库(手动堆栈)""" + return YB_warehouse_factory( + name=name, + num_items_x=3, + num_items_y=5, + num_items_z=1, + dx=10.0, + dy=10.0, + dz=10.0, + item_dx=137.0, + item_dy=96.0, + item_dz=120.0, + category="warehouse", + ) + +def bioyond_warehouse_20x1x1(name: str) -> WareHouse: + """创建BioYond 20x1x1仓库(粉末加样头堆栈)""" + return YB_warehouse_factory( + name=name, + num_items_x=20, + num_items_y=1, + num_items_z=1, + dx=10.0, + dy=10.0, + dz=10.0, + item_dx=137.0, + item_dy=96.0, + item_dz=120.0, + category="warehouse", ) \ No newline at end of file diff --git a/unilabos/resources/bioyond/bottles.py b/unilabos/resources/bioyond/bottles.py deleted file mode 100644 index 23b9523e..00000000 --- a/unilabos/resources/bioyond/bottles.py +++ /dev/null @@ -1,255 +0,0 @@ -from unilabos.resources.itemized_carrier import Bottle, BottleCarrier -# 工厂函数 - - -def YB_Solid_Stock( - name: str, - diameter: float = 20.0, - height: float = 100.0, - max_volume: float = 30000.0, # 30mL - barcode: str = None, -) -> Bottle: - """创建粉末瓶""" - return Bottle( - name=name, - diameter=diameter,# 未知 - height=height, - max_volume=max_volume, - barcode=barcode, - model="Solid_Stock", - ) - - -def YB_Solid_Vial( - name: str, - diameter: float = 25.0, - height: float = 60.0, - max_volume: float = 30000.0, # 30mL - barcode: str = None, -) -> Bottle: - """创建粉末瓶""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="Solid_Vial", - ) - - -def YB_Liquid_Vial( - name: str, - diameter: float = 25.0, - height: float = 60.0, - max_volume: float = 30000.0, # 30mL - barcode: str = None, -) -> Bottle: - """创建滴定液瓶""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="Liquid_Vial", - ) - - -def YB_Solution_Beaker( - name: str, - diameter: float = 60.0, - height: float = 70.0, - max_volume: float = 200000.0, # 200mL - barcode: str = None, -) -> Bottle: - """创建溶液烧杯""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="Solution_Beaker", - ) - - -def YB_Reagent_Bottle( - name: str, - diameter: float = 70.0, - height: float = 120.0, - max_volume: float = 500000.0, # 500mL - barcode: str = None, -) -> Bottle: - """创建试剂瓶""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="Reagent_Bottle", - ) - - -def YB_100ml_Liquid_Bottle( - name: str, - diameter: float = 50.0, - height: float = 80.0, - max_volume: float = 100000.0, # 100mL - barcode: str = None, -) -> Bottle: - """创建100ml液体瓶""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="100ml_Liquid_Bottle", - ) - - -def YB_Liquid_Bottle( - name: str, - diameter: float = 40.0, - height: float = 70.0, - max_volume: float = 50000.0, # 50mL - barcode: str = None, -) -> Bottle: - """创建液体瓶""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="Liquid_Bottle", - ) - - -def YB_High_Viscosity_Liquid_Bottle( - name: str, - diameter: float = 45.0, - height: float = 75.0, - max_volume: float = 60000.0, # 60mL - barcode: str = None, -) -> Bottle: - """创建高粘液瓶""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="High_Viscosity_Liquid_Bottle", - ) - - -def YB_Large_Dispense_Head( - name: str, - diameter: float = 35.0, - height: float = 90.0, - max_volume: float = 50000.0, # 50mL - barcode: str = None, -) -> Bottle: - """创建加样头(大)""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="Large_Dispense_Head", - ) - - -def YB_5ml_Dispensing_Vial( - name: str, - diameter: float = 15.0, - height: float = 45.0, - max_volume: float = 5000.0, # 5mL - barcode: str = None, -) -> Bottle: - """创建5ml分液瓶""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="5ml_Dispensing_Vial", - ) - - -def YB_20ml_Dispensing_Vial( - name: str, - diameter: float = 20.0, - height: float = 65.0, - max_volume: float = 20000.0, # 20mL - barcode: str = None, -) -> Bottle: - """创建20ml分液瓶""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="20ml_Dispensing_Vial", - ) - - -def YB_Small_Solution_Bottle( - name: str, - diameter: float = 35.0, - height: float = 60.0, - max_volume: float = 40000.0, # 40mL - barcode: str = None, -) -> Bottle: - """创建配液瓶(小)""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="Small_Solution_Bottle", - ) - - -def YB_Large_Solution_Bottle( - name: str, - diameter: float = 55.0, - height: float = 90.0, - max_volume: float = 150000.0, # 150mL - barcode: str = None, -) -> Bottle: - """创建配液瓶(大)""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="Large_Solution_Bottle", - ) - - -def YB_Pipette_Tip( - name: str, - diameter: float = 10.0, - height: float = 50.0, - max_volume: float = 1000.0, # 1mL - barcode: str = None, -) -> Bottle: - """创建枪头""" - return Bottle( - name=name, - diameter=diameter, - height=height, - max_volume=max_volume, - barcode=barcode, - model="Pipette_Tip", - ) - diff --git a/unilabos/resources/bioyond/decks.py b/unilabos/resources/bioyond/decks.py index fa242c3d..f15e0655 100644 --- a/unilabos/resources/bioyond/decks.py +++ b/unilabos/resources/bioyond/decks.py @@ -1,7 +1,7 @@ from os import name from pylabrobot.resources import Deck, Coordinate, Rotation -from unilabos.resources.bioyond.warehouses import bioyond_warehouse_1x4x4, bioyond_warehouse_1x4x2, bioyond_warehouse_liquid_and_lid_handling, bioyond_warehouse_1x2x2, bioyond_warehouse_1x3x3, bioyond_warehouse_10x1x1, bioyond_warehouse_3x3x1, bioyond_warehouse_3x3x1_2, bioyond_warehouse_5x1x1 +from unilabos.resources.bioyond.YB_warehouses import bioyond_warehouse_1x4x4, bioyond_warehouse_1x4x2, bioyond_warehouse_liquid_and_lid_handling, bioyond_warehouse_1x2x2, bioyond_warehouse_1x3x3, bioyond_warehouse_10x1x1, bioyond_warehouse_3x3x1, bioyond_warehouse_3x3x1_2, bioyond_warehouse_5x1x1, bioyond_warehouse_20x1x1, bioyond_warehouse_2x2x1, bioyond_warehouse_3x5x1 class BIOYOND_PolymerReactionStation_Deck(Deck): @@ -85,31 +85,23 @@ class BIOYOND_YB_Deck(Deck): def setup(self) -> None: # 添加仓库 self.warehouses = { - "321窗口": bioyond_warehouse_1x2x2("321窗口"), - "43窗口": bioyond_warehouse_1x2x2("43窗口"), - "手动传递窗左": bioyond_warehouse_1x3x3("手动传递窗左"), - "手动传递窗右": bioyond_warehouse_1x3x3("手动传递窗右"), - "加样头堆栈左": bioyond_warehouse_10x1x1("加样头堆栈左"), - "加样头堆栈右": bioyond_warehouse_10x1x1("加样头堆栈右"), - - "15ml配液堆栈左": bioyond_warehouse_3x3x1("15ml配液堆栈左"), - "母液加样右": bioyond_warehouse_3x3x1_2("母液加样右"), - "大瓶母液堆栈左": bioyond_warehouse_5x1x1("大瓶母液堆栈左"), - "大瓶母液堆栈右": bioyond_warehouse_5x1x1("大瓶母液堆栈右"), + "自动堆栈-左": bioyond_warehouse_2x2x1("自动堆栈-左"), + "自动堆栈-右": bioyond_warehouse_2x2x1("自动堆栈-右"), + "手动堆栈-左": bioyond_warehouse_3x5x1("手动堆栈-左"), + "手动堆栈-右": bioyond_warehouse_3x5x1("手动堆栈-右"), + "粉末加样头堆栈": bioyond_warehouse_20x1x1("粉末加样头堆栈"), + "配液站内试剂仓库": bioyond_warehouse_3x3x1("配液站内试剂仓库"), + "试剂替换仓库": bioyond_warehouse_10x1x1("试剂替换仓库"), } # warehouse 的位置 self.warehouse_locations = { - "321窗口": Coordinate(-150.0, 158.0, 0.0), - "43窗口": Coordinate(4160.0, 158.0, 0.0), - "手动传递窗左": Coordinate(-150.0, 877.0, 0.0), - "手动传递窗右": Coordinate(4160.0, 877.0, 0.0), - "加样头堆栈左": Coordinate(385.0, 1300.0, 0.0), - "加样头堆栈右": Coordinate(2187.0, 1300.0, 0.0), - - "15ml配液堆栈左": Coordinate(749.0, 355.0, 0.0), - "母液加样右": Coordinate(2152.0, 333.0, 0.0), - "大瓶母液堆栈左": Coordinate(1164.0, 676.0, 0.0), - "大瓶母液堆栈右": Coordinate(2717.0, 676.0, 0.0), + "自动堆栈-左": Coordinate(-300.0, 158.0, 0.0), + "自动堆栈-右": Coordinate(4160.0, 158.0, 0.0), + "手动堆栈-左": Coordinate(-400.0, 877.0, 0.0), + "手动堆栈-右": Coordinate(4160.0, 877.0, 0.0), + "粉末加样头堆栈": Coordinate(385.0, 1300.0, 0.0), + "配液站内试剂仓库": Coordinate(1164.0, 676.0, 0.0), + "试剂替换仓库": Coordinate(2717.0, 676.0, 0.0), } for warehouse_name, warehouse in self.warehouses.items(): diff --git a/unilabos/resources/bioyond/warehouses.py b/unilabos/resources/bioyond/warehouses.py deleted file mode 100644 index 6eb4f26e..00000000 --- a/unilabos/resources/bioyond/warehouses.py +++ /dev/null @@ -1,161 +0,0 @@ -from unilabos.resources.warehouse import WareHouse, warehouse_factory - - -def bioyond_warehouse_1x4x4(name: str) -> WareHouse: - """创建BioYond 4x1x4仓库""" - return warehouse_factory( - name=name, - num_items_x=1, - num_items_y=4, - num_items_z=4, - dx=10.0, - dy=10.0, - dz=10.0, - item_dx=137.0, - item_dy=96.0, - item_dz=120.0, - category="warehouse", - ) - - - -def bioyond_warehouse_1x4x2(name: str) -> WareHouse: - """创建BioYond 4x1x2仓库""" - return warehouse_factory( - name=name, - num_items_x=1, - num_items_y=4, - num_items_z=2, - dx=10.0, - dy=10.0, - dz=10.0, - item_dx=137.0, - item_dy=96.0, - item_dz=120.0, - category="warehouse", - removed_positions=None - ) - # 定义benyond的堆栈 -def bioyond_warehouse_1x2x2(name: str) -> WareHouse: - """创建BioYond 4x1x4仓库""" - return warehouse_factory( - name=name, - num_items_x=2, - num_items_y=2, - num_items_z=1, - dx=10.0, - dy=10.0, - dz=10.0, - item_dx=137.0, - item_dy=96.0, - item_dz=120.0, - category="YB_warehouse", - ) -def bioyond_warehouse_10x1x1(name: str) -> WareHouse: - """创建BioYond 4x1x4仓库""" - return warehouse_factory( - name=name, - num_items_x=10, - num_items_y=1, - num_items_z=1, - dx=10.0, - dy=10.0, - dz=10.0, - item_dx=137.0, - item_dy=96.0, - item_dz=120.0, - category="warehouse", - ) -def bioyond_warehouse_1x3x3(name: str) -> WareHouse: - """创建BioYond 4x1x4仓库""" - return warehouse_factory( - name=name, - num_items_x=1, - num_items_y=3, - num_items_z=3, - dx=10.0, - dy=10.0, - dz=10.0, - item_dx=137.0, - item_dy=96.0, - item_dz=120.0, - category="warehouse", - ) -def bioyond_warehouse_2x1x3(name: str) -> WareHouse: - """创建BioYond 4x1x4仓库""" - return warehouse_factory( - name=name, - num_items_x=2, - num_items_y=1, - num_items_z=3, - dx=10.0, - dy=10.0, - dz=10.0, - item_dx=137.0, - item_dy=96.0, - item_dz=120.0, - category="warehouse", - ) - -def bioyond_warehouse_3x3x1(name: str) -> WareHouse: - """创建BioYond 4x1x4仓库""" - return warehouse_factory( - name=name, - num_items_x=3, - num_items_y=3, - num_items_z=1, - dx=10.0, - dy=10.0, - dz=10.0, - item_dx=137.0, - item_dy=96.0, - item_dz=120.0, - category="warehouse", - ) -def bioyond_warehouse_5x1x1(name: str) -> WareHouse: - """创建BioYond 4x1x4仓库""" - return warehouse_factory( - name=name, - num_items_x=5, - num_items_y=1, - num_items_z=1, - dx=10.0, - dy=10.0, - dz=10.0, - item_dx=137.0, - item_dy=96.0, - item_dz=120.0, - category="warehouse", - ) -def bioyond_warehouse_3x3x1_2(name: str) -> WareHouse: - """创建BioYond 4x1x4仓库""" - return warehouse_factory( - name=name, - num_items_x=3, - num_items_y=3, - num_items_z=1, - dx=12.0, - dy=12.0, - dz=12.0, - item_dx=137.0, - item_dy=96.0, - item_dz=120.0, - category="warehouse", - ) - -def bioyond_warehouse_liquid_and_lid_handling(name: str) -> WareHouse: - """创建BioYond开关盖加液模块台面""" - return warehouse_factory( - name=name, - num_items_x=2, - num_items_y=5, - num_items_z=1, - dx=10.0, - dy=10.0, - dz=10.0, - item_dx=137.0, - item_dy=96.0, - item_dz=120.0, - category="warehouse", - removed_positions=None - ) \ No newline at end of file diff --git a/unilabos/resources/warehouse.py b/unilabos/resources/warehouse.py index c665b7fa..2f613cfa 100644 --- a/unilabos/resources/warehouse.py +++ b/unilabos/resources/warehouse.py @@ -8,7 +8,7 @@ from unilabos.resources.itemized_carrier import ItemizedCarrier, ResourcePLR LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -def warehouse_factory( +def YB_warehouse_factory( name: str, num_items_x: int = 1, num_items_y: int = 4, @@ -44,7 +44,8 @@ def warehouse_factory( name_prefix=name, ) len_x, len_y = (num_items_x, num_items_y) if num_items_z == 1 else (num_items_y, num_items_z) if num_items_x == 1 else (num_items_x, num_items_z) - keys = [f"{LETTERS[j]}{i + 1}" for i in range(len_x) for j in range(len_y)] + + keys = [f"{LETTERS[len_y-1-j]}{str(i+1).zfill(2)}" for j in range(len_y) for i in range(len_x)] sites = {i: site for i, site in zip(keys, _sites.values())} return WareHouse( From e561c818b8b747e73c2a9930c086fc45bdbe33d4 Mon Sep 17 00:00:00 2001 From: calvincao Date: Mon, 3 Nov 2025 14:31:50 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=E6=96=B0=E4=BB=93=E5=BA=93=E9=85=8D=E7=BD=AE=E5=88=B0?= =?UTF-8?q?config.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增多个仓库配置,包括大分液瓶堆栈、小分液瓶堆栈、站内Tip头盒堆栈等 - 每个仓库配置包含UUID和站点UUID映射 --- .../workstation/bioyond_studio/config.py | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/unilabos/devices/workstation/bioyond_studio/config.py b/unilabos/devices/workstation/bioyond_studio/config.py index 39a2589d..8a6fcf88 100644 --- a/unilabos/devices/workstation/bioyond_studio/config.py +++ b/unilabos/devices/workstation/bioyond_studio/config.py @@ -147,7 +147,89 @@ WAREHOUSE_MAPPING = { "C03": "3a1baa20-a7b1-cca7-781e-0522b729bf5d", "C04": "3a1baa20-a7b1-7c98-5fd9-5855355ae4b3" } + }, + "大分液瓶堆栈": { + "uuid": "", + "site_uuids": { + "A01": "3a19da3d-4f3d-bcac-2932-7542041e10e0", + "A02": "3a19da3d-4f3d-4d75-38ac-fb58ad0687c3", + "A03": "3a19da3d-4f3d-b25e-f2b1-85342a5b7eae", + "B01": "3a19da3d-4f3d-fd3e-058a-2733a0925767", + "B02": "3a19da3d-4f3d-37bd-a944-c391ad56857f", + "B03": "3a19da3d-4f3d-e353-7862-c6d1d4bc667f", + "C01": "3a19da3d-4f3d-9519-5da7-76179c958e70", + "C02": "3a19da3d-4f3d-b586-d7ed-9ec244f6f937", + "C03": "3a19da3d-4f3d-5061-249b-35dfef732811" + } + }, + "小分液瓶堆栈": { + "uuid": "", + "site_uuids": { + "C03": "3a19da40-55bf-8943-d20d-a8b3ea0d16c0" + } + }, + "站内Tip头盒堆栈": { + "uuid": "", + "site_uuids": { + "A01": "3a19deab-d5cc-be1e-5c37-4e9e5a664388", + "A02": "3a19deab-d5cc-b394-8141-27cb3853e8ea", + "B01": "3a19deab-d5cc-4dca-596e-ca7414d5f501", + "B02": "3a19deab-d5cc-9bc0-442b-12d9d59aa62a", + "C01": "3a19deab-d5cc-2eaf-b6a4-f0d54e4f1246", + "C02": "3a19deab-d5cc-d9f4-25df-b8018c372bc7" + } + }, + "配液站内配液大板仓库(无需提前上料)": { + "uuid": "", + "site_uuids": { + "A01": "3a1a21dc-06af-3915-9cb9-80a9dc42f386" + } + }, + "配液站内配液小板仓库(无需以前入料)": { + "uuid": "", + "site_uuids": { + "A01": "3a1a21de-8e8b-7938-2d06-858b36c10e31" + } + }, + "移液站内大瓶板仓库(无需提前如料)": { + "uuid": "", + "site_uuids": { + "A01": "3a1a224c-c727-fa62-1f2b-0037a84b9fca" + } + }, + "移液站内小瓶板仓库(无需提前入料)": { + "uuid": "", + "site_uuids": { + "A01": "3a1a224d-ed49-710c-a9c3-3fc61d479cbb" + } + }, + "适配器位仓库": { + "uuid": "", + "site_uuids": { + "A01": "3a1abd46-18fe-1f56-6ced-a1f7fe08e36c" + } + }, + "1号2号手套箱交接堆栈": { + "uuid": "", + "site_uuids": { + "A01": "3a1baa49-7f77-35aa-60b1-e55a45d065fa" + } + }, + "2号手套箱内部堆栈": { + "uuid": "", + "site_uuids": { + "A01": "3a1baa4b-393e-9f86-3921-7a18b0a8e371", + "A02": "3a1baa4b-393e-9425-928b-ee0f6f679d44", + "A03": "3a1baa4b-393e-0baf-632b-59dfdc931a3a", + "B01": "3a1baa4b-393e-f8aa-c8a9-956f3132f05c", + "B02": "3a1baa4b-393e-ef05-42f6-53f4c6e89d70", + "B03": "3a1baa4b-393e-c07b-a924-a9f0dfda9711", + "C01": "3a1baa4b-393e-4c2b-821a-16a7fe025c48", + "C02": "3a1baa4b-393e-2eaf-61a1-9063c832d5a2", + "C03": "3a1baa4b-393e-034e-8e28-8626d934a85f" + } } + } # 物料类型配置 From b5b235896706b0e5661fe89920e55c49222722ac Mon Sep 17 00:00:00 2001 From: calvincao Date: Mon, 3 Nov 2025 18:20:50 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0HTTP=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E9=85=8D=E7=BD=AE=E5=92=8C=E7=89=A9=E6=96=99=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E6=98=A0=E5=B0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改BIOYOND_HTTP_HOST的默认值为新的IP地址172.21.32.91 - 调整物料类型映射中“加样头(大)”的UUID顺序,并注释掉“加样头(大)板”配置 --- unilabos/devices/workstation/bioyond_studio/config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unilabos/devices/workstation/bioyond_studio/config.py b/unilabos/devices/workstation/bioyond_studio/config.py index 8a6fcf88..740af61c 100644 --- a/unilabos/devices/workstation/bioyond_studio/config.py +++ b/unilabos/devices/workstation/bioyond_studio/config.py @@ -17,7 +17,7 @@ API_CONFIG = { "report_token": os.getenv("BIOYOND_REPORT_TOKEN", "CHANGE_ME_TOKEN"), # HTTP 服务配置 - "HTTP_host": os.getenv("BIOYOND_HTTP_HOST", "172.21.32.83"), # HTTP服务监听地址,监听计算机飞连ip地址 + "HTTP_host": os.getenv("BIOYOND_HTTP_HOST", "172.21.32.91"), # HTTP服务监听地址,监听计算机飞连ip地址 "HTTP_port": int(os.getenv("BIOYOND_HTTP_PORT", "8080")), "debug_mode": False,# 调试模式 } @@ -237,8 +237,8 @@ MATERIAL_TYPE_MAPPINGS = { "100ml液体": ("YB_1Bottle100mlCarrier", "d37166b3-ecaa-481e-bd84-3032b795ba07"), "液": ("YB_1BottleCarrier", "3a190ca1-2add-2b23-f8e1-bbd348b7f790"), "高粘液": ("YB_1GaoNianYeBottleCarrier", "abe8df30-563d-43d2-85e0-cabec59ddc16"), - "加样头(大)": ("YB_jia_yang_tou_da", "3a190ca0-b2f6-9aeb-8067-547e72c11469"), - "加样头(大)板": ("YB_jia_yang_tou_da_1X1_carrier", "a8e714ae-2a4e-4eb9-9614-e4c140ec3f16"), + "加样头(大)": ("YB_jia_yang_tou_da_1X1_carrier", "3a190ca0-b2f6-9aeb-8067-547e72c11469"), + # "加样头(大)板": ("YB_jia_yang_tou_da_1X1_carrier", "a8e714ae-2a4e-4eb9-9614-e4c140ec3f16"), "5ml分液瓶板": ("YB_6x5ml_DispensingVialCarrier", "3a192fa4-007d-ec7b-456e-2a8be7a13f23"), "5ml分液瓶": ("YB_fen_ye_5ml_Bottle", "3a192c2a-ebb7-58a1-480d-8b3863bf74f4"), "20ml分液瓶板": ("YB_6x20ml_DispensingVialCarrier", "3a192fa4-47db-3449-162a-eaf8aba57e27"),