-
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
fix(api): readjust hardware controller end state in engine cleanup #13431
fix(api): readjust hardware controller end state in engine cleanup #13431
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## chore_release-7.0.0 #13431 +/- ##
====================================================
Coverage 71.67% 71.67%
====================================================
Files 2431 2427 -4
Lines 67664 67597 -67
Branches 7812 7784 -28
====================================================
- Hits 48499 48452 -47
+ Misses 17325 17319 -6
+ Partials 1840 1826 -14
Flags with carried forward coverage won't be shown. Click here to find out more.
|
- for 96-channel: | ||
- HOME_THEN_DISENGAGE after protocol runs | ||
- DISENGAGE_IN_PLACE after maintenance runs |
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.
Anticipated. Not finalized yet and not used anywhere either.
Tested on an OT-2:
|
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.
This looks really good, I like the enum approach here.
await self._backend.hard_halt() | ||
await self._backend.halt() |
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.
I am not fully sure about this change. I've made this change assuming that backend.hard_halt()
is equivalent to disengage and backend.halt()
is equivalent to stop_motors()
.
|
||
|
||
class PostRunHardwareState(Enum): | ||
"""State of robot gantry & motors after a stop is performed and the hardware API is reset. |
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.
"""State of robot gantry & motors after a stop is performed and the hardware API is reset. | |
"""State of robot gantry & motors after the run is finished and the hardware API is reset. |
Tested the following on a Flex:
|
We think this is going to help with RQA-1450. Per discussion in that ticket, we might want to tweak behavior slightly—for example, never home after a protocol failure? We're going to merge this now, and then discuss any changes that might need to be done on top of this. Thank you again for getting to the bottom of this! |
Overview
While handling a bug in engine cleanup in #13339, we rearranged the sequence of motor disengage, re-engage and home, which undid the work done in to not end a run with motors disengaged. This PR re-rearranges the sequence again, with additional refactors for clarity and upcoming support for disengaging the 96-channel at the end of runs.
See this document for detailed notes on requirements for motor disengaging.
Also separates out the concerns of post-run-tip-drop & post-run-homing-and-disengaging.
Test Plan
moveTo
command succeeds without anyMustHomeError
s or other errors indicating that motors are disengaged. (This checks for starting state of maintenance run after a protocol run)moveTo
command still works correctly as in (2), without requiring aHome
. (This checks for starting state of maintenance run after a previous maintenance run)DEL
request to delete the maintenance run. Verify that the deletion request fails withEngineConflictError
. Then reattempt deletion after the movement is over and it should delete the run successfully and keep the gantry in place.Changelog
PostRunHardwareState
enum that clearly defines the allowed end states for hardware after a run is finished.drop_tips_and_home
argument into:drop_tips_after_run
: whether to drop tips during the current run's cleanuppost_run_hardware_state
: whether to home and/or disengage motors after the run cleanupapi.halt()
to optionally disengage motors before performing an abrupt halt/stopapi.stop()
so that halt only cares about halting hardware motion while stop does all the cleanup.Review requests
Risk assessment
Medium. Re-implements the intentions of #13185 so that's a state change sequence we had been using and testing with before the run cancellation bug fix. Thorough testing will make sure we aren't introducing any regressions.