opentrons 8.7.0a7__py3-none-any.whl → 8.7.0a8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of opentrons might be problematic. Click here for more details.

Files changed (147) hide show
  1. opentrons/_version.py +2 -2
  2. opentrons/drivers/asyncio/communication/serial_connection.py +55 -129
  3. opentrons/drivers/flex_stacker/driver.py +6 -1
  4. opentrons/drivers/heater_shaker/abstract.py +0 -5
  5. opentrons/drivers/heater_shaker/driver.py +0 -10
  6. opentrons/drivers/heater_shaker/simulator.py +0 -4
  7. opentrons/drivers/thermocycler/abstract.py +0 -6
  8. opentrons/drivers/thermocycler/driver.py +10 -61
  9. opentrons/drivers/thermocycler/simulator.py +0 -6
  10. opentrons/hardware_control/api.py +5 -24
  11. opentrons/hardware_control/backends/controller.py +2 -8
  12. opentrons/hardware_control/backends/flex_protocol.py +1 -0
  13. opentrons/hardware_control/backends/ot3controller.py +3 -3
  14. opentrons/hardware_control/backends/ot3simulator.py +2 -2
  15. opentrons/hardware_control/backends/simulator.py +1 -2
  16. opentrons/hardware_control/backends/subsystem_manager.py +2 -5
  17. opentrons/hardware_control/emulation/abstract_emulator.py +4 -6
  18. opentrons/hardware_control/emulation/connection_handler.py +5 -8
  19. opentrons/hardware_control/emulation/heater_shaker.py +3 -12
  20. opentrons/hardware_control/emulation/settings.py +1 -1
  21. opentrons/hardware_control/emulation/thermocycler.py +15 -67
  22. opentrons/hardware_control/module_control.py +8 -82
  23. opentrons/hardware_control/modules/__init__.py +0 -3
  24. opentrons/hardware_control/modules/absorbance_reader.py +4 -11
  25. opentrons/hardware_control/modules/flex_stacker.py +9 -38
  26. opentrons/hardware_control/modules/heater_shaker.py +5 -42
  27. opentrons/hardware_control/modules/magdeck.py +4 -8
  28. opentrons/hardware_control/modules/mod_abc.py +5 -13
  29. opentrons/hardware_control/modules/tempdeck.py +5 -25
  30. opentrons/hardware_control/modules/thermocycler.py +11 -68
  31. opentrons/hardware_control/modules/types.py +1 -20
  32. opentrons/hardware_control/modules/utils.py +4 -11
  33. opentrons/hardware_control/nozzle_manager.py +0 -3
  34. opentrons/hardware_control/ot3api.py +7 -26
  35. opentrons/hardware_control/poller.py +8 -22
  36. opentrons/hardware_control/protocols/gripper_controller.py +1 -0
  37. opentrons/hardware_control/scripts/update_module_fw.py +0 -5
  38. opentrons/hardware_control/types.py +2 -31
  39. opentrons/legacy_commands/module_commands.py +0 -23
  40. opentrons/legacy_commands/protocol_commands.py +0 -20
  41. opentrons/legacy_commands/types.py +0 -80
  42. opentrons/motion_planning/deck_conflict.py +12 -17
  43. opentrons/motion_planning/waypoints.py +29 -15
  44. opentrons/protocol_api/__init__.py +1 -5
  45. opentrons/protocol_api/_types.py +1 -6
  46. opentrons/protocol_api/core/common.py +1 -3
  47. opentrons/protocol_api/core/engine/_default_labware_versions.py +11 -32
  48. opentrons/protocol_api/core/engine/labware.py +1 -8
  49. opentrons/protocol_api/core/engine/module_core.py +8 -75
  50. opentrons/protocol_api/core/engine/protocol.py +1 -18
  51. opentrons/protocol_api/core/engine/well.py +0 -8
  52. opentrons/protocol_api/core/legacy/legacy_module_core.py +4 -24
  53. opentrons/protocol_api/core/legacy/legacy_protocol_core.py +1 -11
  54. opentrons/protocol_api/core/legacy/legacy_well_core.py +0 -4
  55. opentrons/protocol_api/core/legacy_simulator/legacy_protocol_core.py +2 -14
  56. opentrons/protocol_api/core/module.py +4 -37
  57. opentrons/protocol_api/core/protocol.py +2 -11
  58. opentrons/protocol_api/core/well.py +0 -4
  59. opentrons/protocol_api/labware.py +0 -5
  60. opentrons/protocol_api/module_contexts.py +11 -117
  61. opentrons/protocol_api/protocol_context.py +4 -26
  62. opentrons/protocol_api/robot_context.py +21 -38
  63. opentrons/protocol_api/validation.py +1 -6
  64. opentrons/protocol_engine/actions/__init__.py +2 -4
  65. opentrons/protocol_engine/actions/actions.py +9 -22
  66. opentrons/protocol_engine/clients/sync_client.py +7 -42
  67. opentrons/protocol_engine/commands/__init__.py +0 -42
  68. opentrons/protocol_engine/commands/absorbance_reader/close_lid.py +15 -2
  69. opentrons/protocol_engine/commands/absorbance_reader/open_lid.py +15 -2
  70. opentrons/protocol_engine/commands/aspirate.py +0 -1
  71. opentrons/protocol_engine/commands/command.py +0 -1
  72. opentrons/protocol_engine/commands/command_unions.py +0 -49
  73. opentrons/protocol_engine/commands/dispense.py +0 -1
  74. opentrons/protocol_engine/commands/drop_tip.py +8 -32
  75. opentrons/protocol_engine/commands/heater_shaker/__init__.py +0 -14
  76. opentrons/protocol_engine/commands/heater_shaker/set_and_wait_for_shake_speed.py +4 -5
  77. opentrons/protocol_engine/commands/heater_shaker/set_target_temperature.py +5 -31
  78. opentrons/protocol_engine/commands/movement_common.py +0 -2
  79. opentrons/protocol_engine/commands/pick_up_tip.py +11 -21
  80. opentrons/protocol_engine/commands/temperature_module/set_target_temperature.py +7 -38
  81. opentrons/protocol_engine/commands/thermocycler/__init__.py +0 -16
  82. opentrons/protocol_engine/commands/thermocycler/run_extended_profile.py +0 -6
  83. opentrons/protocol_engine/commands/thermocycler/run_profile.py +0 -8
  84. opentrons/protocol_engine/commands/thermocycler/set_target_block_temperature.py +6 -40
  85. opentrons/protocol_engine/commands/thermocycler/set_target_lid_temperature.py +5 -29
  86. opentrons/protocol_engine/commands/touch_tip.py +1 -1
  87. opentrons/protocol_engine/commands/unsafe/unsafe_place_labware.py +22 -6
  88. opentrons/protocol_engine/errors/__init__.py +0 -4
  89. opentrons/protocol_engine/errors/exceptions.py +0 -55
  90. opentrons/protocol_engine/execution/__init__.py +0 -2
  91. opentrons/protocol_engine/execution/command_executor.py +0 -8
  92. opentrons/protocol_engine/execution/create_queue_worker.py +1 -5
  93. opentrons/protocol_engine/execution/labware_movement.py +21 -10
  94. opentrons/protocol_engine/execution/movement.py +0 -2
  95. opentrons/protocol_engine/execution/queue_worker.py +0 -4
  96. opentrons/protocol_engine/execution/run_control.py +0 -8
  97. opentrons/protocol_engine/protocol_engine.py +34 -75
  98. opentrons/protocol_engine/resources/__init__.py +0 -2
  99. opentrons/protocol_engine/resources/deck_configuration_provider.py +0 -7
  100. opentrons/protocol_engine/resources/labware_validation.py +6 -10
  101. opentrons/protocol_engine/state/_labware_origin_math.py +636 -0
  102. opentrons/protocol_engine/state/_well_math.py +18 -60
  103. opentrons/protocol_engine/state/addressable_areas.py +0 -2
  104. opentrons/protocol_engine/state/commands.py +11 -14
  105. opentrons/protocol_engine/state/geometry.py +374 -213
  106. opentrons/protocol_engine/state/labware.py +102 -52
  107. opentrons/protocol_engine/state/module_substates/thermocycler_module_substate.py +0 -37
  108. opentrons/protocol_engine/state/modules.py +8 -21
  109. opentrons/protocol_engine/state/motion.py +0 -44
  110. opentrons/protocol_engine/state/state.py +0 -14
  111. opentrons/protocol_engine/state/state_summary.py +0 -2
  112. opentrons/protocol_engine/state/tips.py +258 -177
  113. opentrons/protocol_engine/state/update_types.py +9 -16
  114. opentrons/protocol_engine/types/__init__.py +3 -9
  115. opentrons/protocol_engine/types/deck_configuration.py +1 -5
  116. opentrons/protocol_engine/types/instrument.py +1 -8
  117. opentrons/protocol_engine/types/labware.py +13 -1
  118. opentrons/protocol_engine/types/module.py +0 -10
  119. opentrons/protocol_engine/types/tip.py +0 -9
  120. opentrons/protocol_runner/create_simulating_orchestrator.py +2 -29
  121. opentrons/protocol_runner/run_orchestrator.py +2 -18
  122. opentrons/protocols/api_support/definitions.py +1 -1
  123. opentrons/protocols/api_support/types.py +1 -2
  124. opentrons/simulate.py +15 -48
  125. opentrons/system/camera.py +1 -1
  126. {opentrons-8.7.0a7.dist-info → opentrons-8.7.0a8.dist-info}/METADATA +4 -4
  127. {opentrons-8.7.0a7.dist-info → opentrons-8.7.0a8.dist-info}/RECORD +130 -146
  128. opentrons/protocol_api/core/engine/tasks.py +0 -48
  129. opentrons/protocol_api/core/legacy/tasks.py +0 -19
  130. opentrons/protocol_api/core/legacy_simulator/tasks.py +0 -19
  131. opentrons/protocol_api/core/tasks.py +0 -31
  132. opentrons/protocol_api/tasks.py +0 -48
  133. opentrons/protocol_engine/commands/create_timer.py +0 -83
  134. opentrons/protocol_engine/commands/heater_shaker/common.py +0 -20
  135. opentrons/protocol_engine/commands/heater_shaker/set_shake_speed.py +0 -136
  136. opentrons/protocol_engine/commands/set_tip_state.py +0 -97
  137. opentrons/protocol_engine/commands/thermocycler/start_run_extended_profile.py +0 -191
  138. opentrons/protocol_engine/commands/wait_for_tasks.py +0 -98
  139. opentrons/protocol_engine/execution/task_handler.py +0 -157
  140. opentrons/protocol_engine/resources/concurrency_provider.py +0 -27
  141. opentrons/protocol_engine/state/labware_origin_math/errors.py +0 -94
  142. opentrons/protocol_engine/state/labware_origin_math/stackup_origin_to_labware_origin.py +0 -1331
  143. opentrons/protocol_engine/state/tasks.py +0 -139
  144. opentrons/protocol_engine/types/tasks.py +0 -38
  145. {opentrons-8.7.0a7.dist-info → opentrons-8.7.0a8.dist-info}/WHEEL +0 -0
  146. {opentrons-8.7.0a7.dist-info → opentrons-8.7.0a8.dist-info}/entry_points.txt +0 -0
  147. {opentrons-8.7.0a7.dist-info → opentrons-8.7.0a8.dist-info}/licenses/LICENSE +0 -0
@@ -74,7 +74,6 @@ from .types import (
74
74
  DoorStateNotification,
75
75
  ErrorMessageNotification,
76
76
  HardwareEvent,
77
- AsynchronousModuleErrorNotification,
78
77
  HardwareEventHandler,
79
78
  HardwareAction,
80
79
  HepaFanState,
@@ -368,21 +367,6 @@ class OT3API(
368
367
 
369
368
  return futures
370
369
 
371
- def _send_module_notification(self, event: HardwareEvent) -> None:
372
- if not isinstance(
373
- event,
374
- AsynchronousModuleErrorNotification,
375
- ):
376
- return
377
- mod_log.info(
378
- f"Forwarding module event {event.event} for {event.module_model} {event.module_serial} at {event.port}"
379
- )
380
- for cb in self._callbacks:
381
- try:
382
- cb(event)
383
- except Exception:
384
- mod_log.exception("Errored during module asynchronous callback")
385
-
386
370
  def _reset_last_mount(self) -> None:
387
371
  self._last_moved_mount = None
388
372
 
@@ -438,9 +422,7 @@ class OT3API(
438
422
 
439
423
  await api_instance.set_status_bar_enabled(status_bar_enabled)
440
424
  module_controls = await AttachedModulesControl.build(
441
- api_instance,
442
- board_revision=backend.board_revision,
443
- event_callback=api_instance._send_module_notification,
425
+ api_instance, board_revision=backend.board_revision
444
426
  )
445
427
  backend.module_controls = module_controls
446
428
  await backend.build_estop_detector()
@@ -502,9 +484,7 @@ class OT3API(
502
484
  )
503
485
  await api_instance.cache_instruments()
504
486
  module_controls = await AttachedModulesControl.build(
505
- api_instance,
506
- board_revision=backend.board_revision,
507
- event_callback=api_instance._send_module_notification,
487
+ api_instance, board_revision=backend.board_revision
508
488
  )
509
489
  backend.module_controls = module_controls
510
490
  await backend.watch(api_instance.loop)
@@ -647,10 +627,9 @@ class OT3API(
647
627
  self.is_simulator
648
628
  ), "Cannot build simulating module from non-simulating hardware control API"
649
629
 
650
- return await self._backend.module_controls.register_simulated_module(
651
- simulated_usb_port=USBPort(
652
- name="", port_number=1, port_group=PortGroup.LEFT
653
- ),
630
+ return await self._backend.module_controls.build_module(
631
+ port="",
632
+ usb_port=USBPort(name="", port_number=1, port_group=PortGroup.LEFT),
654
633
  type=modules.ModuleType.from_model(model),
655
634
  sim_model=model.value,
656
635
  )
@@ -1483,6 +1462,7 @@ class OT3API(
1483
1462
  expected_grip_width: float,
1484
1463
  grip_width_uncertainty_wider: float,
1485
1464
  grip_width_uncertainty_narrower: float,
1465
+ disable_geometry_grip_check: bool = False,
1486
1466
  ) -> None:
1487
1467
  """Ensure that a gripper pickup succeeded.
1488
1468
 
@@ -1503,6 +1483,7 @@ class OT3API(
1503
1483
  gripper.max_allowed_grip_error,
1504
1484
  gripper.min_jaw_width,
1505
1485
  gripper.max_jaw_width,
1486
+ disable_geometry_grip_check,
1506
1487
  )
1507
1488
 
1508
1489
  def gripper_jaw_can_home(self) -> bool:
@@ -5,7 +5,6 @@ from abc import ABC, abstractmethod
5
5
  from typing import AsyncGenerator, List, Optional
6
6
  from opentrons.hardware_control.modules.errors import AbsorbanceReaderDisconnectedError
7
7
  from opentrons_shared_data.errors.exceptions import ModuleCommunicationError
8
- from opentrons.drivers.asyncio.communication.errors import SerialException
9
8
 
10
9
 
11
10
  log = logging.getLogger(__name__)
@@ -89,18 +88,6 @@ class Poller:
89
88
  except asyncio.InvalidStateError:
90
89
  log.warning("Poller waiter was already cancelled")
91
90
 
92
- def _error_callback(self, exc: Exception) -> None:
93
- try:
94
- self._reader.on_error(exc)
95
- except Exception:
96
- log.exception("Exception in reader callback")
97
-
98
- def _complete_all(
99
- self, exc: Exception | None, previous: List["asyncio.Future[None]"]
100
- ) -> None:
101
- for waiter in previous:
102
- Poller._set_waiter_complete(waiter, exc)
103
-
104
91
  async def _poll_once(self) -> None:
105
92
  """Trigger a single read, notifying listeners of success or error."""
106
93
  previous_waiters = self._poll_waiters
@@ -112,15 +99,14 @@ class Poller:
112
99
  except asyncio.CancelledError:
113
100
  raise
114
101
  except AbsorbanceReaderDisconnectedError as e:
115
- self._error_callback(e)
116
- self._complete_all(e, previous_waiters)
117
- except SerialException as se:
118
- log.error(f"Polling gcode error: {se}")
119
- self._error_callback(se)
120
- self._complete_all(se, previous_waiters)
102
+ for waiter in previous_waiters:
103
+ Poller._set_waiter_complete(waiter, None)
104
+ self._reader.on_error(e)
121
105
  except Exception as e:
122
106
  log.exception("Polling exception")
123
- self._error_callback(e)
124
- self._complete_all(e, previous_waiters)
107
+ self._reader.on_error(e)
108
+ for waiter in previous_waiters:
109
+ Poller._set_waiter_complete(waiter, e)
125
110
  else:
126
- self._complete_all(None, previous_waiters)
111
+ for waiter in previous_waiters:
112
+ Poller._set_waiter_complete(waiter)
@@ -41,6 +41,7 @@ class GripperController(Protocol):
41
41
  expected_grip_width: float,
42
42
  grip_width_uncertainty_wider: float,
43
43
  grip_width_uncertainty_narrower: float,
44
+ disable_geometry_grip_check: bool = False,
44
45
  ) -> None:
45
46
  """Ensure that a gripper pickup succeeded."""
46
47
 
@@ -1,5 +1,4 @@
1
1
  """Module Firmware update script."""
2
-
3
2
  import argparse
4
3
  import asyncio
5
4
  from glob import glob
@@ -15,7 +14,6 @@ from opentrons.hardware_control import modules
15
14
  from opentrons.hardware_control.modules.mod_abc import AbstractModule
16
15
  from opentrons.hardware_control.modules.update import update_firmware
17
16
  from opentrons.hardware_control.types import BoardRevision
18
- from opentrons.hardware_control.execution_manager import ExecutionManager
19
17
 
20
18
 
21
19
  # Constants for checking if module is back online
@@ -86,9 +84,6 @@ async def build_module(
86
84
  port=port,
87
85
  usb_port=mod.usb_port,
88
86
  type=modules.MODULE_TYPE_BY_NAME[mod.name],
89
- execution_manager=ExecutionManager(),
90
- disconnected_callback=lambda *args: None,
91
- error_callback=lambda *args: None,
92
87
  simulating=False,
93
88
  hw_control_loop=loop,
94
89
  )
@@ -2,26 +2,12 @@ from asyncio import Queue
2
2
  import enum
3
3
  import logging
4
4
  from dataclasses import dataclass
5
- from typing import (
6
- cast,
7
- Tuple,
8
- Union,
9
- List,
10
- Callable,
11
- Dict,
12
- TypeVar,
13
- Type,
14
- TYPE_CHECKING,
15
- )
5
+ from typing import cast, Tuple, Union, List, Callable, Dict, TypeVar, Type
16
6
  from typing_extensions import Literal
17
7
  from opentrons import types as top_types
18
8
  from opentrons_shared_data.pipette.types import PipetteChannelType
19
- from opentrons_shared_data.errors.exceptions import EnumeratedError
20
9
  from opentrons.config import feature_flags
21
10
 
22
- if TYPE_CHECKING:
23
- from .modules.types import ModuleModel
24
-
25
11
  MODULE_LOG = logging.getLogger(__name__)
26
12
 
27
13
 
@@ -398,7 +384,6 @@ class HardwareEventType(enum.Enum):
398
384
  DOOR_SWITCH_CHANGE = enum.auto()
399
385
  ERROR_MESSAGE = enum.auto()
400
386
  ESTOP_CHANGE = enum.auto()
401
- ASYNCHRONOUS_MODULE_ERROR = enum.auto()
402
387
 
403
388
 
404
389
  @dataclass
@@ -443,24 +428,10 @@ class ErrorMessageNotification:
443
428
  event: Literal[HardwareEventType.ERROR_MESSAGE] = HardwareEventType.ERROR_MESSAGE
444
429
 
445
430
 
446
- @dataclass(frozen=True)
447
- class AsynchronousModuleErrorNotification:
448
- exception: EnumeratedError
449
- module_serial: str | None
450
- module_model: "ModuleModel"
451
- port: str
452
- event: Literal[
453
- HardwareEventType.ASYNCHRONOUS_MODULE_ERROR
454
- ] = HardwareEventType.ASYNCHRONOUS_MODULE_ERROR
455
-
456
-
457
431
  # new event types get new dataclasses
458
432
  # when we add more event types we add them here
459
433
  HardwareEvent = Union[
460
- DoorStateNotification,
461
- ErrorMessageNotification,
462
- EstopStateNotification,
463
- AsynchronousModuleErrorNotification,
434
+ DoorStateNotification, ErrorMessageNotification, EstopStateNotification
464
435
  ]
465
436
 
466
437
  HardwareEventHandler = Callable[[HardwareEvent], None]
@@ -102,19 +102,6 @@ def thermocycler_execute_profile(
102
102
  }
103
103
 
104
104
 
105
- def thermocycler_start_execute_profile(
106
- steps: List[ThermocyclerStep], repetitions: int
107
- ) -> command_types.ThermocyclerStartExecuteProfileCommand:
108
- text = (
109
- f"In the background, thermocycler starting to run {repetitions} repetitions "
110
- f" of cycle composed of the following steps: {steps}"
111
- )
112
- return {
113
- "name": command_types.THERMOCYCLER_START_EXECUTE_PROFILE,
114
- "payload": {"text": text, "steps": steps},
115
- }
116
-
117
-
118
105
  def thermocycler_wait_for_hold() -> command_types.ThermocyclerWaitForHoldCommand:
119
106
  text = "Waiting for hold time duration"
120
107
  return {"name": command_types.THERMOCYCLER_WAIT_FOR_HOLD, "payload": {"text": text}}
@@ -196,16 +183,6 @@ def heater_shaker_set_and_wait_for_shake_speed(
196
183
  }
197
184
 
198
185
 
199
- def heater_shaker_set_shake_speed(
200
- rpm: int,
201
- ) -> command_types.HeaterShakerSetShakeSpeedCommand:
202
- text = f"Setting Heater-Shaker to Shake at {rpm} RPM"
203
- return {
204
- "name": command_types.HEATER_SHAKER_SET_SHAKE_SPEED,
205
- "payload": {"text": text},
206
- }
207
-
208
-
209
186
  def heater_shaker_open_labware_latch() -> command_types.HeaterShakerOpenLabwareLatchCommand:
210
187
  text = "Unlatching labware on Heater-Shaker"
211
188
  return {
@@ -1,7 +1,6 @@
1
1
  from datetime import timedelta
2
2
  from typing import Optional
3
3
  from . import types as command_types
4
- from opentrons.protocol_api.tasks import Task
5
4
 
6
5
 
7
6
  def comment(msg: str) -> command_types.CommentCommand:
@@ -53,22 +52,3 @@ def move_labware(text: str) -> command_types.MoveLabwareCommand:
53
52
  "name": command_types.MOVE_LABWARE,
54
53
  "payload": {"text": text},
55
54
  }
56
-
57
-
58
- def wait_for_tasks(tasks: list[Task]) -> command_types.WaitForTasksCommand:
59
- task_ids = [task.created_at.strftime("%Y-%m-%d %H:%M:%S") for task in tasks]
60
- msg = f"Waiting for tasks that started at: {task_ids}."
61
- return {
62
- "name": command_types.WAIT_FOR_TASKS,
63
- "payload": {"text": msg},
64
- }
65
-
66
-
67
- def create_timer(seconds: float) -> command_types.CreateTimerCommand:
68
- return {
69
- "name": command_types.CREATE_TIMER,
70
- "payload": {
71
- "text": f"Creating background timer for {seconds} seconds.",
72
- "time": seconds,
73
- },
74
- }
@@ -64,7 +64,6 @@ HEATER_SHAKER_WAIT_FOR_TEMPERATURE: Final = "command.HEATER_SHAKER_WAIT_FOR_TEMP
64
64
  HEATER_SHAKER_SET_AND_WAIT_FOR_SHAKE_SPEED: Final = (
65
65
  "command.HEATER_SHAKER_SET_AND_WAIT_FOR_SHAKE_SPEED"
66
66
  )
67
- HEATER_SHAKER_SET_SHAKE_SPEED: Final = "command.HEATER_SHAKER_SET_SHAKE_SPEED"
68
67
  HEATER_SHAKER_OPEN_LABWARE_LATCH: Final = "command.HEATER_SHAKER_OPEN_LABWARE_LATCH"
69
68
  HEATER_SHAKER_CLOSE_LABWARE_LATCH: Final = "command.HEATER_SHAKER_CLOSE_LABWARE_LATCH"
70
69
  HEATER_SHAKER_DEACTIVATE_SHAKER: Final = "command.HEATER_SHAKER_DEACTIVATE_SHAKER"
@@ -82,7 +81,6 @@ THERMOCYCLER_OPEN: Final = "command.THERMOCYCLER_OPEN"
82
81
  THERMOCYCLER_CLOSE: Final = "command.THERMOCYCLER_CLOSE"
83
82
  THERMOCYCLER_SET_BLOCK_TEMP: Final = "command.THERMOCYCLER_SET_BLOCK_TEMP"
84
83
  THERMOCYCLER_EXECUTE_PROFILE: Final = "command.THERMOCYCLER_EXECUTE_PROFILE"
85
- THERMOCYCLER_START_EXECUTE_PROFILE: Final = "command.THERMOCYCLER_START_EXECUTE_PROFILE"
86
84
  THERMOCYCLER_DEACTIVATE: Final = "command.THERMOCYCLER_DEACTIVATE"
87
85
  THERMOCYCLER_WAIT_FOR_HOLD: Final = "command.THERMOCYCLER_WAIT_FOR_HOLD"
88
86
  THERMOCYCLER_WAIT_FOR_TEMP: Final = "command.THERMOCYCLER_WAIT_FOR_TEMP"
@@ -104,10 +102,6 @@ ROBOT_MOVE_RELATIVE_TO: Final = "command.ROBOT_MOVE_RELATIVE_TO"
104
102
  ROBOT_OPEN_GRIPPER_JAW: Final = "command.ROBOT_OPEN_GRIPPER_JAW"
105
103
  ROBOT_CLOSE_GRIPPER_JAW: Final = "command.ROBOT_CLOSE_GRIPPER_JAW"
106
104
 
107
- # Tasks #
108
- WAIT_FOR_TASKS: Final = "command.WAIT_FOR_TASKS"
109
- CREATE_TIMER: Final = "command.CREATE_TIMER"
110
-
111
105
 
112
106
  class TextOnlyPayload(TypedDict):
113
107
  text: str
@@ -196,15 +190,6 @@ class HeaterShakerSetAndWaitForShakeSpeedCommand(TypedDict):
196
190
  payload: HeaterShakerSetAndWaitForShakeSpeedPayload
197
191
 
198
192
 
199
- class HeaterShakerSetShakeSpeedPayload(TextOnlyPayload):
200
- pass
201
-
202
-
203
- class HeaterShakerSetShakeSpeedCommand(TypedDict):
204
- name: Literal["command.HEATER_SHAKER_SET_SHAKE_SPEED"]
205
- payload: HeaterShakerSetShakeSpeedPayload
206
-
207
-
208
193
  class HeaterShakerOpenLabwareLatchPayload(TextOnlyPayload):
209
194
  pass
210
195
 
@@ -323,15 +308,6 @@ class ThermocyclerExecuteProfileCommand(TypedDict):
323
308
  payload: ThermocyclerExecuteProfileCommandPayload
324
309
 
325
310
 
326
- class ThermocyclerStartExecuteProfileCommandPayload(TextOnlyPayload):
327
- steps: List[ThermocyclerStep]
328
-
329
-
330
- class ThermocyclerStartExecuteProfileCommand(TypedDict):
331
- name: Literal["command.THERMOCYCLER_START_EXECUTE_PROFILE"]
332
- payload: ThermocyclerStartExecuteProfileCommandPayload
333
-
334
-
335
311
  class ThermocyclerWaitForHoldCommandPayload(TextOnlyPayload):
336
312
  pass
337
313
 
@@ -738,27 +714,6 @@ class RobotCloseGripperJawCommand(TypedDict):
738
714
  payload: GripperCommandPayload
739
715
 
740
716
 
741
- # Task Commands and Payloads
742
-
743
-
744
- class WaitForTasksPayload(TextOnlyPayload):
745
- pass
746
-
747
-
748
- class CreateTimerPayload(TextOnlyPayload):
749
- time: float
750
-
751
-
752
- class WaitForTasksCommand(TypedDict):
753
- name: Literal["command.WAIT_FOR_TASKS"]
754
- payload: WaitForTasksPayload
755
-
756
-
757
- class CreateTimerCommand(TypedDict):
758
- name: Literal["command.CREATE_TIMER"]
759
- payload: CreateTimerPayload
760
-
761
-
762
717
  Command = Union[
763
718
  DropTipCommand,
764
719
  DropTipInDisposalLocationCommand,
@@ -779,7 +734,6 @@ Command = Union[
779
734
  HeaterShakerSetTargetTemperatureCommand,
780
735
  HeaterShakerWaitForTemperatureCommand,
781
736
  HeaterShakerSetAndWaitForShakeSpeedCommand,
782
- HeaterShakerSetShakeSpeedCommand,
783
737
  HeaterShakerOpenLabwareLatchCommand,
784
738
  HeaterShakerCloseLabwareLatchCommand,
785
739
  HeaterShakerDeactivateShakerCommand,
@@ -793,7 +747,6 @@ Command = Union[
793
747
  ThermocyclerWaitForTempCommand,
794
748
  ThermocyclerWaitForHoldCommand,
795
749
  ThermocyclerExecuteProfileCommand,
796
- ThermocyclerStartExecuteProfileCommand,
797
750
  ThermocyclerSetBlockTempCommand,
798
751
  ThermocyclerOpenCommand,
799
752
  TempdeckDeactivateCommand,
@@ -829,9 +782,6 @@ Command = Union[
829
782
  FlexStackerStoreCommand,
830
783
  FlexStackerEmptyCommand,
831
784
  FlexStackerFillCommand,
832
- # Task commands
833
- WaitForTasksCommand,
834
- CreateTimerCommand,
835
785
  ]
836
786
 
837
787
 
@@ -841,7 +791,6 @@ CommandPayload = Union[
841
791
  HeaterShakerSetTargetTemperaturePayload,
842
792
  HeaterShakerWaitForTemperaturePayload,
843
793
  HeaterShakerSetAndWaitForShakeSpeedPayload,
844
- HeaterShakerSetShakeSpeedPayload,
845
794
  HeaterShakerOpenLabwareLatchPayload,
846
795
  HeaterShakerCloseLabwareLatchPayload,
847
796
  HeaterShakerDeactivateShakerPayload,
@@ -874,7 +823,6 @@ CommandPayload = Union[
874
823
  DispenseInDisposalLocationCommandPayload,
875
824
  HomeCommandPayload,
876
825
  ThermocyclerExecuteProfileCommandPayload,
877
- ThermocyclerStartExecuteProfileCommandPayload,
878
826
  ThermocyclerSetBlockTempCommandPayload,
879
827
  TempdeckAwaitTempCommandPayload,
880
828
  TempdeckSetTempCommandPayload,
@@ -894,9 +842,6 @@ CommandPayload = Union[
894
842
  RobotMoveAxisRelativeCommandPayload,
895
843
  RobotMoveAxisToCommandPayload,
896
844
  GripperCommandPayload,
897
- # Task payloads
898
- WaitForTasksPayload,
899
- CreateTimerPayload,
900
845
  ]
901
846
 
902
847
 
@@ -1007,12 +952,6 @@ class HeaterShakerSetAndWaitForShakeSpeedMessage(
1007
952
  pass
1008
953
 
1009
954
 
1010
- class HeaterShakerSetShakeSpeedMessage(
1011
- CommandMessageFields, HeaterShakerSetShakeSpeedCommand
1012
- ):
1013
- pass
1014
-
1015
-
1016
955
  class HeaterShakerOpenLabwareLatchMessage(
1017
956
  CommandMessageFields, HeaterShakerOpenLabwareLatchCommand
1018
957
  ):
@@ -1089,12 +1028,6 @@ class ThermocyclerExecuteProfileMessage(
1089
1028
  pass
1090
1029
 
1091
1030
 
1092
- class ThermocyclerStartExecuteProfileMessage(
1093
- CommandMessageFields, ThermocyclerStartExecuteProfileCommand
1094
- ):
1095
- pass
1096
-
1097
-
1098
1031
  class ThermocyclerSetBlockTempMessage(
1099
1032
  CommandMessageFields, ThermocyclerSetBlockTempCommand
1100
1033
  ):
@@ -1191,14 +1124,6 @@ class RobotCloseGripperJawMessage(CommandMessageFields, RobotCloseGripperJawComm
1191
1124
  pass
1192
1125
 
1193
1126
 
1194
- class WaitForTasksMessage(CommandMessageFields, WaitForTasksCommand):
1195
- pass
1196
-
1197
-
1198
- class CreateTimerMessage(CommandMessageFields, CreateTimerCommand):
1199
- pass
1200
-
1201
-
1202
1127
  CommandMessage = Union[
1203
1128
  DropTipMessage,
1204
1129
  DropTipInDisposalLocationMessage,
@@ -1219,7 +1144,6 @@ CommandMessage = Union[
1219
1144
  HeaterShakerSetTargetTemperatureMessage,
1220
1145
  HeaterShakerWaitForTemperatureMessage,
1221
1146
  HeaterShakerSetAndWaitForShakeSpeedMessage,
1222
- HeaterShakerSetShakeSpeedMessage,
1223
1147
  HeaterShakerOpenLabwareLatchMessage,
1224
1148
  HeaterShakerCloseLabwareLatchMessage,
1225
1149
  HeaterShakerDeactivateShakerMessage,
@@ -1233,7 +1157,6 @@ CommandMessage = Union[
1233
1157
  ThermocyclerWaitForTempMessage,
1234
1158
  ThermocyclerWaitForHoldMessage,
1235
1159
  ThermocyclerExecuteProfileMessage,
1236
- ThermocyclerStartExecuteProfileMessage,
1237
1160
  ThermocyclerSetBlockTempMessage,
1238
1161
  ThermocyclerOpenMessage,
1239
1162
  TempdeckSetTempMessage,
@@ -1260,7 +1183,4 @@ CommandMessage = Union[
1260
1183
  FlexStackerStoreMessage,
1261
1184
  FlexStackerEmptyMessage,
1262
1185
  FlexStackerFillMessage,
1263
- # Task Messages
1264
- WaitForTasksMessage,
1265
- CreateTimerMessage,
1266
1186
  ]
@@ -2,7 +2,6 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from collections.abc import Container
6
5
  from dataclasses import dataclass
7
6
  from typing import List, Mapping, NamedTuple, Optional, Set, Union
8
7
  from typing_extensions import Final
@@ -16,7 +15,6 @@ from opentrons.motion_planning.adjacent_slots_getters import (
16
15
  get_adjacent_staging_slot,
17
16
  )
18
17
 
19
- from opentrons.protocols.api_support.constants import OPENTRONS_NAMESPACE
20
18
  from opentrons.types import DeckSlotName, StagingSlotName
21
19
 
22
20
  _FIXED_TRASH_SLOT: Final[Set[DeckSlotName]] = {
@@ -39,14 +37,14 @@ HS_MAX_X_ADJACENT_ITEM_HEIGHT = 53.0
39
37
  # For background, see: https://github.com/Opentrons/opentrons/issues/10316
40
38
  #
41
39
  # TODO(mc, 2022-06-16): move this constant to the module definition
42
- HS_ALLOWED_ADJACENT_TALL_LABWARE = {
43
- "opentrons_96_filtertiprack_10ul",
44
- "opentrons_96_filtertiprack_200ul",
45
- "opentrons_96_filtertiprack_20ul",
46
- "opentrons_96_tiprack_10ul",
47
- "opentrons_96_tiprack_20ul",
48
- "opentrons_96_tiprack_300ul",
49
- }
40
+ HS_ALLOWED_ADJACENT_TALL_LABWARE = [
41
+ LabwareUri("opentrons/opentrons_96_filtertiprack_10ul/1"),
42
+ LabwareUri("opentrons/opentrons_96_filtertiprack_200ul/1"),
43
+ LabwareUri("opentrons/opentrons_96_filtertiprack_20ul/1"),
44
+ LabwareUri("opentrons/opentrons_96_tiprack_10ul/1"),
45
+ LabwareUri("opentrons/opentrons_96_tiprack_20ul/1"),
46
+ LabwareUri("opentrons/opentrons_96_tiprack_300ul/1"),
47
+ ]
50
48
 
51
49
 
52
50
  @dataclass
@@ -158,15 +156,11 @@ class _MaxHeight(NamedTuple):
158
156
  source_item: DeckItem
159
157
  source_location: DeckSlotName
160
158
  max_height: float
161
- allowed_labware_load_names: Container[str]
159
+ allowed_labware: List[LabwareUri]
162
160
 
163
161
  def is_allowed(self, item: DeckItem) -> bool:
164
162
  if isinstance(item, Labware):
165
- namespace, load_name, _version = item.uri.split("/")
166
- if (
167
- namespace == OPENTRONS_NAMESPACE
168
- and load_name in self.allowed_labware_load_names
169
- ):
163
+ if item.uri in self.allowed_labware:
170
164
  return True
171
165
  else:
172
166
  return item.highest_z < self.max_height
@@ -321,7 +315,7 @@ def _create_ot2_restrictions( # noqa: C901
321
315
  source_item=item,
322
316
  source_location=location,
323
317
  max_height=HS_MAX_X_ADJACENT_ITEM_HEIGHT,
324
- allowed_labware_load_names=HS_ALLOWED_ADJACENT_TALL_LABWARE,
318
+ allowed_labware=HS_ALLOWED_ADJACENT_TALL_LABWARE,
325
319
  )
326
320
  )
327
321
 
@@ -440,6 +434,7 @@ def _create_flex_restrictions( # noqa: C901
440
434
  def _create_restrictions(
441
435
  item: DeckItem, location: Union[DeckSlotName, StagingSlotName], robot_type: str
442
436
  ) -> List[_DeckRestriction]:
437
+
443
438
  if robot_type == "OT-2 Standard":
444
439
  return _create_ot2_restrictions(item, location)
445
440
  else:
@@ -7,6 +7,7 @@ from opentrons.hardware_control.types import CriticalPoint
7
7
 
8
8
  from .types import Waypoint, MoveType, GripperMovementWaypointsWithJawStatus
9
9
  from .errors import DestinationOutOfBoundsError, ArcOutOfBoundsError
10
+ from ..protocol_engine.types import LabwareMovementOffsetData
10
11
 
11
12
  DEFAULT_GENERAL_ARC_Z_MARGIN: Final[float] = 10.0
12
13
  DEFAULT_IN_LABWARE_ARC_Z_MARGIN: Final[float] = 5.0
@@ -124,41 +125,47 @@ def get_gripper_labware_movement_waypoints(
124
125
  from_labware_center: Point,
125
126
  to_labware_center: Point,
126
127
  gripper_home_z: float,
128
+ offset_data: LabwareMovementOffsetData,
127
129
  post_drop_slide_offset: Optional[Point],
128
130
  gripper_home_z_offset: Optional[float] = None,
129
131
  ) -> List[GripperMovementWaypointsWithJawStatus]:
130
132
  """Get waypoints for moving labware using a gripper."""
133
+ pick_up_offset = offset_data.pickUpOffset
134
+ drop_offset = offset_data.dropOffset
135
+
136
+ pick_up_location = from_labware_center + Point(
137
+ pick_up_offset.x, pick_up_offset.y, pick_up_offset.z
138
+ )
139
+ drop_location = to_labware_center + Point(
140
+ drop_offset.x, drop_offset.y, drop_offset.z
141
+ )
142
+
131
143
  gripper_max_z_home = gripper_home_z - (gripper_home_z_offset or 0)
132
- post_drop_home_pos = Point(to_labware_center.x, to_labware_center.y, gripper_home_z)
144
+
145
+ post_drop_home_pos = Point(drop_location.x, drop_location.y, gripper_home_z)
133
146
 
134
147
  waypoints_with_jaw_status = [
135
148
  GripperMovementWaypointsWithJawStatus(
136
- position=Point(
137
- from_labware_center.x, from_labware_center.y, gripper_home_z
138
- ),
149
+ position=Point(pick_up_location.x, pick_up_location.y, gripper_home_z),
139
150
  jaw_open=False,
140
151
  dropping=False,
141
152
  ),
142
153
  GripperMovementWaypointsWithJawStatus(
143
- position=from_labware_center, jaw_open=True, dropping=False
154
+ position=pick_up_location, jaw_open=True, dropping=False
144
155
  ),
145
156
  # Gripper grips the labware here
146
157
  GripperMovementWaypointsWithJawStatus(
147
- position=Point(
148
- from_labware_center.x, from_labware_center.y, gripper_max_z_home
149
- ),
158
+ position=Point(pick_up_location.x, pick_up_location.y, gripper_max_z_home),
150
159
  jaw_open=False,
151
160
  dropping=False,
152
161
  ),
153
162
  GripperMovementWaypointsWithJawStatus(
154
- position=Point(
155
- to_labware_center.x, to_labware_center.y, gripper_max_z_home
156
- ),
163
+ position=Point(drop_location.x, drop_location.y, gripper_max_z_home),
157
164
  jaw_open=False,
158
165
  dropping=False,
159
166
  ),
160
167
  GripperMovementWaypointsWithJawStatus(
161
- position=to_labware_center, jaw_open=False, dropping=False
168
+ position=drop_location, jaw_open=False, dropping=False
162
169
  ),
163
170
  # Gripper ungrips here
164
171
  GripperMovementWaypointsWithJawStatus(
@@ -182,18 +189,25 @@ def get_gripper_labware_movement_waypoints(
182
189
  def get_gripper_labware_placement_waypoints(
183
190
  to_labware_center: Point,
184
191
  gripper_home_z: float,
192
+ drop_offset: Optional[Point],
185
193
  ) -> List[GripperMovementWaypointsWithJawStatus]:
186
194
  """Get waypoints for placing labware using a gripper."""
187
- post_drop_home_pos = Point(to_labware_center.x, to_labware_center.y, gripper_home_z)
195
+ drop_offset = drop_offset or Point()
196
+
197
+ drop_location = to_labware_center + Point(
198
+ drop_offset.x, drop_offset.y, drop_offset.z
199
+ )
200
+
201
+ post_drop_home_pos = Point(drop_location.x, drop_location.y, gripper_home_z)
188
202
 
189
203
  return [
190
204
  GripperMovementWaypointsWithJawStatus(
191
- position=Point(to_labware_center.x, to_labware_center.y, gripper_home_z),
205
+ position=Point(drop_location.x, drop_location.y, gripper_home_z),
192
206
  jaw_open=False,
193
207
  dropping=False,
194
208
  ),
195
209
  GripperMovementWaypointsWithJawStatus(
196
- position=to_labware_center, jaw_open=False, dropping=False
210
+ position=drop_location, jaw_open=False, dropping=False
197
211
  ),
198
212
  # Gripper ungrips here
199
213
  GripperMovementWaypointsWithJawStatus(