Skip to content

Commit

Permalink
allow labware stacking in geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
andySigler committed Mar 11, 2024
1 parent e1ac648 commit 11babab
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions api/src/opentrons/protocol_engine/state/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -1069,13 +1069,15 @@ def _labware_gripper_offsets(
have non-default offsets that are specific to location of the module on deck,
so, this code only checks for the presence of those known offsets.
"""
parent_location = self._labware.get_parent_location(labware_id)
parent_location = self._labware.get_location(labware_id)
assert isinstance(
parent_location, (DeckSlotLocation, ModuleLocation)
parent_location, (DeckSlotLocation, ModuleLocation, OnLabwareLocation)
), "No gripper offsets for off-deck labware"

if isinstance(parent_location, DeckSlotLocation):
slot_name = parent_location.slotName
elif isinstance(parent_location, OnLabwareLocation):
slot_name = self._labware.get_parent_location(labware_id).slotName
else:
module_loc = self._modules.get_location(parent_location.moduleId)
slot_name = module_loc.slotName
Expand Down

0 comments on commit 11babab

Please sign in to comment.