Skip to content

Commit

Permalink
introduction of fixture groups to the v5 deck configuration schema
Browse files Browse the repository at this point in the history
  • Loading branch information
CaseyBatten committed Mar 20, 2024
1 parent a8b71f9 commit 934b28a
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 0 deletions.
25 changes: 25 additions & 0 deletions robot-server/robot_server/deck_configuration/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,23 @@ class UnexpectedSerialNumberError:
opentrons_module_serial_number: str


@dataclass(frozen=True)
class MissingGroupFixtureError:
"""When a member of a fixture group has been mounted but other required members of that group have not."""

cutout_id: str
cutout_fixture_id: str
missing_fixture_id: str


ConfigurationError = Union[
UnoccupiedCutoutError,
OvercrowdedCutoutError,
InvalidLocationError,
UnrecognizedCutoutFixtureError,
InvalidSerialNumberError,
UnexpectedSerialNumberError,
MissingGroupFixtureError,
]


Expand Down Expand Up @@ -139,6 +149,21 @@ def get_configuration_errors(
)
)

for fixture_id in found_cutout_fixture["fixtureGroup"]:
result = [
placement.cutout_fixture_id
for placement in placements
if fixture_id in placement.cutout_fixture_id
]
if len(result) == 0:
errors.add(
MissingGroupFixtureError(
cutout_id=placement.cutout_id,
cutout_fixture_id=placement.cutout_fixture_id,
missing_fixture_id=fixture_id,
)
)

return errors


Expand Down
14 changes: 14 additions & 0 deletions shared-data/deck/definitions/5/ot3_standard.json
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,7 @@
"cutoutB1": ["B1"],
"cutoutA1": ["A1"]
},
"fixtureGroup": [],
"height": 0
},
{
Expand All @@ -771,6 +772,7 @@
"cutoutB2": ["B2"],
"cutoutA2": ["A2"]
},
"fixtureGroup": [],
"height": 0
},
{
Expand All @@ -784,6 +786,7 @@
"cutoutB3": ["B3"],
"cutoutA3": ["A3"]
},
"fixtureGroup": [],
"height": 0
},
{
Expand All @@ -797,6 +800,7 @@
"cutoutB3": ["B3", "B4"],
"cutoutA3": ["A3", "A4"]
},
"fixtureGroup": [],
"height": 0
},
{
Expand All @@ -823,6 +827,7 @@
"cutoutB3": ["movableTrashB3"],
"cutoutA3": ["movableTrashA3"]
},
"fixtureGroup": [],
"height": 40
},
{
Expand All @@ -833,6 +838,7 @@
"providesAddressableAreas": {
"cutoutD3": ["1ChannelWasteChute", "8ChannelWasteChute"]
},
"fixtureGroup": [],
"height": 124.5
},
{
Expand All @@ -848,6 +854,7 @@
"gripperWasteChute"
]
},
"fixtureGroup": [],
"height": 124.5
},
{
Expand All @@ -858,6 +865,7 @@
"providesAddressableAreas": {
"cutoutD3": ["1ChannelWasteChute", "8ChannelWasteChute", "D4"]
},
"fixtureGroup": [],
"height": 124.5
},
{
Expand All @@ -874,6 +882,7 @@
"D4"
]
},
"fixtureGroup": [],
"height": 124.5
},
{
Expand All @@ -882,6 +891,7 @@
"mayMountTo": ["cutoutA1"],
"displayName": "Rear Slot portion of the Thermocycler Moduler",
"providesAddressableAreas": {},
"fixtureGroup": ["thermocyclerModuleV2Rear", "thermocyclerModuleV2Front"],
"height": 124.5
},
{
Expand All @@ -892,6 +902,7 @@
"providesAddressableAreas": {
"cutoutB1": ["thermocyclerModuleV2"]
},
"fixtureGroup": ["thermocyclerModuleV2Rear", "thermocyclerModuleV2Front"],
"height": 124.5
},
{
Expand All @@ -918,6 +929,7 @@
"cutoutB3": ["heaterShakerV1B3"],
"cutoutA3": ["heaterShakerV1A3"]
},
"fixtureGroup": [],
"height": 40
},
{
Expand All @@ -944,6 +956,7 @@
"cutoutB3": ["temperatureModuleV2B3"],
"cutoutA3": ["temperatureModuleV2A3"]
},
"fixtureGroup": [],
"height": 40
},
{
Expand Down Expand Up @@ -978,6 +991,7 @@
"cutoutB3": ["magneticBlockV1B3"],
"cutoutA3": ["magneticBlockV1A3"]
},
"fixtureGroup": [],
"height": 40
}
],
Expand Down
7 changes: 7 additions & 0 deletions shared-data/deck/schemas/5.json
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,13 @@
}
}
},
"fixtureGroup": {
"description": "The group of fixtures that must exist in the deck configuration if this fixture exists.",
"type": "array",
"items": {
"type": "string"
}
},
"height": {
"description": "The vertical distance (mm) from the cutout fixture's origin to its tallest physical feature that an instrument could collide with.",
"type": "number"
Expand Down
1 change: 1 addition & 0 deletions shared-data/python/opentrons_shared_data/deck/dev_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ class CutoutFixture(TypedDict):
mayMountTo: List[str]
displayName: str
providesAddressableAreas: Dict[str, List[str]]
fixtureGroup: List[str]
height: float


Expand Down

0 comments on commit 934b28a

Please sign in to comment.