Skip to content

Commit

Permalink
add cutout fixtures and helpers for module fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
b-cooper committed Mar 20, 2024
1 parent 934b28a commit 64b5208
Show file tree
Hide file tree
Showing 7 changed files with 312 additions and 84 deletions.
16 changes: 12 additions & 4 deletions shared-data/deck/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@ import ot2StandardDeckV4 from './definitions/4/ot2_standard.json'
import ot2ShortFixedTrashDeckV4 from './definitions/4/ot2_short_trash.json'
import ot3StandardDeckV4 from './definitions/4/ot3_standard.json'

// v5 deck defs
import ot2StandardDeckV5 from './definitions/5/ot2_standard.json'
import ot2ShortFixedTrashDeckV5 from './definitions/5/ot2_short_trash.json'
import ot3StandardDeckV5 from './definitions/5/ot3_standard.json'

import deckExample from './fixtures/3/deckExample.json'

import type { DeckDefinition } from '../js/types'

export * from './types/schemaV4'
export * from './types/schemaV5'

export {
ot2StandardDeckV3,
Expand All @@ -21,13 +26,16 @@ export {
ot2StandardDeckV4,
ot2ShortFixedTrashDeckV4,
ot3StandardDeckV4,
ot2StandardDeckV5,
ot2ShortFixedTrashDeckV5,
ot3StandardDeckV5,
deckExample,
}

const latestDeckDefinitions = {
ot2StandardDeckV4,
ot2ShortFixedTrashDeckV4,
ot3StandardDeckV4,
ot2StandardDeckV5,
ot2ShortFixedTrashDeckV5,
ot3StandardDeckV5,
}

export function getDeckDefinitions(): Record<string, DeckDefinition> {
Expand Down
128 changes: 128 additions & 0 deletions shared-data/deck/types/schemaV5.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
export type FlexAddressableAreaName =
| 'A1'
| 'B1'
| 'C1'
| 'D1'
| 'A2'
| 'B2'
| 'C2'
| 'D2'
| 'A3'
| 'B3'
| 'C3'
| 'D3'
| 'A4'
| 'B4'
| 'C4'
| 'D4'
| 'movableTrashA1'
| 'movableTrashB1'
| 'movableTrashC1'
| 'movableTrashD1'
| 'movableTrashA3'
| 'movableTrashB3'
| 'movableTrashC3'
| 'movableTrashD3'
| '1ChannelWasteChute'
| '8ChannelWasteChute'
| '96ChannelWasteChute'
| 'gripperWasteChute'
| 'thermocyclerModule'
| 'heaterShakerA1'
| 'heaterShakerB1'
| 'heaterShakerC1'
| 'heaterShakerD1'
| 'heaterShakerA3'
| 'heaterShakerB3'
| 'heaterShakerC3'
| 'heaterShakerD3'
| 'temperatureModuleA1'
| 'temperatureModuleB1'
| 'temperatureModuleC1'
| 'temperatureModuleD1'
| 'temperatureModuleA3'
| 'temperatureModuleB3'
| 'temperatureModuleC3'
| 'temperatureModuleD3'

export type OT2AddressableAreaName =
| '1'
| '2'
| '3'
| '4'
| '5'
| '6'
| '7'
| '8'
| '9'
| '10'
| '11'
| '12'
| 'fixedTrash'

export type AddressableAreaName =
| FlexAddressableAreaName
| OT2AddressableAreaName

export type CutoutId =
| 'cutoutD1'
| 'cutoutD2'
| 'cutoutD3'
| 'cutoutC1'
| 'cutoutC2'
| 'cutoutC3'
| 'cutoutB1'
| 'cutoutB2'
| 'cutoutB3'
| 'cutoutA1'
| 'cutoutA2'
| 'cutoutA3'

export type OT2CutoutId =
| 'cutout1'
| 'cutout2'
| 'cutout3'
| 'cutout4'
| 'cutout5'
| 'cutout6'
| 'cutout7'
| 'cutout8'
| 'cutout9'
| 'cutout10'
| 'cutout11'
| 'cutout12'

export type SingleSlotCutoutFixtureId =
| 'singleLeftSlot'
| 'singleCenterSlot'
| 'singleRightSlot'

export type StagingAreaRightSlotFixtureId = 'stagingAreaRightSlot'

export type TrashBinAdapterCutoutFixtureId = 'trashBinAdapter'

export type WasteChuteCutoutFixtureId =
| 'wasteChuteRightAdapterCovered'
| 'wasteChuteRightAdapterNoCover'
| 'stagingAreaSlotWithWasteChuteRightAdapterCovered'
| 'stagingAreaSlotWithWasteChuteRightAdapterNoCover'

export type FlexModuleCutoutFixtureId =
| 'heaterShakerModule'
| 'temperatureModule'
| 'magneticBlockModule'
| 'thermocyclerModuleRear'
| 'thermocyclerModuleFront'

export type OT2SingleStandardSlot = 'singleStandardSlot'

export type OT2FixedTrashSlot = 'fixedTrashSlot'

export type CutoutFixtureId =
| SingleSlotCutoutFixtureId
| StagingAreaRightSlotFixtureId
| TrashBinAdapterCutoutFixtureId
| WasteChuteCutoutFixtureId
| FlexModuleCutoutFixtureId
| OT2SingleStandardSlot
| OT2FixedTrashSlot
35 changes: 33 additions & 2 deletions shared-data/js/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { CutoutFixtureId, CutoutId, AddressableAreaName } from '../deck'
import type { ModuleType } from './types'
import type { CutoutFixtureId, CutoutId, AddressableAreaName, FlexModuleCutoutFixtureId } from '../deck'
import type { ModuleModel, ModuleType } from './types'

// constants for dealing with robot coordinate system (eg in labwareTools)
export const SLOT_LENGTH_MM = 127.76 // along X axis in robot coordinate system
Expand Down Expand Up @@ -275,6 +275,24 @@ export const NINETY_SIX_CHANNEL_WASTE_CHUTE_ADDRESSABLE_AREA: '96ChannelWasteChu
export const GRIPPER_WASTE_CHUTE_ADDRESSABLE_AREA: 'gripperWasteChute' =
'gripperWasteChute'

export const THERMOCYCLER_ADDRESSABLE_AREA: 'thermocyclerModule' = 'thermocyclerModule'
export const HEATERSHAKER_A1_ADDRESSABLE_AREA: 'heaterShakerA1' = 'heaterShakerA1'
export const HEATERSHAKER_B1_ADDRESSABLE_AREA: 'heaterShakerB1' = 'heaterShakerB1'
export const HEATERSHAKER_C1_ADDRESSABLE_AREA: 'heaterShakerC1' = 'heaterShakerC1'
export const HEATERSHAKER_D1_ADDRESSABLE_AREA: 'heaterShakerD1' = 'heaterShakerD1'
export const HEATERSHAKER_A3_ADDRESSABLE_AREA: 'heaterShakerA3' = 'heaterShakerA3'
export const HEATERSHAKER_B3_ADDRESSABLE_AREA: 'heaterShakerB3' = 'heaterShakerB3'
export const HEATERSHAKER_C3_ADDRESSABLE_AREA: 'heaterShakerC3' = 'heaterShakerC3'
export const HEATERSHAKER_D3_ADDRESSABLE_AREA: 'heaterShakerD3' = 'heaterShakerD3'
export const TEMPERATURE_MODULE_A1_ADDRESSABLE_AREA: 'temperatureModuleA1' = 'temperatureModuleA1'
export const TEMPERATURE_MODULE_B1_ADDRESSABLE_AREA: 'temperatureModuleB1' = 'temperatureModuleB1'
export const TEMPERATURE_MODULE_C1_ADDRESSABLE_AREA: 'temperatureModuleC1' = 'temperatureModuleC1'
export const TEMPERATURE_MODULE_D1_ADDRESSABLE_AREA: 'temperatureModuleD1' = 'temperatureModuleD1'
export const TEMPERATURE_MODULE_A3_ADDRESSABLE_AREA: 'temperatureModuleA3' = 'temperatureModuleA3'
export const TEMPERATURE_MODULE_B3_ADDRESSABLE_AREA: 'temperatureModuleB3' = 'temperatureModuleB3'
export const TEMPERATURE_MODULE_C3_ADDRESSABLE_AREA: 'temperatureModuleC3' = 'temperatureModuleC3'
export const TEMPERATURE_MODULE_D3_ADDRESSABLE_AREA: 'temperatureModuleD3' = 'temperatureModuleD3'

export const ADDRESSABLE_AREA_1: '1' = '1'
export const ADDRESSABLE_AREA_2: '2' = '2'
export const ADDRESSABLE_AREA_3: '3' = '3'
Expand Down Expand Up @@ -359,6 +377,19 @@ export const STAGING_AREA_SLOT_WITH_WASTE_CHUTE_RIGHT_ADAPTER_COVERED_FIXTURE: '
export const STAGING_AREA_SLOT_WITH_WASTE_CHUTE_RIGHT_ADAPTER_NO_COVER_FIXTURE: 'stagingAreaSlotWithWasteChuteRightAdapterNoCover' =
'stagingAreaSlotWithWasteChuteRightAdapterNoCover'

export const HEATERSHAKER_MODULE_V1_FIXTURE: 'heaterShakerModule' = 'heaterShakerModule'
export const TEMPERATURE_MODULE_V2_FIXTURE: 'temperatureModule' = 'temperatureModule'
export const MAGNETIC_BLOCK_V1_FIXTURE: 'magneticBlockModule' = 'magneticBlockModule'
export const THERMOCYCLER_V2_REAR_FIXTURE: 'thermocyclerModuleRear' = 'thermocyclerModuleRear'
export const THERMOCYCLER_V2_FRONT_FIXTURE: 'thermocyclerModuleFront' = 'thermocyclerModuleFront'

export const MODULE_FIXTURES_BY_MODEL: {[moduleModel in ModuleModel]?: FlexModuleCutoutFixtureId[]} = {
[HEATERSHAKER_MODULE_V1]: [HEATERSHAKER_MODULE_V1_FIXTURE],
[TEMPERATURE_MODULE_V2]: [TEMPERATURE_MODULE_V2_FIXTURE],
[MAGNETIC_BLOCK_V1]: [MAGNETIC_BLOCK_V1_FIXTURE],
[THERMOCYCLER_MODULE_V2]: [THERMOCYCLER_V2_REAR_FIXTURE, THERMOCYCLER_V2_FRONT_FIXTURE],
}

export const SINGLE_SLOT_FIXTURES: CutoutFixtureId[] = [
SINGLE_LEFT_SLOT_FIXTURE,
SINGLE_CENTER_SLOT_FIXTURE,
Expand Down
8 changes: 4 additions & 4 deletions shared-data/js/deck/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import flexDeckDefV4 from '../../deck/definitions/4/ot3_standard.json'
import ot2DeckDefV4 from '../../deck/definitions/4/ot2_standard.json'
import ot2DeckDefShortFixedTrashV4 from '../../deck/definitions/4/ot2_short_trash.json'
import flexDeckDefV5 from '../../deck/definitions/5/ot3_standard.json'
import ot2DeckDefV5 from '../../deck/definitions/5/ot2_standard.json'
import ot2DeckDefShortFixedTrashV5 from '../../deck/definitions/5/ot2_short_trash.json'

export { ot2DeckDefV4, ot2DeckDefShortFixedTrashV4, flexDeckDefV4 }
export { ot2DeckDefV5, ot2DeckDefShortFixedTrashV5, flexDeckDefV5 }
Loading

0 comments on commit 64b5208

Please sign in to comment.