更新自动化配置抓取位置

This commit is contained in:
zhangshixiang
2026-01-15 17:21:14 +08:00
parent b045ab4e0a
commit be054589b5
3 changed files with 1913 additions and 4254 deletions

View File

@@ -79,6 +79,7 @@ class ItemizedCarrier(ResourcePLR):
category: Optional[str] = "carrier",
model: Optional[str] = None,
invisible_slots: Optional[str] = None,
content_type: Optional[List[str]] = ["bottle", "container", "tube", "bottle_carrier", "tip_rack"],
):
super().__init__(
name=name,
@@ -92,6 +93,7 @@ class ItemizedCarrier(ResourcePLR):
self.num_items_x, self.num_items_y, self.num_items_z = num_items_x, num_items_y, num_items_z
self.invisible_slots = [] if invisible_slots is None else invisible_slots
self.layout = "z-y" if self.num_items_z > 1 and self.num_items_x == 1 else "x-z" if self.num_items_z > 1 and self.num_items_y == 1 else "x-y"
self.content_type = content_type
if isinstance(sites, dict):
sites = sites or {}
@@ -419,7 +421,7 @@ class ItemizedCarrier(ResourcePLR):
self[identifier] if isinstance(self[identifier], str) else None,
"position": {"x": location.x, "y": location.y, "z": location.z},
"size": self.child_size[identifier],
"content_type": ["bottle", "container", "tube", "bottle_carrier", "tip_rack"]
"content_type": self.content_type
} for identifier, location in self.child_locations.items()]
}