feat(step-generation, shared-data): pipette collision warnings #14989
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes AUTH-19
Overview
Update the pipette collision warnings in step-generation for the 96-channel column pick up only for now by checking all adjacent slots to the labware of interest and checking to see if the pipette will go into the bounding boxes. The logic is sort of complicated but should match python.
Test Plan
Create a flex protocol with a 96-channel attached. Add a heater-shaker module with an adapter and labware, and add a labware. Move the tiprack off of the tiprack adapter. Make sure the labware is next to the module. Create a move liquid step and make sure its a column pick up. See that the possible collision error occurs. Move the labware around and see that it disappears when its not next to the module.
I added a bunch of test cases to test all the options to make sure it works as expected.
NOTE: the thermocycler collision stuff isn't working yet, i'll investigate more and fix it in a followup PR. I left a comment to add test coverage for it.
Changelog
getFlexSurroundingSlots
in shared-data that returns all surrounding slots for a slot of interest only for the flexgetIsSafePipetteMovement
with a bunch of helper utils to use in step-generationReview requests
I added most of the utils to step-generation directly since I think only step-generation needs them. Lots of the utils rely on having
RobotState
andInvariantContext
as props which is exclusive to step-generation. I added 1 util to shared-data and it is the util that returns all surrounding slots. Let me know if you have thoughts on that!Risk assessment
medium-ish, there is a lot of logic here but i tried to thoroughly test.