mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2026-02-05 05:45:10 +00:00
修改tube_rack的初始化,以及move_plate方法出现的物料增加问题
This commit is contained in:
@@ -364,8 +364,8 @@ class PRCXI9300TubeRack(TubeRack):
|
|||||||
def __init__(self, name: str, size_x: float, size_y: float, size_z: float,
|
def __init__(self, name: str, size_x: float, size_y: float, size_z: float,
|
||||||
category: str = "tube_rack",
|
category: str = "tube_rack",
|
||||||
items: Optional[Dict[str, Any]] = None,
|
items: Optional[Dict[str, Any]] = None,
|
||||||
ordered_items: Optional[OrderedDict] = None,
|
ordered_items: collections.OrderedDict = None,
|
||||||
ordering: Optional[OrderedDict] = None,
|
ordering: Optional[collections.OrderedDict] = None,
|
||||||
model: Optional[str] = None,
|
model: Optional[str] = None,
|
||||||
material_info: Optional[Dict[str, Any]] = None,
|
material_info: Optional[Dict[str, Any]] = None,
|
||||||
**kwargs):
|
**kwargs):
|
||||||
@@ -380,7 +380,7 @@ class PRCXI9300TubeRack(TubeRack):
|
|||||||
# ordering 的值是字符串,这种情况下我们让 TubeRack 使用默认行为
|
# ordering 的值是字符串,这种情况下我们让 TubeRack 使用默认行为
|
||||||
# 不在初始化时创建 items,而是在 deserialize 后处理
|
# 不在初始化时创建 items,而是在 deserialize 后处理
|
||||||
items_to_pass = None
|
items_to_pass = None
|
||||||
ordering_param = collections.OrderedDict() # 提供空的 ordering 来满足要求
|
ordering_param = collections.OrderedDict((k, None) for k in ordering.keys()) # 提供空的 ordering 来满足要求
|
||||||
# 保存 ordering 信息以便后续处理
|
# 保存 ordering 信息以便后续处理
|
||||||
self._temp_ordering = ordering
|
self._temp_ordering = ordering
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -1468,6 +1468,8 @@ class BaseROS2DeviceNode(Node, Generic[T]):
|
|||||||
if isinstance(rs, list):
|
if isinstance(rs, list):
|
||||||
for r in rs:
|
for r in rs:
|
||||||
res = self.resource_tracker.parent_resource(r) # 获取 resource 对象
|
res = self.resource_tracker.parent_resource(r) # 获取 resource 对象
|
||||||
|
elif type(rs).__name__ == "ResourceHolder":
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
res = self.resource_tracker.parent_resource(rs)
|
res = self.resource_tracker.parent_resource(rs)
|
||||||
if id(res) not in seen:
|
if id(res) not in seen:
|
||||||
|
|||||||
@@ -16283,7 +16283,7 @@
|
|||||||
"size_y": 85.8,
|
"size_y": 85.8,
|
||||||
"size_z": 42.66,
|
"size_z": 42.66,
|
||||||
"barcode": null,
|
"barcode": null,
|
||||||
"category": null,
|
"category": "tube_rack",
|
||||||
"ordering": {
|
"ordering": {
|
||||||
"A1": "PlateT6_0_0",
|
"A1": "PlateT6_0_0",
|
||||||
"A2": "PlateT6_1_0",
|
"A2": "PlateT6_1_0",
|
||||||
|
|||||||
Reference in New Issue
Block a user