-
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(api): refresh gripper jaw state from firmware #13506
feat(api): refresh gripper jaw state from firmware #13506
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## chore_release-7.0.0 #13506 +/- ##
=======================================================
- Coverage 71.32% 71.31% -0.02%
=======================================================
Files 2427 2427
Lines 67943 67959 +16
Branches 7880 7880
=======================================================
+ Hits 48462 48465 +3
- Misses 17627 17640 +13
Partials 1854 1854
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.
I like checking and returning the state but I don't think we should raise an error if you try and home while we're gripping and the jaws are at least 5mm apart. While it's a reasonable assumption that this means a labware is in the jaws, it's still an assumption, and completely locking out the ability of the jaw to home in that state means it would be stuck until a machine reboot or until you pulled the gripper off.
Let's remove raising that error but otherwise looks good!
My intention was to force us to only use |
I guess... I really like keeping home as a thing that always resets the thing whenever possible though. I think the reason to lock out home here is just to prevent programming errors on higher layers, but we're sort of making ourselves vulnerable to the same error. |
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.
Makes sense!
Overview
The gripper firmware can now report the active jaw state–this means that we don't need to solely rely on the hardware controller to keep track of what the gripper is doing.
Knowing the currently jaw state, along with the jaw width reported by the brushed motor encoder, the hardware controller can safely assume whether or not a labware is actively being held by the jaw. (We can do this by checking the the minimum jaw width against the current jaw width; if those values are not close enough, it's very likely that the the gripper is holding something.)
We want this because we can use this info to determine whether or not we should home the gripper jaw during protocol cleanup. YAY!
Test Plan
Run a protocol that uses the gripper to move a labware around, and while the gripper is holding on the labware:
...and make sure that the labware just doesn't get dropped when (1) the protocol gets canceled or (2) when the robot homes all axes during protocol cleanup.
Here's a sample protocol:
Make sure you're using the firmware changes in this PR: Opentrons/ot3-firmware#719
Review requests
On the protocol engine side, we should handle that GripError differently when we're encountering it during protocol cleanup and when we're about to start a protocol.