-
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): separate disengage and stop #13185
fix(api): separate disengage and stop #13185
Conversation
Codecov Report
@@ Coverage Diff @@
## internal-release_0.14.0 #13185 +/- ##
===========================================================
- Coverage 72.51% 72.51% -0.01%
===========================================================
Files 2394 2394
Lines 66052 66051 -1
Branches 7345 7345
===========================================================
- Hits 47897 47896 -1
Misses 16407 16407
Partials 1748 1748
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Leaving as a comment. Don't want my q's to be blocking.
await self._backend.halt() | ||
|
||
def stop_modules(self) -> None: |
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.
What is this guy meant to do?
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 clears any future module tasks scheduled by the protocol
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.
Ah yes I see it now. The diff on github was being weird for me and I thought it was a free floating func
await self.disengage_axes( | ||
[ax for ax in Axis if self._backend.axis_is_present(ax)] | ||
) | ||
await self.stop_motors() |
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.
Should the order be
await self.stop_motors()
await self.disengage_axes()
?
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.
The disengage request is used to immediately stop the motor while it's still in motion. This allows the halt request to behave similarly to an estop.
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.
lgtm
Overview
When we issue a StopRequest to the Flex axes, the following happens on the firmware side:
This has worked pretty well for immediately halting robot motion. But, this also means sometimes we're unexpectedly disengaging the motors when not necessary and leaving the axes in a non-movable state.
We can solve this by not disengaging the motors in the StopRequest task and let the DisableMotorRequest handles that. You'll need the changes in Opentrons/ot3-firmware#710 in order for this to work properly.