Skip to content

Commit

Permalink
Merge branch 'internal-release' into edge
Browse files Browse the repository at this point in the history
  • Loading branch information
vegano1 committed Jun 26, 2023
2 parents af12d1c + 12e30e0 commit b648555
Show file tree
Hide file tree
Showing 18 changed files with 250 additions and 118 deletions.
19 changes: 8 additions & 11 deletions api/release-notes-internal.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,11 @@ For more details about this release, please see the full [technical change log][

# Internal Release 0.12.0

## New Stuff In This Release
## Update Notes

- If your Python protocol specifies a Flex-style slot name like `"C2"`, its `apiLevel` must now be `2.15`.

# Internal Release 0.11.0

This is internal release 0.11.0 for the Opentrons Flex robot software, involving both robot control and the on-device display.

Some things are known not to work, and are listed below. Specific compatibility notes about peripheral hardware are also listed.

## Update Notes

- ⚠️ After upgrading your robot to 0.11.0, you'll need to factory-reset its run history before you can use it.
- ⚠️ After upgrading your robot to 0.12.0 from 0.10.0 or previous, you'll need to factory-reset its run history before you can use it.

1. From the robot's 3-dot menu (⋮), go to **Robot settings.**
2. Under **Advanced > Factory reset**, select **Choose reset settings.**
Expand All @@ -30,7 +22,12 @@ Some things are known not to work, and are listed below. Specific compatibility

## New Stuff In This Release

- The HTTP API will now accept both styles of deck slot name: coordinates like "C2", and integers like "5". Flexes will now return the "C2" style, and OT-2s will continue to return the "5" style.
- Many (many) visual and workflow fixes and improvements from design QA for the ODD
- Pipette plunger backlash compensation should improve pipetting performance on the 96 channel
- More slot name fixes to make them D1 instead of 1
- 96 channel attach flow fixes
- Firmware updates now use an HTTP API; there's no frontend, so continue to follow the rules abotu restarting with an instrument attached after an update.
- Several ODD white screen fixes

## Big Things That Don't Work Yet So Don't Report Bugs About Them

Expand Down
29 changes: 15 additions & 14 deletions api/src/opentrons/config/defaults_ot3.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,20 @@
DEFAULT_GRIPPER_MOUNT_OFFSET: Final[Offset] = (84.55, -12.75, 93.85)
DEFAULT_Z_RETRACT_DISTANCE: Final = 2
DEFAULT_SAFE_HOME_DISTANCE: Final = 5
DEFAULT_CALIBRATION_AXIS_MAX_SPEED: Final = 30

DEFAULT_MAX_SPEEDS: Final[ByGantryLoad[Dict[OT3AxisKind, float]]] = ByGantryLoad(
high_throughput={
OT3AxisKind.X: 375,
OT3AxisKind.Y: 375,
OT3AxisKind.X: 400,
OT3AxisKind.Y: 325,
OT3AxisKind.Z: 35,
OT3AxisKind.P: 5,
OT3AxisKind.Z_G: 50,
OT3AxisKind.Q: 5.5,
},
low_throughput={
OT3AxisKind.X: 375,
OT3AxisKind.Y: 375,
OT3AxisKind.X: 400,
OT3AxisKind.Y: 325,
OT3AxisKind.Z: 100,
OT3AxisKind.P: 45,
OT3AxisKind.Z_G: 50,
Expand All @@ -98,17 +99,17 @@

DEFAULT_ACCELERATIONS: Final[ByGantryLoad[Dict[OT3AxisKind, float]]] = ByGantryLoad(
high_throughput={
OT3AxisKind.X: 600,
OT3AxisKind.Y: 600,
OT3AxisKind.Z: 120,
OT3AxisKind.X: 800,
OT3AxisKind.Y: 500,
OT3AxisKind.Z: 150,
OT3AxisKind.P: 30,
OT3AxisKind.Z_G: 150,
OT3AxisKind.Q: 10,
},
low_throughput={
OT3AxisKind.X: 600,
OT3AxisKind.X: 800,
OT3AxisKind.Y: 600,
OT3AxisKind.Z: 300,
OT3AxisKind.Z: 150,
OT3AxisKind.P: 100,
OT3AxisKind.Z_G: 150,
},
Expand Down Expand Up @@ -174,17 +175,17 @@

DEFAULT_RUN_CURRENT: Final[ByGantryLoad[Dict[OT3AxisKind, float]]] = ByGantryLoad(
high_throughput={
OT3AxisKind.X: 1.4,
OT3AxisKind.X: 1.25,
OT3AxisKind.Y: 1.4,
OT3AxisKind.Z: 1.4,
OT3AxisKind.Z: 1.5,
OT3AxisKind.P: 2.2,
OT3AxisKind.Z_G: 0.67,
OT3AxisKind.Q: 1.5,
},
low_throughput={
OT3AxisKind.X: 1.4,
OT3AxisKind.Y: 1.4,
OT3AxisKind.Z: 1.4,
OT3AxisKind.X: 1.25,
OT3AxisKind.Y: 1.25,
OT3AxisKind.Z: 1.0,
# TODO: verify this value
OT3AxisKind.P: 1.0,
OT3AxisKind.Z_G: 0.67,
Expand Down
24 changes: 24 additions & 0 deletions api/src/opentrons/hardware_control/backends/ot3utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Shared utilities for ot3 hardware control."""
from typing import Dict, Iterable, List, Set, Tuple, TypeVar, Sequence
from typing_extensions import Literal
from opentrons.config.defaults_ot3 import DEFAULT_CALIBRATION_AXIS_MAX_SPEED
from opentrons.config.types import OT3MotionSettings, OT3CurrentSettings, GantryLoad
from opentrons.hardware_control.types import (
OT3Axis,
Expand Down Expand Up @@ -238,6 +239,29 @@ def get_system_constraints(
return constraints


def get_system_constraints_for_calibration(
config: OT3MotionSettings,
gantry_load: GantryLoad,
) -> "SystemConstraints[OT3Axis]":
conf_by_pip = config.by_gantry_load(gantry_load)
constraints = {}
for axis_kind in [
OT3AxisKind.P,
OT3AxisKind.X,
OT3AxisKind.Y,
OT3AxisKind.Z,
OT3AxisKind.Z_G,
]:
for axis in OT3Axis.of_kind(axis_kind):
constraints[axis] = AxisConstraints.build(
conf_by_pip["acceleration"][axis_kind],
conf_by_pip["max_speed_discontinuity"][axis_kind],
conf_by_pip["direction_change_speed_discontinuity"][axis_kind],
DEFAULT_CALIBRATION_AXIS_MAX_SPEED,
)
return constraints


def _convert_to_node_id_dict(
axis_pos: Coordinates[OT3Axis, CoordinateValue],
) -> NodeIdMotionValues:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ async def _tool_detection_task_protected(self) -> None:
right=self._tool_if_ok(update.right, NodeId.pipette_right),
gripper=self._tool_if_ok(update.gripper, NodeId.gripper),
)
self._present_tools = await self._tool_detector.resolve(to_resolve)
self._present_tools = await self._tool_detector.resolve(to_resolve, 10.0)
log.info(f"Present tools are now {self._present_tools}")
async with self._tool_task_condition:
self._tool_task_state = True
Expand Down
50 changes: 26 additions & 24 deletions api/src/opentrons/hardware_control/ot3_calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,30 +564,32 @@ async def _calibrate_mount(
from the current instrument offset to set a new instrument offset.
"""
nominal_center = Point(*get_calibration_square_position_in_slot(slot))
try:
# find the center of the calibration sqaure
offset = await find_calibration_structure_position(
hcapi,
mount,
nominal_center,
method=method,
raise_verify_error=raise_verify_error,
)
# update center with values obtained during calibration
LOG.info(f"Found calibration value {offset} for mount {mount.name}")
return offset

except (
InaccurateNonContactSweepError,
EarlyCapacitiveSenseTrigger,
CalibrationStructureNotFoundError,
):
LOG.info(
"Error occurred during calibration. Resetting to current saved calibration value."
)
await hcapi.reset_instrument_offset(mount, to_default=False)
# re-raise exception after resetting instrument offset
raise
async with hcapi.restore_system_constrants():
await hcapi.set_system_constraints_for_calibration()
try:
# find the center of the calibration sqaure
offset = await find_calibration_structure_position(
hcapi,
mount,
nominal_center,
method=method,
raise_verify_error=raise_verify_error,
)
# update center with values obtained during calibration
LOG.info(f"Found calibration value {offset} for mount {mount.name}")
return offset

except (
InaccurateNonContactSweepError,
EarlyCapacitiveSenseTrigger,
CalibrationStructureNotFoundError,
):
LOG.info(
"Error occurred during calibration. Resetting to current saved calibration value."
)
await hcapi.reset_instrument_offset(mount, to_default=False)
# re-raise exception after resetting instrument offset
raise


async def find_calibration_structure_position(
Expand Down
32 changes: 30 additions & 2 deletions api/src/opentrons/hardware_control/ot3api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from functools import partial, lru_cache
from dataclasses import replace
import logging
from copy import deepcopy
from collections import OrderedDict
from typing import (
AsyncIterator,
Expand Down Expand Up @@ -66,6 +67,7 @@
from .backends.ot3simulator import OT3Simulator
from .backends.ot3utils import (
get_system_constraints,
get_system_constraints_for_calibration,
axis_convert,
)
from .backends.errors import SubsystemUpdating
Expand Down Expand Up @@ -243,6 +245,27 @@ async def set_gantry_load(self, gantry_load: GantryLoad) -> None:
)
await self._backend.update_to_default_current_settings(gantry_load)

async def set_system_constraints_for_calibration(self) -> None:
self._move_manager.update_constraints(
get_system_constraints_for_calibration(
self._config.motion_settings, self._gantry_load
)
)
mod_log.debug(
f"Set system constraints for calibration: {self._move_manager.get_constraints()}"
)

@contextlib.asynccontextmanager
async def restore_system_constrants(self) -> AsyncIterator[None]:
old_system_constraints = deepcopy(self._move_manager.get_constraints())
try:
yield
finally:
self._move_manager.update_constraints(old_system_constraints)
mod_log.debug(
f"Restore previous system constraints: {old_system_constraints}"
)

def _update_door_state(self, door_state: DoorState) -> None:
mod_log.info(f"Updating the window switch status: {door_state}")
self.door_state = door_state
Expand Down Expand Up @@ -1727,8 +1750,8 @@ async def drop_tip(
speed=move.speed,
home_flagged_axes=False,
)
if move.home_after:
await self._home([OT3Axis.from_axis(ax) for ax in move.home_axes])
if move.home_after:
await self._home([OT3Axis.from_axis(ax) for ax in move.home_axes])

for shake in spec.shake_moves:
await self.move_rel(mount, shake[0], speed=shake[1])
Expand All @@ -1743,6 +1766,11 @@ async def drop_tip(
# TODO: implement tip-detection sequence during drop-tip for 96ch
if self.gantry_load != GantryLoad.HIGH_THROUGHPUT:
await self._backend.get_tip_present(realmount, TipStateType.ABSENT)

# home mount axis
if home_after:
await self._home([OT3Axis.by_mount(mount)])

_remove()

async def clean_up(self) -> None:
Expand Down
5 changes: 3 additions & 2 deletions api/src/opentrons/system/log_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ async def get_records_dumb(selector: str, records: int, mode: str) -> bytes:
:param selector: The syslog selector to limit responses to
:param records: The maximum number of records to print
:param mode: A journalctl dump mode. Should be either "short" or "json".
:param mode: A journalctl dump mode. Should be either "short-precise" or "json".
"""
selector_flag = "-u" if selector == "opentrons-robot-server" else "-t"
proc = await asyncio.create_subprocess_exec(
"journalctl",
"--no-pager",
"-t",
selector_flag,
selector,
"-n",
str(records),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,9 @@ async def add_resolution(
else ToolType.nothing_attached,
)

self._decoy.when(await self._tool_detector.resolve(arg)).then_return(summary)
self._decoy.when(await self._tool_detector.resolve(arg, 10.0)).then_return(
summary
)
return summary


Expand Down
11 changes: 6 additions & 5 deletions app-shell/build/release-notes-internal.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ For more details about this release, please see the full [technical changelog][]

---

# Internal Release 0.11.0
# Internal Release 0.12.0

This is 0.11.0, an internal release for the app supporting the Opentrons Flex.
This is 0.12.0, an internal release for the app supporting the Opentrons Flex.

This is still pretty early in the process, so some things are known not to work, and are listed below. Some things that may surprise you do work, and are also listed below. There may also be some littler things of note, and those are at the bottom.

## Update Notes

- ⚠️ After upgrading your robot to 0.11.0, you'll need to factory-reset its run history before you can use it.
- ⚠️ After upgrading your robot to 0.12.0 from 0.10.0 or previous, you'll need to factory-reset its run history before you can use it.

1. From the robot's 3-dot menu (⋮), go to **Robot settings.**
2. Under **Advanced > Factory reset**, select **Choose reset settings.**
Expand All @@ -24,9 +24,10 @@ This is still pretty early in the process, so some things are known not to work,
- After upgrading your app, the protocols that you already had imported to the app will display blank deck maps. To fix this, select **Reanalyze** from the protocol's 3-dot menu (⋮).

## New Stuff In This Release
- You can disable the LED bar at the top now!
- Attach flow updates and fixes for 96 channel
- Many (many) visual and workflow fixes and improvements from design QA for the app

- When interacting with an OT-3, the app will use the newer names for the deck slots, like "C2", instead of the names from the OT-2, like "5".
- The `requirements` dict in Python protocols can now have `"robotType": "Flex"` instead of `"robotType": "OT-3"`. `"OT-3"` will still work, but it's discouraged because it's not the customer-facing name.

## Big Things That Don't Work Yet So Don't Report Bugs About Them
- Attach, detach, and calibration flows for anything from the protocol setup page
Expand Down
Loading

0 comments on commit b648555

Please sign in to comment.