mirror of
https://github.com/deepmodeling/Uni-Lab-OS
synced 2026-04-28 02:50:01 +00:00
feat: update coin cell assembly, bioyond cell workstation, and resource configs
This commit is contained in:
@@ -169,23 +169,28 @@ class MaterialPlate(ItemizedResource[MaterialHole]):
|
||||
model: Optional[str] = None,
|
||||
) -> "MaterialPlate":
|
||||
"""工厂方法:创建带 4x4 洞位的料板(仅用于初始 setup,不在反序列化路径调用)"""
|
||||
plate = cls(name=name, size_x=size_x, size_y=size_y, size_z=size_z, category=category, model=model)
|
||||
# 默认洞位间距(与 _unilabos_state 默认值保持一致)
|
||||
hole_spacing_x = 24.0
|
||||
hole_spacing_y = 24.0
|
||||
# 先建洞位,再作为 ordered_items 传入构造函数
|
||||
# (ItemizedResource.__init__ 要求 ordered_items 或 ordering 二选一必须有值)
|
||||
holes = create_ordered_items_2d(
|
||||
klass=MaterialHole,
|
||||
num_items_x=4,
|
||||
num_items_y=4,
|
||||
dx=(size_x - 4 * plate._unilabos_state["hole_spacing_x"]) / 2,
|
||||
dy=(size_y - 4 * plate._unilabos_state["hole_spacing_y"]) / 2,
|
||||
dx=(size_x - 4 * hole_spacing_x) / 2,
|
||||
dy=(size_y - 4 * hole_spacing_y) / 2,
|
||||
dz=size_z,
|
||||
item_dx=plate._unilabos_state["hole_spacing_x"],
|
||||
item_dy=plate._unilabos_state["hole_spacing_y"],
|
||||
item_dx=hole_spacing_x,
|
||||
item_dy=hole_spacing_y,
|
||||
size_x=16,
|
||||
size_y=16,
|
||||
size_z=16,
|
||||
)
|
||||
for hole_name, hole in holes.items():
|
||||
plate.assign_child_resource(hole, location=hole.location)
|
||||
return plate
|
||||
return cls(
|
||||
name=name, size_x=size_x, size_y=size_y, size_z=size_z,
|
||||
ordered_items=holes, category=category, model=model,
|
||||
)
|
||||
|
||||
def update_locations(self):
|
||||
# TODO:调多次相加
|
||||
@@ -542,6 +547,7 @@ class YihuaCoinCellDeck(Deck):
|
||||
size_z: float = 100.0,
|
||||
origin: Coordinate = Coordinate(-2200, 0, 0),
|
||||
category: str = "coin_cell_deck",
|
||||
setup: bool = False,
|
||||
):
|
||||
super().__init__(
|
||||
name=name,
|
||||
@@ -550,6 +556,8 @@ class YihuaCoinCellDeck(Deck):
|
||||
size_z=100.0,
|
||||
origin=origin,
|
||||
)
|
||||
if setup:
|
||||
self.setup()
|
||||
|
||||
def setup(self) -> None:
|
||||
"""设置工作站的标准布局 - 包含子弹夹、料盘、瓶架等完整配置"""
|
||||
|
||||
@@ -193,7 +193,12 @@ class CoinCellAssemblyWorkstation(WorkstationBase):
|
||||
|
||||
def post_init(self, ros_node: ROS2WorkstationNode):
|
||||
self._ros_node = ros_node
|
||||
#self.deck = create_a_coin_cell_deck()
|
||||
|
||||
# Deck 为空时(反序列化未恢复子节点),主动调用 setup() 初始化子物料
|
||||
if self.deck and not self.deck.children and hasattr(self.deck, "setup") and callable(self.deck.setup):
|
||||
logger.info("YihuaCoinCellDeck 无子节点,调用 setup() 初始化")
|
||||
self.deck.setup()
|
||||
|
||||
ROS2DeviceNode.run_async_func(self._ros_node.update_resource, True, **{
|
||||
"resources": [self.deck]
|
||||
})
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
Time,open_circuit_voltage,pole_weight,assembly_time,assembly_pressure,electrolyte_volume,coin_num,electrolyte_code,coin_cell_code,formulation_order_code,formulation_ratio
|
||||
20260325_132011,0.0,12.119999885559082,405.0,3189,20,7,test0008,13163721,,
|
||||
20260325_132301,0.0,12.079999923706055,153.0,3172,20,7,test0008,13200631,,
|
||||
20260325_132516,0.0,12.119999885559082,153.0,3205,20,7,test0008,13224031,,
|
||||
20260325_132758,0.0,12.309999465942383,161.0,3221,20,7,test0008,13251351,,
|
||||
20260325_133215,0.0,12.520000457763672,257.0,3318,20,7,NoRead88,13293861,,
|
||||
20260325_133820,0.0,12.15999984741211,363.0,3269,20,7,NoRead88,13321291,,
|
||||
20260325_134049,0.0,12.100000381469727,149.0,3383,20,7,NoRead88,13381641,,
|
||||
20260325_134327,0.0,12.369999885559082,157.0,3237,20,7,NoRead88,13404651,,
|
||||
20260325_160512,0.0,12.299999237060547,238.0,3577,20,7,NoRead88,16022161,,
|
||||
20260325_160734,0.0,12.40000057220459,155.0,3464,20,7,NoRead88,16045481,,
|
||||
20260325_161010,0.0,12.269999504089355,155.0,3609,20,7,NoRead88,60731181,,
|
||||
20260325_161252,0.0,12.579999923706055,162.0,3496,20,7,NoRead88,16100671,,
|
||||
20260325_161636,0.0,12.619999885559082,223.0,3399,20,7,NoRead88,16135951,,
|
||||
20260325_161909,0.0,12.039999961853027,153.0,3302,20,7,NoRead88,16163351,,
|
||||
20260325_162145,0.0,12.00999927520752,155.0,3350,20,7,NoRead88,16190731,,
|
||||
20260325_162429,0.0,12.329998970031738,163.0,3561,20,7,NoRead88,16214361,,
|
||||
20260325_162841,0.0,12.579999923706055,251.0,3593,20,7,NoRead88,16260311,,
|
||||
20260325_163118,0.0,12.25999927520752,156.0,3545,20,7,NoRead88,16283921,,
|
||||
20260325_163356,0.0,12.220000267028809,157.0,3464,20,7,NoRead88,16311611,,
|
||||
20260325_163641,0.0,12.199999809265137,165.0,3674,20,7,NoRead88,16335401,,
|
||||
20260325_164046,0.0,12.25,244.0,3512,20,7,NoRead88,16380881,,
|
||||
20260325_164321,0.0,12.079999923706055,154.0,3609,20,7,NoRead88,16404401,,
|
||||
20260325_164556,0.0,12.029999732971191,155.0,3593,20,7,NoRead88,16431851,,
|
||||
20260325_164840,0.0,12.100000381469727,163.0,3496,20,7,NoRead88,16455451,,
|
||||
20260325_172206,0.0,12.00999927520752,245.0,3011,20,7,NoRead88,17193041,BSO2026032500006,"{""EMC"": 0.949, ""LiFSI"": 0.051}"
|
||||
20260325_172608,0.0,12.0,242.0,3253,20,7,NoRead88,17233491,BSO2026032500007,"{""EMC"": 0.9582, ""LiFSI"": 0.0418}"
|
||||
20260325_183415,0.0,12.690000534057617,1226.0,3528,20,7,NoRead88,18150131,BSO2026032500011,"{""EMC"": 0.949, ""LiFSI"": 0.051}"
|
||||
20260325_190044,0.0,12.130000114440918,1586.0,3528,20,7,NoRead88,18355771,BSO2026032500012,"{""EMC"": 0.9582, ""LiFSI"": 0.0418}"
|
||||
|
Reference in New Issue
Block a user