Skip to content

Commit

Permalink
Merge branch 'edge' into feat-shared-data-pipette-model-3.6
Browse files Browse the repository at this point in the history
andySigler committed Nov 16, 2023
2 parents 5d5d1ba + 2c83a19 commit 4b3e4fc
Showing 17 changed files with 96 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1349,7 +1349,7 @@ def test_get_deck_gripper_offsets(ot3_standard_deck_def: DeckDefinitionV4) -> No

assert subject.get_deck_default_gripper_offsets() == LabwareMovementOffsetData(
pickUpOffset=LabwareOffsetVector(x=0, y=0, z=0),
dropOffset=LabwareOffsetVector(x=0, y=0, z=-0.25),
dropOffset=LabwareOffsetVector(x=0, y=0, z=-0.75),
)


4 changes: 2 additions & 2 deletions api/tests/opentrons/protocol_engine/state/test_module_view.py
Original file line number Diff line number Diff line change
@@ -1756,14 +1756,14 @@ def test_is_edge_move_unsafe(
lazy_fixture("thermocycler_v2_def"),
LabwareMovementOffsetData(
pickUpOffset=LabwareOffsetVector(x=0, y=0, z=4.6),
dropOffset=LabwareOffsetVector(x=0, y=0, z=4.6),
dropOffset=LabwareOffsetVector(x=0, y=0, z=5.6),
),
),
(
lazy_fixture("heater_shaker_v1_def"),
LabwareMovementOffsetData(
pickUpOffset=LabwareOffsetVector(x=0, y=0, z=0),
dropOffset=LabwareOffsetVector(x=0, y=0, z=0.5),
dropOffset=LabwareOffsetVector(x=0, y=0, z=1.0),
),
),
(
4 changes: 3 additions & 1 deletion app/src/organisms/LabwarePositionCheck/PrepareSpace.tsx
Original file line number Diff line number Diff line change
@@ -112,7 +112,9 @@ export const PrepareSpace = (props: PrepareSpaceProps): JSX.Element | null => {
labwareLocation: location,
definition: labwareDef,
},
]}
].filter(
() => !('moduleModel' in location && location.moduleModel != null)
)}
deckConfig={deckConfig}
/>
</Flex>
9 changes: 8 additions & 1 deletion components/src/hardware-sim/BaseDeck/BaseDeck.tsx
Original file line number Diff line number Diff line change
@@ -121,7 +121,14 @@ export function BaseDeck(props: BaseDeckProps): JSX.Element {
) : (
<>
{showSlotLabels ? (
<SlotLabels robotType={robotType} color={darkFill} />
<SlotLabels
robotType={robotType}
color={darkFill}
show4thColumn={
stagingAreaFixtures.length > 0 ||
wasteChuteStagingAreaFixtures.length > 0
}
/>
) : null}
{singleSlotFixtures.map(fixture => (
<SingleSlotFixture
36 changes: 30 additions & 6 deletions components/src/hardware-sim/Deck/SlotLabels.tsx
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ import type { RobotType } from '@opentrons/shared-data'
interface SlotLabelsProps {
robotType: RobotType
color?: string
show4thColumn?: boolean
}

/**
@@ -19,7 +20,11 @@ interface SlotLabelsProps {
export const SlotLabels = ({
robotType,
color,
show4thColumn = false,
}: SlotLabelsProps): JSX.Element | null => {
const widthSmallRem = 10.5
const widthLargeRem = 15.25

return robotType === FLEX_ROBOT_TYPE ? (
<>
<RobotCoordsForeignObject
@@ -71,37 +76,56 @@ export const SlotLabels = ({
</RobotCoordsForeignObject>
<RobotCoordsForeignObject
height="2.5rem"
width="30.375rem"
x="-15"
width={`${
show4thColumn
? widthSmallRem * 2 + widthLargeRem * 2
: widthSmallRem + widthLargeRem * 2
}rem`}
x="-100"
y="-55"
>
<Flex
alignItems={ALIGN_CENTER}
flex="1"
width="30.375rem"
width={`${
show4thColumn
? widthSmallRem * 2 + widthLargeRem * 2
: widthSmallRem + widthLargeRem * 2
}rem`}
height="2.5rem"
>
<Flex
alignItems={ALIGN_CENTER}
justifyContent={JUSTIFY_CENTER}
flex="1"
width={`${widthLargeRem}rem`}
>
<LocationIcon color={color} slotName="1" height="100%" />
</Flex>
<Flex
alignItems={ALIGN_CENTER}
justifyContent={JUSTIFY_CENTER}
flex="1"
width={`${widthSmallRem}rem`}
>
<LocationIcon color={color} slotName="2" height="100%" />
</Flex>
<Flex
alignItems={ALIGN_CENTER}
justifyContent={JUSTIFY_CENTER}
flex="1"
width={
show4thColumn ? `${widthSmallRem}rem` : `${widthLargeRem}rem`
}
>
<LocationIcon color={color} slotName="3" height="100%" />
</Flex>
{show4thColumn ? (
<Flex
alignItems={ALIGN_CENTER}
justifyContent={JUSTIFY_CENTER}
width={`${widthSmallRem}rem`}
>
<LocationIcon color={color} slotName="4" height="100%" />
</Flex>
) : null}
</Flex>
</RobotCoordsForeignObject>
</>
6 changes: 5 additions & 1 deletion components/src/hardware-sim/DeckConfigurator/index.tsx
Original file line number Diff line number Diff line change
@@ -125,7 +125,11 @@ export function DeckConfigurator(props: DeckConfiguratorProps): JSX.Element {
fixtureLocation={cutoutId}
/>
))}
<SlotLabels robotType={FLEX_ROBOT_TYPE} color={darkFill} />
<SlotLabels
robotType={FLEX_ROBOT_TYPE}
color={darkFill}
show4thColumn={stagingAreaFixtures.length > 0}
/>
{children}
</RobotCoordinateSpace>
)
13 changes: 11 additions & 2 deletions hardware-testing/hardware_testing/opentrons_api/helpers_ot3.py
Original file line number Diff line number Diff line change
@@ -4,10 +4,10 @@
from datetime import datetime
from enum import Enum
from math import pi
from subprocess import run
from subprocess import run, Popen
from time import time
from typing import Callable, Coroutine, Dict, List, Optional, Tuple, Union

import atexit
from opentrons_hardware.drivers.can_bus import DriverSettings, build, CanMessenger
from opentrons_hardware.drivers.can_bus import settings as can_bus_settings
from opentrons_hardware.firmware_bindings.constants import SensorId
@@ -77,6 +77,15 @@ def stop_server_ot3() -> None:
"""Stop opentrons-robot-server on the OT3."""
print('Stopping "opentrons-robot-server"...')
run(["systemctl", "stop", "opentrons-robot-server"])
atexit.register(restart_server_ot3)


def restart_server_ot3() -> None:
"""Start opentrons-robot-server on the OT3."""
print('Starting "opentrons-robot-server"...')
Popen(
["systemctl", "restart", "opentrons-robot-server", "&"],
)


def start_server_ot3() -> None:
2 changes: 1 addition & 1 deletion shared-data/deck/definitions/3/ot3_standard.json
Original file line number Diff line number Diff line change
@@ -982,7 +982,7 @@
"dropOffset": {
"x": 0,
"y": 0,
"z": -0.25
"z": -0.75
}
}
}
2 changes: 1 addition & 1 deletion shared-data/deck/definitions/4/ot3_standard.json
Original file line number Diff line number Diff line change
@@ -590,7 +590,7 @@
"dropOffset": {
"x": 0,
"y": 0,
"z": -0.25
"z": -0.75
}
}
}
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@
"z": 10.7
}
},
"gripForce": 15,
"gripForce": 9,
"gripHeightFromLabwareBottom": 10,
"ordering": [
["A1", "B1", "C1", "D1", "E1", "F1", "G1", "H1"],
14 changes: 14 additions & 0 deletions shared-data/labware/definitions/2/opentrons_96_pcr_adapter/1.json
Original file line number Diff line number Diff line change
@@ -1014,5 +1014,19 @@
"x": 8.5,
"y": 5.5,
"z": 0
},
"gripperOffsets": {
"default": {
"pickUpOffset": {
"x": 0,
"y": 0,
"z": 0
},
"dropOffset": {
"x": 0,
"y": 0,
"z": 1.0
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1014,5 +1014,19 @@
"x": 0,
"y": 0,
"z": 0
},
"gripperOffsets": {
"default": {
"pickUpOffset": {
"x": 0,
"y": 0,
"z": 0
},
"dropOffset": {
"x": 0,
"y": 0,
"z": 1.0
}
}
}
}
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@
"z": 10.7
}
},
"gripForce": 15,
"gripForce": 9,
"gripHeightFromLabwareBottom": 10,
"ordering": [
["A1", "B1", "C1", "D1", "E1", "F1", "G1", "H1"],
2 changes: 1 addition & 1 deletion shared-data/module/definitions/3/heaterShakerModuleV1.json
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@
"dropOffset": {
"x": 0,
"y": 0,
"z": 0.5
"z": 1.0
}
}
},
2 changes: 1 addition & 1 deletion shared-data/module/definitions/3/magneticBlockV1.json
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@
"dropOffset": {
"x": 0,
"y": 0,
"z": 0.5
"z": 1.0
}
}
},
2 changes: 1 addition & 1 deletion shared-data/module/definitions/3/temperatureModuleV2.json
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@
"dropOffset": {
"x": 0,
"y": 0,
"z": 0.5
"z": 1.0
}
}
},
2 changes: 1 addition & 1 deletion shared-data/module/definitions/3/thermocyclerModuleV2.json
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@
"dropOffset": {
"x": 0,
"y": 0,
"z": 4.6
"z": 5.6
}
}
},

0 comments on commit 4b3e4fc

Please sign in to comment.