diff --git a/unilabos/devices/workstation/bioyond_studio/station.py b/unilabos/devices/workstation/bioyond_studio/station.py index af81d532..d6fe4870 100644 --- a/unilabos/devices/workstation/bioyond_studio/station.py +++ b/unilabos/devices/workstation/bioyond_studio/station.py @@ -172,6 +172,8 @@ class BioyondWorkstation(WorkstationBase): def post_init(self, ros_node: ROS2WorkstationNode): self._ros_node = ros_node + print("~~~",self._ros_node) + print("deck",self.deck) ROS2DeviceNode.run_async_func(self._ros_node.update_resource, True, **{ "resources": [self.deck] }) diff --git a/unilabos/registry/devices/coin_cell_workstation.yaml b/unilabos/registry/devices/coin_cell_workstation.yaml index 4738946b..06caa0f9 100644 --- a/unilabos/registry/devices/coin_cell_workstation.yaml +++ b/unilabos/registry/devices/coin_cell_workstation.yaml @@ -79,7 +79,7 @@ coincellassemblyworkstation_device: elec_num: null elec_use_num: null elec_vol: 50 - file_path: D:\coin_cell_data + file_path: C:\Users\67484\Desktop handles: {} placeholder_keys: {} result: {} @@ -103,7 +103,7 @@ coincellassemblyworkstation_device: default: 50 type: integer file_path: - default: D:\coin_cell_data + default: C:\Users\67484\Desktop type: string required: - elec_num 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/decks.py b/unilabos/resources/bioyond/decks.py index 7bf1c38c..b89a0324 100644 --- a/unilabos/resources/bioyond/decks.py +++ b/unilabos/resources/bioyond/decks.py @@ -72,7 +72,7 @@ class BIOYOND_PolymerPreparationStation_Deck(Deck): class BIOYOND_YB_Deck(Deck): def __init__( self, - name: str = "YB_Bioyond_Deck", + name: str = "YB_Deck", size_x: float = 4150, size_y: float = 1400.0, size_z: float = 2670.0, @@ -86,36 +86,28 @@ 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(): self.assign_child_resource(warehouse, location=self.warehouse_locations[warehouse_name]) - + # def YB_Deck(name: str) -> Deck: # # by=BIOYOND_YB_Deck(name=name) # # by.setup()