From 0ba80b5d7a605b5aa09b3edbba8d3c6547fad6ba Mon Sep 17 00:00:00 2001 From: Max Marrone Date: Tue, 28 Nov 2023 14:06:52 -0500 Subject: [PATCH 01/11] Remove dropTipsOffset and dropLabwareOffset from schema and bindings. --- shared-data/deck/schemas/4.json | 8 -------- shared-data/js/types.ts | 2 -- .../python/opentrons_shared_data/deck/dev_types.py | 2 -- 3 files changed, 12 deletions(-) diff --git a/shared-data/deck/schemas/4.json b/shared-data/deck/schemas/4.json index b6f23db3df0..c0fa65fb528 100644 --- a/shared-data/deck/schemas/4.json +++ b/shared-data/deck/schemas/4.json @@ -174,14 +174,6 @@ "ableToDropLabware": { "description": "Whether labware is allowed to be dropped (different then being placed) into this area.", "type": "boolean" - }, - "dropTipsOffset": { - "description": "Relative positional offset of where the pipette should drop tips from.", - "$ref": "#/definitions/xyzArray" - }, - "dropLabwareOffset": { - "description": "Relative positional offset of where the gripper should drop labware from.", - "$ref": "#/definitions/xyzArray" } } } diff --git a/shared-data/js/types.ts b/shared-data/js/types.ts index 577ab42fe6f..15b51591b6d 100644 --- a/shared-data/js/types.ts +++ b/shared-data/js/types.ts @@ -280,8 +280,6 @@ export interface AddressableArea { compatibleModuleTypes: ModuleType[] ableToDropLabware?: boolean ableToDropTips?: boolean - dropLabwareOffset?: CoordinateTuple - dropTipsOffset?: CoordinateTuple matingSurfaceUnitVector?: UnitVectorTuple } diff --git a/shared-data/python/opentrons_shared_data/deck/dev_types.py b/shared-data/python/opentrons_shared_data/deck/dev_types.py index 1698d44ad2f..06f372d73bd 100644 --- a/shared-data/python/opentrons_shared_data/deck/dev_types.py +++ b/shared-data/python/opentrons_shared_data/deck/dev_types.py @@ -101,8 +101,6 @@ class AddressableArea(_RequiredAddressableArea, total=False): matingSurfaceUnitVector: List[Union[Literal[1], Literal[-1]]] ableToDropTips: bool ableToDropLabware: bool - dropTipsOffset: List[float] - dropLabwareOffset: List[float] class Cutout(TypedDict): From 189e0384ed7d1d7a9c4214717f134b30b974ea52 Mon Sep 17 00:00:00 2001 From: Max Marrone Date: Tue, 28 Nov 2023 14:06:59 -0500 Subject: [PATCH 02/11] Clarify docs in schema. --- shared-data/deck/schemas/4.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-data/deck/schemas/4.json b/shared-data/deck/schemas/4.json index c0fa65fb528..eb0cb3b81ed 100644 --- a/shared-data/deck/schemas/4.json +++ b/shared-data/deck/schemas/4.json @@ -168,11 +168,11 @@ } }, "ableToDropTips": { - "description": "Whether tips are allowed to be dropped into this area.", + "description": "Whether tips are allowed to be dropped into this area. If `true`, the top-center of the `boundingBox` should be a good location for the bottom-center of all the tips when they're dropped.", "type": "boolean" }, "ableToDropLabware": { - "description": "Whether labware is allowed to be dropped (different then being placed) into this area.", + "description": "Whether labware is allowed to be dropped (different from being placed) into this area. If `true`, the top-center of the `boundingBox` should be a good location for the bottom-center of the labware when it's dropped.", "type": "boolean" } } From 06c574c2ab65eb27bf0223a448c37a06c9e523dd Mon Sep 17 00:00:00 2001 From: Max Marrone Date: Tue, 5 Dec 2023 09:48:30 -0500 Subject: [PATCH 03/11] Update movableTrashXX. --- .../deck/definitions/4/ot3_standard.json | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/shared-data/deck/definitions/4/ot3_standard.json b/shared-data/deck/definitions/4/ot3_standard.json index 8f901698622..3f1a0bbd804 100644 --- a/shared-data/deck/definitions/4/ot3_standard.json +++ b/shared-data/deck/definitions/4/ot3_standard.json @@ -263,8 +263,7 @@ "zDimension": 40 }, "displayName": "Trash Bin", - "ableToDropTips": true, - "dropTipsOffset": [123.25, 45.75, 40.0] + "ableToDropTips": true }, { "id": "movableTrashC1", @@ -276,8 +275,7 @@ "zDimension": 40 }, "displayName": "Trash Bin", - "ableToDropTips": true, - "dropTipsOffset": [123.25, 45.75, 40.0] + "ableToDropTips": true }, { "id": "movableTrashB1", @@ -289,8 +287,7 @@ "zDimension": 40 }, "displayName": "Trash Bin", - "ableToDropTips": true, - "dropTipsOffset": [123.25, 45.75, 40.0] + "ableToDropTips": true }, { "id": "movableTrashA1", @@ -302,8 +299,7 @@ "zDimension": 40 }, "displayName": "Trash Bin", - "ableToDropTips": true, - "dropTipsOffset": [123.25, 45.75, 40.0] + "ableToDropTips": true }, { "id": "movableTrashD3", @@ -315,8 +311,7 @@ "zDimension": 40 }, "displayName": "Trash Bin", - "ableToDropTips": true, - "dropTipsOffset": [123.25, 45.75, 40.0] + "ableToDropTips": true }, { "id": "movableTrashC3", @@ -328,8 +323,7 @@ "zDimension": 40 }, "displayName": "Trash Bin", - "ableToDropTips": true, - "dropTipsOffset": [123.25, 45.75, 40.0] + "ableToDropTips": true }, { "id": "movableTrashB3", @@ -341,8 +335,7 @@ "zDimension": 40 }, "displayName": "Trash Bin", - "ableToDropTips": true, - "dropTipsOffset": [123.25, 45.75, 40.0] + "ableToDropTips": true }, { "id": "movableTrashA3", @@ -354,8 +347,7 @@ "zDimension": 40 }, "displayName": "Trash Bin", - "ableToDropTips": true, - "dropTipsOffset": [123.25, 45.75, 40.0] + "ableToDropTips": true }, { "id": "1and8ChannelWasteChute", From 201f4142f9e7fc2028a05721f02b26b0e1516e76 Mon Sep 17 00:00:00 2001 From: Max Marrone Date: Tue, 5 Dec 2023 10:06:19 -0500 Subject: [PATCH 04/11] Update 1and8ChannelWasteChute. --- shared-data/deck/definitions/4/ot3_standard.json | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/shared-data/deck/definitions/4/ot3_standard.json b/shared-data/deck/definitions/4/ot3_standard.json index 3f1a0bbd804..ac3c72684c9 100644 --- a/shared-data/deck/definitions/4/ot3_standard.json +++ b/shared-data/deck/definitions/4/ot3_standard.json @@ -352,15 +352,14 @@ { "id": "1and8ChannelWasteChute", "areaType": "wasteChute", - "offsetFromCutoutFixture": [-13.5, 0, 0], + "offsetFromCutoutFixture": [64, -27, 114.5], "boundingBox": { - "xDimension": 155.0, - "yDimension": 86.0, - "zDimension": 125.0 + "xDimension": 0, + "yDimension": 63, + "zDimension": 0 }, "displayName": "1/8 Channel Waste Chute", - "ableToDropTips": true, - "dropTipsOffset": [64.0, 21.91, 115.0] + "ableToDropTips": true }, { "id": "96ChannelWasteChute", From 380c04e0059eb8202f1f8b677549f1adf8e01d37 Mon Sep 17 00:00:00 2001 From: Max Marrone Date: Tue, 5 Dec 2023 10:17:54 -0500 Subject: [PATCH 05/11] Update 96ChannelWasteChute. --- shared-data/deck/definitions/4/ot3_standard.json | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/shared-data/deck/definitions/4/ot3_standard.json b/shared-data/deck/definitions/4/ot3_standard.json index ac3c72684c9..ef291336142 100644 --- a/shared-data/deck/definitions/4/ot3_standard.json +++ b/shared-data/deck/definitions/4/ot3_standard.json @@ -364,15 +364,14 @@ { "id": "96ChannelWasteChute", "areaType": "wasteChute", - "offsetFromCutoutFixture": [-13.5, 0, 0], + "offsetFromCutoutFixture": [14.445, -20.915, 114.5], "boundingBox": { - "xDimension": 155.0, - "yDimension": 86.0, - "zDimension": 125.0 + "xDimension": 99, + "yDimension": 63, + "zDimension": 0 }, "displayName": "96 Channel Waste Chute", - "ableToDropTips": true, - "dropTipsOffset": [14.445, 42.085, 115] + "ableToDropTips": true }, { "id": "gripperWasteChute", From c8aa7a6ce20bc44a67a4845165880bd1c2e57065 Mon Sep 17 00:00:00 2001 From: Max Marrone Date: Tue, 5 Dec 2023 10:21:53 -0500 Subject: [PATCH 06/11] Update gripperWasteChute. --- shared-data/deck/definitions/4/ot3_standard.json | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/shared-data/deck/definitions/4/ot3_standard.json b/shared-data/deck/definitions/4/ot3_standard.json index ef291336142..884364834c0 100644 --- a/shared-data/deck/definitions/4/ot3_standard.json +++ b/shared-data/deck/definitions/4/ot3_standard.json @@ -376,15 +376,14 @@ { "id": "gripperWasteChute", "areaType": "wasteChute", - "offsetFromCutoutFixture": [-13.5, 0, 0], + "offsetFromCutoutFixture": [64, 29, 136.5], "boundingBox": { - "xDimension": 155.0, - "yDimension": 86.0, - "zDimension": 125.0 + "xDimension": 0, + "yDimension": 0, + "zDimension": 0 }, "displayName": "Gripper Waste Chute", - "ableToDropLabware": true, - "dropLabwareOffset": [64, 29, 136.5] + "ableToDropLabware": true } ], "cutouts": [ From f0787bbcf3d80491eb471077b2f0685e1fe1fa97 Mon Sep 17 00:00:00 2001 From: Max Marrone Date: Wed, 6 Dec 2023 10:10:46 -0500 Subject: [PATCH 07/11] Update Protocol Engine to use top-center of AA as gripper drop point. --- .../resources/deck_configuration_provider.py | 27 ++----------------- .../protocol_engine/state/geometry.py | 11 +++----- api/src/opentrons/protocol_engine/types.py | 4 +-- .../test_deck_configuration_provider.py | 12 +-------- .../state/test_addressable_area_view.py | 14 ---------- 5 files changed, 8 insertions(+), 60 deletions(-) diff --git a/api/src/opentrons/protocol_engine/resources/deck_configuration_provider.py b/api/src/opentrons/protocol_engine/resources/deck_configuration_provider.py index a40de3bd8d5..535fa06c93c 100644 --- a/api/src/opentrons/protocol_engine/resources/deck_configuration_provider.py +++ b/api/src/opentrons/protocol_engine/resources/deck_configuration_provider.py @@ -1,9 +1,9 @@ """Deck configuration resource provider.""" -from typing import List, Set, Tuple, Optional +from typing import List, Set, Tuple from opentrons_shared_data.deck.dev_types import DeckDefinitionV4, CutoutFixture -from opentrons.types import Point, DeckSlotName +from opentrons.types import DeckSlotName from ..types import ( AddressableArea, @@ -103,27 +103,6 @@ def get_addressable_area_from_name( y=addressable_area["boundingBox"]["yDimension"], z=addressable_area["boundingBox"]["zDimension"], ) - drop_tips_deck_offset = addressable_area.get("dropTipsOffset") - drop_tip_location: Optional[Point] - if drop_tips_deck_offset: - drop_tip_location = Point( - x=drop_tips_deck_offset[0] + cutout_position.x, - y=drop_tips_deck_offset[1] + cutout_position.y, - z=drop_tips_deck_offset[2] + cutout_position.z, - ) - else: - drop_tip_location = None - - drop_labware_deck_offset = addressable_area.get("dropLabwareOffset") - drop_labware_location: Optional[Point] - if drop_labware_deck_offset: - drop_labware_location = Point( - x=drop_labware_deck_offset[0] + cutout_position.x, - y=drop_labware_deck_offset[1] + cutout_position.y, - z=drop_labware_deck_offset[2] + cutout_position.z, - ) - else: - drop_labware_location = None return AddressableArea( area_name=addressable_area["id"], @@ -135,8 +114,6 @@ def get_addressable_area_from_name( compatible_module_types=addressable_area.get( "compatibleModuleTypes", [] ), - drop_tip_location=drop_tip_location, - drop_labware_location=drop_labware_location, ) raise AddressableAreaDoesNotExistError( f"Could not find addressable area with name {addressable_area_name}" diff --git a/api/src/opentrons/protocol_engine/state/geometry.py b/api/src/opentrons/protocol_engine/state/geometry.py index 99703fecd3a..ea6799bbfe5 100644 --- a/api/src/opentrons/protocol_engine/state/geometry.py +++ b/api/src/opentrons/protocol_engine/state/geometry.py @@ -575,14 +575,11 @@ def get_labware_grip_point( elif isinstance(location, AddressableAreaLocation): location_name = location.addressableAreaName if fixture_validation.is_gripper_waste_chute(location_name): - gripper_waste_chute = self._addressable_areas.get_addressable_area( - location_name - ) - drop_labware_location = gripper_waste_chute.drop_labware_location - if drop_labware_location is None: - raise ValueError( - f"{location_name} does not have a drop labware location associated with it" + drop_labware_location = ( + self._addressable_areas.get_addressable_area_move_to_location( + location_name ) + ) return drop_labware_location + Point(z=grip_height_from_labware_bottom) # Location should have been pre-validated so this will be a deck/staging area slot else: diff --git a/api/src/opentrons/protocol_engine/types.py b/api/src/opentrons/protocol_engine/types.py index 18932fb8c2e..988ff206958 100644 --- a/api/src/opentrons/protocol_engine/types.py +++ b/api/src/opentrons/protocol_engine/types.py @@ -9,7 +9,7 @@ from typing_extensions import Literal, TypeGuard from opentrons_shared_data.pipette.dev_types import PipetteNameType -from opentrons.types import MountType, DeckSlotName, Point +from opentrons.types import MountType, DeckSlotName from opentrons.hardware_control.modules import ( ModuleType as ModuleType, ) @@ -703,8 +703,6 @@ class AddressableArea: bounding_box: Dimensions position: AddressableOffsetVector compatible_module_types: List[SharedDataModuleType] - drop_tip_location: Optional[Point] - drop_labware_location: Optional[Point] class PostRunHardwareState(Enum): diff --git a/api/tests/opentrons/protocol_engine/resources/test_deck_configuration_provider.py b/api/tests/opentrons/protocol_engine/resources/test_deck_configuration_provider.py index 57b8f8ad978..2859cc5af9c 100644 --- a/api/tests/opentrons/protocol_engine/resources/test_deck_configuration_provider.py +++ b/api/tests/opentrons/protocol_engine/resources/test_deck_configuration_provider.py @@ -7,7 +7,7 @@ from opentrons_shared_data.deck import load as load_deck from opentrons_shared_data.deck.dev_types import DeckDefinitionV4 -from opentrons.types import Point, DeckSlotName +from opentrons.types import DeckSlotName from opentrons.protocol_engine.errors import ( FixtureDoesNotExistError, @@ -253,8 +253,6 @@ def test_get_potential_cutout_fixtures_raises( "temperatureModuleType", "heaterShakerModuleType", ], - drop_tip_location=None, - drop_labware_location=None, ), lazy_fixture("ot2_standard_deck_def"), ), @@ -272,8 +270,6 @@ def test_get_potential_cutout_fixtures_raises( "temperatureModuleType", "heaterShakerModuleType", ], - drop_tip_location=None, - drop_labware_location=None, ), lazy_fixture("ot2_short_trash_deck_def"), ), @@ -291,8 +287,6 @@ def test_get_potential_cutout_fixtures_raises( "heaterShakerModuleType", "magneticBlockType", ], - drop_tip_location=None, - drop_labware_location=None, ), lazy_fixture("ot3_standard_deck_def"), ), @@ -306,8 +300,6 @@ def test_get_potential_cutout_fixtures_raises( bounding_box=Dimensions(x=246.5, y=91.5, z=40), position=AddressableOffsetVector(x=-16, y=-0.75, z=3), compatible_module_types=[], - drop_tip_location=Point(x=124.25, y=47.75, z=43.0), - drop_labware_location=None, ), lazy_fixture("ot3_standard_deck_def"), ), @@ -321,8 +313,6 @@ def test_get_potential_cutout_fixtures_raises( bounding_box=Dimensions(x=155.0, y=86.0, z=125.0), position=AddressableOffsetVector(x=-12.5, y=2, z=3), compatible_module_types=[], - drop_tip_location=None, - drop_labware_location=Point(x=65, y=31, z=139.5), ), lazy_fixture("ot3_standard_deck_def"), ), diff --git a/api/tests/opentrons/protocol_engine/state/test_addressable_area_view.py b/api/tests/opentrons/protocol_engine/state/test_addressable_area_view.py index 93efce11c41..086e8795aef 100644 --- a/api/tests/opentrons/protocol_engine/state/test_addressable_area_view.py +++ b/api/tests/opentrons/protocol_engine/state/test_addressable_area_view.py @@ -96,8 +96,6 @@ def test_get_loaded_addressable_area() -> None: bounding_box=Dimensions(x=1, y=2, z=3), position=AddressableOffsetVector(x=7, y=8, z=9), compatible_module_types=["magneticModuleType"], - drop_tip_location=Point(11, 22, 33), - drop_labware_location=None, ) subject = get_addressable_area_view( loaded_addressable_areas_by_name={"abc": addressable_area} @@ -124,8 +122,6 @@ def test_get_addressable_area_for_simulation_already_loaded() -> None: bounding_box=Dimensions(x=1, y=2, z=3), position=AddressableOffsetVector(x=7, y=8, z=9), compatible_module_types=["magneticModuleType"], - drop_tip_location=Point(11, 22, 33), - drop_labware_location=None, ) subject = get_addressable_area_view( loaded_addressable_areas_by_name={"abc": addressable_area}, @@ -154,8 +150,6 @@ def test_get_addressable_area_for_simulation_not_loaded(decoy: Decoy) -> None: bounding_box=Dimensions(x=1, y=2, z=3), position=AddressableOffsetVector(x=7, y=8, z=9), compatible_module_types=["magneticModuleType"], - drop_tip_location=Point(11, 22, 33), - drop_labware_location=None, ) decoy.when( @@ -226,8 +220,6 @@ def test_get_addressable_area_position() -> None: bounding_box=Dimensions(x=10, y=20, z=30), position=AddressableOffsetVector(x=1, y=2, z=3), compatible_module_types=[], - drop_tip_location=None, - drop_labware_location=None, ) } ) @@ -248,8 +240,6 @@ def test_get_addressable_area_move_to_location() -> None: bounding_box=Dimensions(x=10, y=20, z=30), position=AddressableOffsetVector(x=1, y=2, z=3), compatible_module_types=[], - drop_tip_location=None, - drop_labware_location=None, ) } ) @@ -270,8 +260,6 @@ def test_get_addressable_area_center() -> None: bounding_box=Dimensions(x=10, y=20, z=30), position=AddressableOffsetVector(x=1, y=2, z=3), compatible_module_types=[], - drop_tip_location=None, - drop_labware_location=None, ) } ) @@ -329,8 +317,6 @@ def test_get_slot_definition() -> None: bounding_box=Dimensions(x=1, y=2, z=3), position=AddressableOffsetVector(x=7, y=8, z=9), compatible_module_types=["magneticModuleType"], - drop_tip_location=None, - drop_labware_location=None, ) } ) From cf67fb1093cd79ecfc7279e8ec3164b517e97d4e Mon Sep 17 00:00:00 2001 From: Max Marrone Date: Wed, 6 Dec 2023 13:56:39 -0500 Subject: [PATCH 08/11] Split 1and8ChannelWasteChute into 1ChannelWasteChute and 8ChannelWasteChute. --- .../deck/definitions/4/ot3_standard.json | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/shared-data/deck/definitions/4/ot3_standard.json b/shared-data/deck/definitions/4/ot3_standard.json index 884364834c0..bff80b838cb 100644 --- a/shared-data/deck/definitions/4/ot3_standard.json +++ b/shared-data/deck/definitions/4/ot3_standard.json @@ -350,7 +350,19 @@ "ableToDropTips": true }, { - "id": "1and8ChannelWasteChute", + "id": "1ChannelWasteChute", + "areaType": "wasteChute", + "offsetFromCutoutFixture": [64, 36, 114.5], + "boundingBox": { + "xDimension": 0, + "yDimension": 0, + "zDimension": 0 + }, + "displayName": "1 Channel Waste Chute", + "ableToDropTips": true + }, + { + "id": "8ChannelWasteChute", "areaType": "wasteChute", "offsetFromCutoutFixture": [64, -27, 114.5], "boundingBox": { @@ -358,7 +370,7 @@ "yDimension": 63, "zDimension": 0 }, - "displayName": "1/8 Channel Waste Chute", + "displayName": "8 Channel Waste Chute", "ableToDropTips": true }, { @@ -537,7 +549,7 @@ "mayMountTo": ["cutoutD3"], "displayName": "Waste Chute Adapter for 1 or 8 Channel Pipettes", "providesAddressableAreas": { - "cutoutD3": ["1and8ChannelWasteChute"] + "cutoutD3": ["1ChannelWasteChute", "8ChannelWasteChute"] }, "height": 124.5 }, @@ -547,7 +559,8 @@ "displayName": "Waste Chute Adapter for 96 Channel Pipette or Gripper", "providesAddressableAreas": { "cutoutD3": [ - "1and8ChannelWasteChute", + "1ChannelWasteChute", + "8ChannelWasteChute", "96ChannelWasteChute", "gripperWasteChute" ] @@ -559,7 +572,7 @@ "mayMountTo": ["cutoutD3"], "displayName": "Staging Slot With Waste Chute Adapter for 96 Channel Pipette or Gripper", "providesAddressableAreas": { - "cutoutD3": ["1and8ChannelWasteChute", "D4"] + "cutoutD3": ["1ChannelWasteChute", "8ChannelWasteChute", "D4"] }, "height": 124.5 }, @@ -569,7 +582,8 @@ "displayName": "Staging Slot With Waste Chute Adapter and Staging Area Slot", "providesAddressableAreas": { "cutoutD3": [ - "1and8ChannelWasteChute", + "1ChannelWasteChute", + "8ChannelWasteChute", "96ChannelWasteChute", "gripperWasteChute", "D4" From f6c4e7ec4dd2c4ba687d131b62f3fbf827f4438f Mon Sep 17 00:00:00 2001 From: Max Marrone Date: Wed, 6 Dec 2023 13:58:22 -0500 Subject: [PATCH 09/11] Update Python things that hard-coded 1and8ChannelWasteChute. There are additional JavaScript things, which are being addressed in a different PR. --- api/src/opentrons/protocol_api/core/engine/instrument.py | 9 +++++---- .../protocol_engine/resources/fixture_validation.py | 9 +++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/api/src/opentrons/protocol_api/core/engine/instrument.py b/api/src/opentrons/protocol_api/core/engine/instrument.py index a0b6e6ea757..ab31a18a264 100644 --- a/api/src/opentrons/protocol_api/core/engine/instrument.py +++ b/api/src/opentrons/protocol_api/core/engine/instrument.py @@ -412,10 +412,11 @@ def _move_to_disposal_location( addressable_area_name = disposal_location._addressable_area_name if isinstance(disposal_location, WasteChute): num_channels = self.get_channels() - if num_channels == 96: - addressable_area_name = "1and8ChannelWasteChute" - else: - addressable_area_name = "96ChannelWasteChute" + addressable_area_name = { + 1: "1ChannelWasteChute", + 8: "8ChannelWasteChute", + 96: "96ChannelWasteChute", + }[num_channels] self._engine_client.move_to_addressable_area( pipette_id=self._pipette_id, diff --git a/api/src/opentrons/protocol_engine/resources/fixture_validation.py b/api/src/opentrons/protocol_engine/resources/fixture_validation.py index bee59415d11..9807cc6beaa 100644 --- a/api/src/opentrons/protocol_engine/resources/fixture_validation.py +++ b/api/src/opentrons/protocol_engine/resources/fixture_validation.py @@ -6,7 +6,8 @@ def is_waste_chute(addressable_area_name: str) -> bool: """Check if an addressable area is a Waste Chute.""" return addressable_area_name in { - "1and8ChannelWasteChute", + "1ChannelWasteChute", + "8ChannelWasteChute", "96ChannelWasteChute", "gripperWasteChute", } @@ -19,7 +20,11 @@ def is_gripper_waste_chute(addressable_area_name: str) -> bool: def is_drop_tip_waste_chute(addressable_area_name: str) -> bool: """Check if an addressable area is a Waste Chute compatible for dropping tips.""" - return addressable_area_name in {"1and8ChannelWasteChute", "96ChannelWasteChute"} + return addressable_area_name in { + "1ChannelWasteChute", + "8ChannelWasteChute", + "96ChannelWasteChute", + } def is_trash(addressable_area_name: str) -> bool: From 1a4b244605794cb24e650a82266e7b1490e3d370 Mon Sep 17 00:00:00 2001 From: Max Marrone Date: Wed, 6 Dec 2023 16:02:40 -0500 Subject: [PATCH 10/11] Update test. --- .../resources/test_deck_configuration_provider.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/tests/opentrons/protocol_engine/resources/test_deck_configuration_provider.py b/api/tests/opentrons/protocol_engine/resources/test_deck_configuration_provider.py index 2859cc5af9c..5d4566597b6 100644 --- a/api/tests/opentrons/protocol_engine/resources/test_deck_configuration_provider.py +++ b/api/tests/opentrons/protocol_engine/resources/test_deck_configuration_provider.py @@ -310,8 +310,8 @@ def test_get_potential_cutout_fixtures_raises( area_type=AreaType.WASTE_CHUTE, base_slot=DeckSlotName.SLOT_A1, display_name="Gripper Waste Chute", - bounding_box=Dimensions(x=155.0, y=86.0, z=125.0), - position=AddressableOffsetVector(x=-12.5, y=2, z=3), + bounding_box=Dimensions(x=0, y=0, z=0), + position=AddressableOffsetVector(x=65, y=31, z=139.5), compatible_module_types=[], ), lazy_fixture("ot3_standard_deck_def"), From 79e1bc5a77ec554f78c7495767da8ec40a3b6fd2 Mon Sep 17 00:00:00 2001 From: Max Marrone Date: Wed, 6 Dec 2023 17:57:18 -0500 Subject: [PATCH 11/11] Update OT-2 fixed trashes. I don't understand how to interpret the dimensions in the old fixed trash labware, and I'm scared of messing with the drop-tip point, so I guess let's make these 0-sized points in the same place as the old dropTipsOffsets. This means the fixedTrash and shortFixedTrash addressable areas will no longer have the same origin as the v3 defs' slot 12. That's fine and actually makes sense. Those addressable areas are supposed to be equivalent to a v3 well position, not a v3 deck slot position. --- .../deck/definitions/4/ot2_short_trash.json | 11 +++++------ shared-data/deck/definitions/4/ot2_standard.json | 11 +++++------ shared-data/python/tests/deck/test_position.py | 14 +------------- 3 files changed, 11 insertions(+), 25 deletions(-) diff --git a/shared-data/deck/definitions/4/ot2_short_trash.json b/shared-data/deck/definitions/4/ot2_short_trash.json index 6d566cb3801..7a313aebb56 100644 --- a/shared-data/deck/definitions/4/ot2_short_trash.json +++ b/shared-data/deck/definitions/4/ot2_short_trash.json @@ -215,15 +215,14 @@ { "id": "shortFixedTrash", "areaType": "fixedTrash", - "offsetFromCutoutFixture": [0.0, 0.0, 0.0], + "offsetFromCutoutFixture": [82.84, 80.0, 58], "boundingBox": { - "xDimension": 172.86, - "yDimension": 165.86, - "zDimension": 58 + "xDimension": 0, + "yDimension": 0, + "zDimension": 0 }, "displayName": "Slot 12/Short Fixed Trash", - "ableToDropTips": true, - "dropTipsOffset": [82.84, 80.0, 58] + "ableToDropTips": true } ], "cutouts": [ diff --git a/shared-data/deck/definitions/4/ot2_standard.json b/shared-data/deck/definitions/4/ot2_standard.json index 206a72eaa0b..ebfefa5f57e 100644 --- a/shared-data/deck/definitions/4/ot2_standard.json +++ b/shared-data/deck/definitions/4/ot2_standard.json @@ -215,15 +215,14 @@ { "id": "fixedTrash", "areaType": "fixedTrash", - "offsetFromCutoutFixture": [0.0, 0.0, 0.0], + "offsetFromCutoutFixture": [82.84, 80, 82], "boundingBox": { - "xDimension": 172.86, - "yDimension": 165.86, - "zDimension": 82 + "xDimension": 0, + "yDimension": 0, + "zDimension": 0 }, "displayName": "Slot 12/Fixed Trash", - "ableToDropTips": true, - "dropTipsOffset": [82.84, 80.0, 82.0] + "ableToDropTips": true } ], "cutouts": [ diff --git a/shared-data/python/tests/deck/test_position.py b/shared-data/python/tests/deck/test_position.py index 4b6746d36b3..1b10d556444 100644 --- a/shared-data/python/tests/deck/test_position.py +++ b/shared-data/python/tests/deck/test_position.py @@ -76,9 +76,7 @@ def get_v4_slot_positions( stacks_with_slots = ( (cutout, cutout_fixture, addressable_area) for (cutout, cutout_fixture, addressable_area) in get_v4_stacks(definition) - # v3 has a "slot" for the fixed trash, but in v4, fixedTrash is its own area type. Count - # it as a "slot," since we still want to compare the positions across schema versions. - if addressable_area["areaType"] in {"slot", "fixedTrash"} + if addressable_area["areaType"] == "slot" ) slot_positions = ( @@ -100,14 +98,4 @@ def test_v3_and_v4_positional_equivalence(definition_name: str) -> None: v3_slot_positions = get_v3_slot_positions(deck_v3) v4_slot_positions = get_v4_slot_positions(deck_v4) - # For the purposes of this comparison, the v4 addressable areas named "fixedTrash" and - # "shortFixedTrash" should be compared to slot 12 in v3. - v4_slot_positions = set( - ( - "12" if slot_id in {"fixedTrash", "shortFixedTrash"} else slot_id, - slot_position, - ) - for slot_id, slot_position in v4_slot_positions - ) - assert v3_slot_positions == v4_slot_positions