Skip to content
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, api): alternate tip drop location for addressable area trash bins #14196

Merged

Conversation

jbleon95
Copy link
Contributor

Overview

Addresses RSS-412

This PR adds tip drop alternation back into the Protocol Engine, for both OT-2 and Flex, for both column 1 and column 3 trashes. A new moveToAddressableAreaForDropTip command was added to encapsulate the logic in protocol engine for cycling between a right bias and a left bias.

In order to make the deck points the pipette critical points move to accurate, the boundingBox and offsetFromCutoutFixture values needed to be changed for the trash bin addressable areas. The previous equation for a right mount moving to the left bias for a column 1 trash needed to be adjusted since the current logic was moving it too far to the right.

Test Plan

Extensively tested all combinations of columns, mounts, and 96 channel both with full configuration and partial tip configuration (only column in A12) to ensure that they go to the correct place, do no collide with anything, and cycle accurately through the locations. Most of this was done in postman, but this protocol was run for the partial tip drop test.

from opentrons.protocol_api import COLUMN


metadata = {
    'protocolName': '96 Channel Partial Tip Alternation',
}

requirements = {
    "robotType": "Flex",
    "apiLevel": "2.16"
}


def run(context):
    tiprack = context.load_labware('opentrons_flex_96_tiprack_1000ul', 'C2')

    pipette = context.load_instrument('flex_96channel_1000', 'left')
    pipette.configure_nozzle_layout(style=COLUMN, start="A12")

    trash_b3 = context.load_trash_bin('B3')
    trash_d1 = context.load_trash_bin('D1')

    pipette.pick_up_tip(tiprack.wells()[0])
    pipette.drop_tip(trash_b3)
    context.pause()
    pipette.reset_tipracks()

    pipette.pick_up_tip(tiprack.wells()[0])
    pipette.drop_tip(trash_b3)
    context.pause()
    pipette.reset_tipracks()

    pipette.pick_up_tip(tiprack.wells()[0])
    pipette.drop_tip(trash_b3)
    context.pause()
    pipette.reset_tipracks()

    pipette.pick_up_tip(tiprack.wells()[0])
    pipette.drop_tip(trash_d1)
    context.pause()
    pipette.reset_tipracks()

    pipette.pick_up_tip(tiprack.wells()[0])
    pipette.drop_tip(trash_d1)
    context.pause()
    pipette.reset_tipracks()

    pipette.pick_up_tip(tiprack.wells()[0])
    pipette.drop_tip(trash_d1)
    context.pause()
    pipette.reset_tipracks()

Changelog

  • added moveToAddressableAreaForDropTip PE command
  • hooked up PAPI drop tip for trash bins to use the new command
  • modified boundingBoxandoffsetFromCutoutFixture` values for trash bins in V4 deck definitions
  • modified the equation for a right mount single/multi channel pipette accessing the left tip drop location of a column 1 trash bin to be less conservative in its leftward offset.

Review requests

Risk assessment

Medium.

@jbleon95 jbleon95 requested review from brenthagen, jerader and a team December 13, 2023 22:32
@jbleon95 jbleon95 requested review from a team as code owners December 13, 2023 22:32
Copy link

codecov bot commented Dec 13, 2023

Codecov Report

Merging #14196 (3e44446) into chore_release-7.1.0 (fcbe7f5) will decrease coverage by 0.02%.
Report is 3 commits behind head on chore_release-7.1.0.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@                   Coverage Diff                   @@
##           chore_release-7.1.0   #14196      +/-   ##
=======================================================
- Coverage                70.43%   70.42%   -0.02%     
=======================================================
  Files                     2512     1636     -876     
  Lines                    71272    54504   -16768     
  Branches                  8999     4028    -4971     
=======================================================
- Hits                     50203    38382   -11821     
+ Misses                   18860    15421    -3439     
+ Partials                  2209      701    -1508     
Flag Coverage Δ
app 38.71% <ø> (-28.93%) ⬇️
g-code-testing 96.44% <ø> (ø)
notify-server 89.13% <ø> (ø)
protocol-designer 44.99% <ø> (ø)
shared-data 75.10% <ø> (ø)
step-generation 86.84% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...c/opentrons/protocol_engine/clients/sync_client.py 100.00% <ø> (ø)
...src/opentrons/protocol_engine/commands/__init__.py 100.00% <ø> (ø)
...entrons/protocol_engine/commands/command_unions.py 100.00% <ø> (ø)
...pi/src/opentrons/protocol_engine/state/geometry.py 100.00% <ø> (ø)
...pi/src/opentrons/protocol_engine/state/pipettes.py 100.00% <ø> (ø)

... and 877 files with indirect coverage changes

Copy link
Collaborator

@jerader jerader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@@ -1996,6 +1999,90 @@
},
"required": ["params"]
},
"MoveToAddressableAreaForDropTipParams": {
"title": "MoveToAddressableAreaForDropTipParams",
"description": "Payload required to move a pipette to a specific addressable area.\n\nAn *addressable area* is a space in the robot that may or may not be usable depending on how\nthe robot's deck is configured. For example, if a Flex is configured with a waste chute, it will\nhave additional addressable areas representing the opening of the waste chute, where tips and\nlabware can be dropped.\n\nThis moves the pipette so all of its nozzles are centered over the addressable area.\nIf the pipette is currently configured with a partial tip layout, this centering is over all\nthe pipette's physical nozzles, not just the nozzles that are active.\n\nThe z-position will be chosen to put the bottom of the tips---or the bottom of the nozzles,\nif there are no tips---level with the top of the addressable area.\n\nWhen this command is executed, Protocol Engine will make sure the robot's deck is configured\nsuch that the requested addressable area actually exists. For example, if you request\nthe addressable area B4, it will make sure the robot is set up with a B3/B4 staging area slot.\nIf that's not the case, the command will fail.",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this example with the waste chute is a bit confusing to me since this command is for trash bins and not waste chute right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I need to fix this up, but I can do that in a quick doc follow up tomorrow

Copy link
Contributor

@CaseyBatten CaseyBatten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good with the noted change that _move_to_dispoal_locations needs to only alternate tip drops for a drop trip action and should ignore that for things like blowout/dispense/etc. We should take a look at how this relates to the transfer behaviors automatic drop tip behavior at the end of a given transfer. AKA:
If you have two transfers in a row, does it drop the tip in the same location twice?

Otherwise everything looks good to me.

Copy link
Contributor

@SyntaxColoring SyntaxColoring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed on a call. Looks great, thanks!



class MoveToAddressableAreaForDropTipParams(PipetteIdMixin, MovementMixin):
"""Payload required to move a pipette to a specific addressable area.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably nuke this docstring and say something like "this is like moveToAddressableArea except it has tip alternation.

Comment on lines -807 to +861
well_x_dim / 2 - SLOT_WIDTH + drop_location_margin_from_labware_edge
-well_x_dim / 2 + drop_location_margin_from_labware_edge * 2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this makes sense if the intent is to double the margin from the left edge.

I think this is another really good opportunity for motion planning based on high-fidelity pipette dimensions and deck limits. ("Go as far left as you can without bumping into the frame.")

@jbleon95 jbleon95 merged commit 0e024a8 into chore_release-7.1.0 Dec 13, 2023
44 checks passed
@jbleon95 jbleon95 deleted the alternate_tip_drop_for_addressable_areas branch December 13, 2023 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants