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

bug(api): Two pipettes in use, dispensing in same well; second pipette dispensing moves diagonally downwards. #7156

Closed
Matt-Zwimpfer opened this issue Dec 22, 2020 · 3 comments · Fixed by #7609
Assignees
Labels
api Affects the `api` project bug endorsed-by-support This feature request came from, or is endorsed by, Opentrons' Support team. robot-svcs Falls under the purview of the Robot Services squad (formerly CPX, Core Platform Experience).
Milestone

Comments

@Matt-Zwimpfer
Copy link

Matt-Zwimpfer commented Dec 22, 2020

Overview

When two pipettes are used in a protocol (not simultaneously, but one after the other), each with their own aspirate and dispense commands, but with a shared destination well/tube, the last pipette to dispense descends diagonally into the destination well/tube.

Steps to reproduce

Create a code with the separate aspirate and dispense functions using two pipettes that dispense into the same well one after the other. Example code:

image

Current behavior

Aspiration steps are completed correctly and the dispense by the first pipette into the shared destination well/tube is successful, but during the dispense step of the second pipette, the second pipette moves diagonally downward towards the destination well/tube. Video of example protocol running: https://www.youtube.com/watch?v=i6QPtzjRDmM&feature=youtu.be

Expected behavior

The second pipette should move in the XY plane first to position itself above the top-center of the destination well/tube, without any movement in the Z-direction, and then descend in the Z direction to dispense into the destination well.

@Matt-Zwimpfer Matt-Zwimpfer added bug api Affects the `api` project robot-svcs Falls under the purview of the Robot Services squad (formerly CPX, Core Platform Experience). labels Dec 22, 2020
@mcous
Copy link
Contributor

mcous commented Dec 22, 2020

Shoot, theorized this bug a few weeks back from reading the code but never got around to testing it. Glad to have the repro.

Using a pipette sets the ProtocolContext’s location cache, but changing the active pipette does not clear the cache, so the system thinks pipette number 2 is already inside the target well and it issues a direct movement rather than an arc.

Issue has already been accounted for and avoided in the newer ProtocolEngine, but should probably be fixed in the currently thick protocol API, too.

@beniroquai
Copy link

beniroquai commented Mar 31, 2021

Hey, is there any update on this? I face the same issue when performing the following:

    for i_col in range(i_experiment, N_cols):
        for i_steps in range(2):
            pipette.dispense()  
            #print("Remove liquid "+experiment_methods[i_row_bluedye]+" - column: "+str(i_col))

            '''
            Go to the microscope and dispense 
            '''    
            #get position of the first well of the microscope
            center_location = plate.columns()[i_row][i_col].center()
            
            # offset-coordinates (only calibrate it once)
            # dx=-6; dy=2; dz=150

            # go to well
            adjusted_location = center_location.move(types.Point(x=-6, y=2, z=135))
            print(adjusted_location.point)
            pipette.move_to((adjusted_location))
            time.sleep(.51)
            
            # go to down and aspirate 
            adjusted_location = center_location.move(types.Point(x=-6, y=2, z=88))
            print(adjusted_location.point)
            pipette.move_to((adjusted_location))
            pipette.aspirate(V_aspirate_blue,adjusted_location)
            time.sleep(0.51)
            
            # move up
            adjusted_location = center_location.move(types.Point(x=-6, y=2, z=135))
            print(adjusted_location.point)
            pipette.move_to((adjusted_location))
            time.sleep(.51)

            '''
            Go to the liquid and aspirate some stuff
            '''
            #get position of the first well of the microscope
            pos_reagent = plate2.columns(1)[0][1].center()
            dx=0; dy=-3; dz=-15 # offset-coordinates (only calibrate it once)

            # Get a location 1 mm right, 1 mm back, and 1 mm up from the center of well A1.
            adjusted_location = pos_reagent.move(types.Point(x=dx, y=dy, z=dz))
            print(adjusted_location.point)
            pipette.move_to((adjusted_location))
            pipette.dispense()
            pipette.blow_out()

            # move head up
            # Get a location 1 mm right, 1 mm back, and 1 mm up from the center of well A1.
            adjusted_location = pos_reagent.move(types.Point(x=dx, y=dy, z=130))
            print(adjusted_location.point)
            pipette.move_to((adjusted_location))

where the aspirate causes this diagonal motion. A second pipette is mounted too but not yet moved.

I get this issue:

image

I think it's complaining about reaching the lower boundary - even though it should be not even reaching it, or?

protocol is initialized like this:

# Connect to the opentrons robot
protocol = opentrons.execute.get_protocol_api('2.9')
protocol.home()

# setup the pipets
pipette = protocol.load_instrument('p300_single', 'right')

The behaviour is gone if I remove the aspirate().

Robot information:

Robot Name:
 
Robot

Firmware Version:

v1.1.0-25e5cea

Server Version:

4.2.0

Supported Protocol API Versions:

min: 2.0, max: 2.9

Thanks!

@beniroquai
Copy link

beniroquai commented Mar 31, 2021

@mcous

interstingly, this diagonal motion is not hapenning in the second loop here:

protocol.home()
i_pipette = pickup_fresh_pipette_tip(i_pipette, pipette, tiprack)
for i_steps in range(2):
            pipette.dispense()  
            #print("Remove liquid "+experiment_methods[i_row_bluedye]+" - column: "+str(i_col))

            '''
            Go to the microscope and dispense 
            '''    
            #get position of the first well of the microscope
            center_location = plate.columns()[i_row][i_col].center()

            # go to well
            adjusted_location = plate.columns()[i_row][i_col].center().move(types.Point(x=-6, y=2, z=135))
            print(adjusted_location.point)
            pipette.move_to((adjusted_location))
            
            # go to down and aspirate 
            adjusted_location = plate.columns()[i_row][i_col].center().move(types.Point(x=-6, y=2, z=88))
            print(adjusted_location.point)
            #pipette.move_to((adjusted_location))
            pipette.aspirate(50,adjusted_location)
            
            # move up
            adjusted_location = plate.columns()[i_row][i_col].center().move(types.Point(x=-6, y=2, z=135))
            print(adjusted_location.point)
            pipette.move_to((adjusted_location))

            '''
            Go to the liquid and aspirate some stuff
            '''
            #get position of the first well of the microscope
            pos_reagent = plate2.columns(1)[0][1].center()
            dx=0; dy=-3; dz=-15 # offset-coordinates (only calibrate it once)

            # Get a location 1 mm right, 1 mm back, and 1 mm up from the center of well A1.
            adjusted_location = pos_reagent.move(types.Point(x=dx, y=dy, z=dz))
            print(adjusted_location.point)
            pipette.move_to((adjusted_location))
            pipette.dispense()
            pipette.blow_out()

            # move head up
            # Get a location 1 mm right, 1 mm back, and 1 mm up from the center of well A1.
            adjusted_location = pos_reagent.move(types.Point(x=dx, y=dy, z=130))
            print(adjusted_location.point)
            pipette.move_to((adjusted_location))

Is there a quick fix for it?

protocol.home() is in a different cell inside a juypter notebook

UPDATE:
The diagonal motion randomly happens also in the first iteration of the loop...

@mattwelch mattwelch added this to the CPX Sprint 30 milestone Apr 6, 2021
@amitlissack amitlissack self-assigned this Apr 7, 2021
amitlissack pushed a commit that referenced this issue Apr 14, 2021
* wip: noodle around with location cache
* add unit tests

Co-authored-by: Mike Cousins <[email protected]>

closes #7156
@alexjoel42 alexjoel42 added the endorsed-by-support This feature request came from, or is endorsed by, Opentrons' Support team. label Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Affects the `api` project bug endorsed-by-support This feature request came from, or is endorsed by, Opentrons' Support team. robot-svcs Falls under the purview of the Robot Services squad (formerly CPX, Core Platform Experience).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants