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

fix(api): home all gripper axis when a stall is detected #16579

Conversation

TamarZanzouri
Copy link
Contributor

@TamarZanzouri TamarZanzouri commented Oct 23, 2024

Overview

fix for https://opentrons.atlassian.net/browse/RQA-3390.
when a move_labware fails on a stall/collision its position is unknowen.
we currently home just the gripper z, this pr homes extensionZ and updatePositionEstimators collision is detected.

Test Plan and Hands on Testing

steps are in the ticket. I used this protocol to reproduce:

from opentrons import protocol_api, types

metadata = {
    "apiLevel": "2.15",
}

requirements = {
    "robotType": "OT-3"
}

def run(ctx: protocol_api.ProtocolContext) -> None:
    armadilo = ctx.load_labware("armadillo_96_wellplate_200ul_pcr_full_skirt", "D1")
    ctx.move_labware(labware=armadilo, new_location="D2", use_gripper=True)

Changelog

home gripper z and updatePositionEstimators.

Review requests

are we good with chaining it? do we want to split it to 2 separate methods?

Risk assessment

low.

@TamarZanzouri TamarZanzouri requested a review from a team as a code owner October 23, 2024 19:02
@TamarZanzouri TamarZanzouri requested review from brenthagen, sfoster1 and mjhuff and removed request for a team and brenthagen October 23, 2024 19:02
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 good but maybe a name for the error code?

return chainRunRecoveryCommands([HOME_GRIPPER_Z_AXIS])
const homeGripper = useCallback((): Promise<CommandData[]> => {
const gripperAxis =
failedCommandByRunRecord?.error?.errorCode === '2003'
Copy link
Member

Choose a reason for hiding this comment

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

can we get a name for this?

Copy link
Contributor

@mjhuff mjhuff left a comment

Choose a reason for hiding this comment

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

Nice job! Just one comment to think about.

Comment on lines 273 to 276
const gripperAxis =
failedCommandByRunRecord?.error?.errorCode === '2003'
? HOME_GRIPPER
: HOME_GRIPPER_Z_AXIS
Copy link
Contributor

@mjhuff mjhuff Oct 23, 2024

Choose a reason for hiding this comment

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

IMO Because we conditionally call this command only during gripper recovery anyway, I'd be down just to always HOME_GRIPPER. That may be easier and reduce the bug surface a bit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fine by me!

@TamarZanzouri TamarZanzouri merged commit 565865d into edge Oct 24, 2024
18 checks passed
@TamarZanzouri TamarZanzouri deleted the RQA-3390-flex-if-you-stall-during-a-gripper-move-you-will-be-launched-into-er-that-will-loop branch October 24, 2024 18:00
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.

3 participants