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(api): Experimental, barebones support for dropping stuff in the waste chute #13828

Merged
merged 13 commits into from
Oct 25, 2023

Conversation

SyntaxColoring
Copy link
Contributor

@SyntaxColoring SyntaxColoring commented Oct 23, 2023

Overview

This adds very experimental, unstable, internal methods to the Python Protocol API to let you eject tips and drop labware into the Opentrons Flex Waste Disposal Chute™.

This isn't specifically ticketed. It goes towards RSS-333 in general.

Changelog

  • Add ProtocolContext.load_waste_chute(), which returns a new WasteChute object.
  • You can now pass that WasteChute object to ProtocolContext.move_labware() as a destination.
  • You can now pass that WasteChute object to InstrumentContext.drop_tip() as a destination.

The implementation is hacky. For example, dropping a labware in a waste chute actually moves the labware "to slot D3" with a giant offset. We intend to change this when Protocol Engine learns about the waste chute. Hacky Python Protocol API support is beneficial for unblocking internal testers and sussing out API usability concerns.

Known limitations

  • Motion planning is not smart enough to move the pipettes around the waste chute. For example, it will happily jam your pipette into it if you move from slot D2 to slot C3. Plan your deck layouts carefully, or manually retract the pipettes before dangerous movements. And be ready on the e-stop.
  • The API is likely to change in unpredictable ways as we figure out how to implement all of this.
  • You can't dispense liquid to the waste chute. i.e. we support drop_tip() but not dispense() or blow_out().
  • You can't move_to() the waste chute.
  • You can't apply offsets for dropping tips. (You can provide offsets for dropping labware.)
  • Nothing will prevent you from doing impossible loads, like loading a labware in slot D3 and then using it as a waste chute, or loading a waste chute on an OT-2.

Test Plan

Here are a couple of test protocols. We need to run both of them on a Flex.

  • drop_labware_in_waste_chute.py
  • drop_tips_in_waste_chute.py
    • With an 8-channel 1000µL pipette
    • With a 96-channel 1000µL pipette

Review requests

Anything too hacky to tolerate?

Risk assessment

Add simplified drop_tips_in_waste_chute.py.

Copy in constants from the hardware team.

Hack together some geometry computations for moving to the drop-tip location.

Fucking cores.

More core bullshit.

hfuhhghh

Circular import bullshit.

Hack together a drop-tip-in-waste chute implementation.

Apply minimum Z height.

wip
@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Merging #13828 (da90dde) into edge (f2625a6) will not change coverage.
Report is 12 commits behind head on edge.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             edge   #13828   +/-   ##
=======================================
  Coverage   70.74%   70.74%           
=======================================
  Files        1612     1612           
  Lines       53532    53532           
  Branches     3711     3711           
=======================================
  Hits        37873    37873           
  Misses      15050    15050           
  Partials      609      609           
Flag Coverage Δ
g-code-testing 96.44% <ø> (ø)
notify-server 89.13% <ø> (ø)

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

Files Coverage Δ
api/src/opentrons/protocol_api/__init__.py 100.00% <ø> (ø)
...i/src/opentrons/protocol_api/instrument_context.py 87.73% <ø> (ø)
api/src/opentrons/protocol_api/protocol_context.py 92.39% <ø> (ø)
...c/opentrons/protocol_engine/clients/sync_client.py 100.00% <ø> (ø)
...src/opentrons/protocols/api_support/definitions.py 100.00% <ø> (ø)

@SyntaxColoring SyntaxColoring marked this pull request as ready for review October 24, 2023 21:52
@SyntaxColoring SyntaxColoring requested a review from a team as a code owner October 24, 2023 21:52
@SyntaxColoring SyntaxColoring requested a review from a team October 24, 2023 21:52
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Looks really good to me but can we move the test protos so i don't twitch

api/drop_labware_in_waste_chute.py Outdated Show resolved Hide resolved
api/src/opentrons/protocol_api/_waste_chute_dimensions.py Outdated Show resolved Hide resolved
This PR was tested manually. We'll leave the automated tests out, for expedience.
This has been removed from the v7.1.0 launch.
@SyntaxColoring SyntaxColoring merged commit a5ae646 into edge Oct 25, 2023
25 checks passed
@SyntaxColoring SyntaxColoring deleted the duchess_wastechute_von_hackenburg branch October 25, 2023 18:13
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.

2 participants