-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(engine): move pipettes away if blocking heater-shaker open latch or start shake #11248
Merged
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
1b2090a
first pass at checking and moving pipette for h/s commands
jbleon95 cc958eb
refactored to move logic to motion state view
jbleon95 cf70127
updated tests
jbleon95 3aca3d5
lint fixes
jbleon95 d38a232
tests for motionview checks
jbleon95 4aae7a4
fix places where current well is not being updated
jbleon95 af17588
changes per review comments
jbleon95 b4203a9
easy typo fix
jbleon95 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,13 @@ | |
|
||
from pydantic import BaseModel, Field | ||
|
||
from opentrons.protocol_engine.types import MotorAxis | ||
|
||
from ..command import AbstractCommandImpl, BaseCommand, BaseCommandCreate | ||
|
||
if TYPE_CHECKING: | ||
from opentrons.protocol_engine.state import StateView | ||
from opentrons.protocol_engine.execution import EquipmentHandler | ||
from opentrons.protocol_engine.execution import EquipmentHandler, MovementHandler | ||
|
||
SetAndWaitForShakeSpeedCommandType = Literal["heaterShaker/setAndWaitForShakeSpeed"] | ||
|
||
|
@@ -36,10 +38,12 @@ def __init__( | |
self, | ||
state_view: StateView, | ||
equipment: EquipmentHandler, | ||
movement: MovementHandler, | ||
**unused_dependencies: object, | ||
) -> None: | ||
self._state_view = state_view | ||
self._equipment = equipment | ||
self._movement = movement | ||
|
||
async def execute( | ||
self, | ||
|
@@ -56,6 +60,18 @@ async def execute( | |
# Verify speed from hs module view | ||
validated_speed = hs_module_substate.validate_target_speed(params.rpm) | ||
|
||
# Move pipette away if it is close to the heater-shaker | ||
if self._state_view.motion.check_pipette_blocking_hs_shaker( | ||
hs_module_substate.module_id | ||
): | ||
# TODO(jbl 2022-07-28) replace home movement with a retract movement | ||
await self._movement.home( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same TODO comment as above. |
||
[ | ||
MotorAxis.RIGHT_Z, | ||
MotorAxis.LEFT_Z, | ||
] | ||
) | ||
|
||
# Allow propagation of ModuleNotAttachedError. | ||
hs_hardware_module = self._equipment.get_module_hardware_api( | ||
hs_module_substate.module_id | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the discussion w/ the group on Tuesday I think we to move towards using pipette retraction instead of homing both here and before thermocycler lid movements. So I'd leave a TODO here to switch to using pipette retraction.