-
Notifications
You must be signed in to change notification settings - Fork 179
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): use grip force and height from definitions in pe #13233
feat(engine): use grip force and height from definitions in pe #13233
Conversation
Codecov Report
@@ Coverage Diff @@
## internal-release_0.14.0 #13233 +/- ##
===========================================================
- Coverage 72.52% 72.10% -0.43%
===========================================================
Files 2392 1571 -821
Lines 66072 51965 -14107
Branches 7338 3281 -4057
===========================================================
- Hits 47921 37470 -10451
+ Misses 16404 13979 -2425
+ Partials 1747 516 -1231
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.
Code looks good to me! To answer your review question, though, I'm not sure where the stacking offset from an adapter between the deck and target labware is being applied, in the code.
|
||
def get_grip_force(self, labware_id: str) -> float: | ||
"""Get the recommended grip force for gripping labware using gripper.""" | ||
return self.get_definition(labware_id).gripForce or LABWARE_GRIP_FORCE | ||
|
||
def get_grip_height_from_labware_bottom(self, labware_id: str) -> float: | ||
"""Get the recommended grip height from labware bottom, if present.""" | ||
recommended_height = self.get_definition(labware_id).gripHeightFromLabwareBottom | ||
return recommended_height or self.get_dimensions(labware_id).z / 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.
I think this is probably fine in practice because nobody will do this, but beware that this will do the wrong thing if someone does "gripForce": 0
or "gripHeightFromLabwareBottom": 0
for some reason.
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.
Good point. Although it really doesn't make sense to have a force or height of 0. But it makes sense to correct this.
Closes RSS-279
Overview
Updates the labware movement code in PE to use the grip height & force specified by the labware definition, or fallback to default if those are not specified.
Test Plan
(Currently testing with @andySigler )
Changelog
gripHeightFromLabwareBottom
property if present in definition, otherwise use default we've been using so fargripForce
specified in definition if present, otherwise fallback to the default force we've been using so far.Review requests
Risk assessment
Medium. Code is pretty isolated and well-tested so it should not cause any issues as long as tests are passing.