-
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
fix(engine): include modules w/o labware in motion planning #10902
Conversation
Codecov Report
@@ Coverage Diff @@
## release_6.0.0 #10902 +/- ##
==============================================
Coverage 73.79% 73.79%
==============================================
Files 2076 2076
Lines 57331 57331
Branches 5722 5722
==============================================
Hits 42307 42307
Misses 13790 13790
Partials 1234 1234
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 makes sense to me so far.
There's a # TODO
on ModuleView.get_overall_height()
about it not being tested or used. We should probably update that and ideally also add the tests.
The meaning of bareOverallHeight
with respect to a Thermocycler is a bit unclear to me. I suppose it could either cover:
- The distance from the deck to the top of the bottom half of the "clamshell."
- The distance from the deck to the top of a closed lid.
I think we need to make sure it's (1), not (2). If it's (2), any time the pipette needs to do a GENERAL_ARC
at a deck-wide safe height, the computed deck-wide safe-height will be very high. I assume that the reason we need our XY Thermocycler-dodging behavior in the first place is that that height would be too high—beyond the range of pipettes. So if it's (2), when a Thermocycler is loaded, every GENERAL_ARC
movement plan would cause a motion planning error.
Done and done.
I agree. It's value is |
I think another way to test this, if you don't feel like issuing HTTP requests manually, is to run through LPC with this protocol: metadata = {"apiLevel": "2.12"}
def run(protocol):
tip_rack = protocol.load_labware("opentrons_96_tiprack_300ul", 5)
plate_1 = protocol.load_labware("biorad_96_wellplate_200ul_pcr", 1)
plate_2 = protocol.load_labware("biorad_96_wellplate_200ul_pcr", 3)
# Try commenting out each one, one at a time.
thermocycler = protocol.load_module("thermocycler")
# magnetic_module = protocol.load_module("magnetic module gen2", 6)
pipette = protocol.load_instrument("p300_single_gen2", mount="left", tip_racks=[tip_rack])
pipette.transfer(300, plate_1.wells_by_name()["A1"], plate_2.wells_by_name()["A12"]) And pay attention to the height of the pipette when it travels between the two plates. |
The answer is 1. The module definition includes a |
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 and logic make sense to me 🏁
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 given your on-robot testing (thank you for the videos!) and @b-cooper's explanation above (thank you!).
Merging to bring CI fixes and PR #10902 into this branch.
Overview
This PR fixes a bug in ProtocolEngine's motion planning. Modules loaded into the engine without a labware would not be taken into account when calculating the safe travel height for arc movements. This could potentially lead to collisions during LPC if a protocol loaded modules in such a way.
Videos
In this setup, I placed a blue piece of paper over a magnetic module so you can see the travel height of the pipette as it arcs
release_6.0.0
/edge
IMG_1480.MOV
This branch
IMG_1481.MOV
Changelog
Review requests
Reproduction procedure below. Compare this logic to the PAPIv2 motion planning logic in
src/opentrons/protocols/geometry/planning.py
Risk assessment
My main question is if I've misunderstood something about thermocyclers. If I have, this could lead to spurious errors during. However, I'm not seeing any differences in max-Z calculations.
Steps to reproduce
I reproduced the buggy behavior using an HTTP protocol, since this mirrors what LPC will be doing.
Procedure: