Skip to content

feature(app, api): desktop odd labware not detected in labware shuttle #18156

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

Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9f4f3c5
return defined error for retrieve labware missing
TamarZanzouri Apr 14, 2025
9ac70fe
return defined error for retrieve labware missing and test
TamarZanzouri Apr 14, 2025
6c41235
WIP started ER for labware stuck in hopper. need to get recovery opti…
TamarZanzouri Apr 16, 2025
533856d
steps and door state
TamarZanzouri Apr 17, 2025
97c4fb4
empty stacker and prepare shuttle homing
TamarZanzouri Apr 17, 2025
bfbd52d
is holding labware renaming and no logic
TamarZanzouri Apr 17, 2025
a40b4b9
release labware from latch
TamarZanzouri Apr 17, 2025
ec09a41
labware relase flow latch/gripper WIP
TamarZanzouri Apr 17, 2025
1f42ec6
open latch req
TamarZanzouri Apr 17, 2025
976e43b
reattach latch
TamarZanzouri Apr 21, 2025
80e7a45
replace flow complete - need to add tests
TamarZanzouri Apr 21, 2025
67844ff
WIP manual load on shuttle and skip
TamarZanzouri Apr 21, 2025
32783c3
WIP reengage latch for skip working
TamarZanzouri Apr 22, 2025
0db3136
skip whole flow
TamarZanzouri Apr 22, 2025
dfca629
added tests and bug fixes
TamarZanzouri Apr 22, 2025
b2dda8f
changed hooper to hopper
TamarZanzouri Apr 23, 2025
b74e1ae
removed comment - created ticket
TamarZanzouri Apr 23, 2025
5e6c87e
Merge branch 'edge' into EXEC-1151-desktop-odd-labware-not-detected-i…
TamarZanzouri Apr 23, 2025
ceeb8d3
linting and merge fixes
TamarZanzouri Apr 23, 2025
2850acb
merge lint fixes
TamarZanzouri Apr 23, 2025
8a38eff
linting and hopper naming fixes
TamarZanzouri Apr 23, 2025
85c8b8c
test fixes and text changes
TamarZanzouri Apr 24, 2025
acc6902
removed console
TamarZanzouri Apr 24, 2025
c5aa58f
Merge branch 'edge' into EXEC-1151-desktop-odd-labware-not-detected-i…
TamarZanzouri Apr 24, 2025
89dc104
merge fixes
TamarZanzouri Apr 24, 2025
7a4f1a7
pr feedback and added tests
TamarZanzouri Apr 25, 2025
b8398be
lint and formatting
TamarZanzouri Apr 25, 2025
43ab44b
Merge branch 'edge' into EXEC-1151-desktop-odd-labware-not-detected-i…
TamarZanzouri Apr 25, 2025
e2fb39e
Merge branch 'edge' into EXEC-1151-desktop-odd-labware-not-detected-i…
TamarZanzouri Apr 25, 2025
dccfa9a
Merge branch 'edge' into EXEC-1151-desktop-odd-labware-not-detected-i…
TamarZanzouri Apr 25, 2025
31ce8cd
Merge branch 'edge' into EXEC-1151-desktop-odd-labware-not-detected-i…
TamarZanzouri Apr 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@
FlexStackerStallOrCollisionError,
FlexStackerShuttleError,
FlexStackerHopperError,
FlexStackerLabwareRetrieveError,
)

from . import absorbance_reader
@@ -944,6 +945,7 @@
DefinedErrorData[FlexStackerStallOrCollisionError],
DefinedErrorData[FlexStackerShuttleError],
DefinedErrorData[FlexStackerHopperError],
DefinedErrorData[FlexStackerLabwareRetrieveError],
]


Original file line number Diff line number Diff line change
@@ -135,6 +135,19 @@ class FlexStackerHopperError(ErrorOccurrence):
errorInfo: FailedLabware


class FlexStackerLabwareRetrieveError(ErrorOccurrence):
"""Returned when the labware was not able to get to the shuttle."""

isDefined: bool = True
errorType: Literal[
"flexStackerLabwareRetrieveFailed"
] = "flexStackerLabwareRetrieveFailed"

errorCode: str = ErrorCodes.STACKER_SHUTTLE_LABWARE_FAILED.value.code
detail: str = ErrorCodes.STACKER_SHUTTLE_LABWARE_FAILED.value.detail
errorInfo: FailedLabware


@dataclass
class _LabwareDefPair:
definition: LabwareDefinition
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@
FlexStackerStallError,
FlexStackerShuttleMissingError,
FlexStackerHopperLabwareError,
FlexStackerShuttleLabwareError,
)

from ..command import (
@@ -39,6 +40,7 @@
FlexStackerStallOrCollisionError,
FlexStackerShuttleError,
FlexStackerHopperError,
FlexStackerLabwareRetrieveError,
primary_location_sequence,
adapter_location_sequence,
lid_location_sequence,
@@ -54,6 +56,7 @@
FlexStackerStallError,
FlexStackerShuttleMissingError,
FlexStackerHopperLabwareError,
FlexStackerShuttleLabwareError,
]


@@ -143,7 +146,8 @@ class RetrieveResult(BaseModel):
SuccessData[RetrieveResult],
DefinedErrorData[FlexStackerStallOrCollisionError]
| DefinedErrorData[FlexStackerShuttleError]
| DefinedErrorData[FlexStackerHopperError],
| DefinedErrorData[FlexStackerHopperError]
| DefinedErrorData[FlexStackerLabwareRetrieveError],
]


@@ -170,12 +174,14 @@ def handle_recoverable_error(
DefinedErrorData[FlexStackerStallOrCollisionError]
| DefinedErrorData[FlexStackerShuttleError]
| DefinedErrorData[FlexStackerHopperError]
| DefinedErrorData[FlexStackerLabwareRetrieveError]
):
"""Handle a recoverable error raised during command execution."""
error_map = {
FlexStackerStallError: FlexStackerStallOrCollisionError,
FlexStackerShuttleMissingError: FlexStackerShuttleError,
FlexStackerHopperLabwareError: FlexStackerHopperError,
FlexStackerShuttleLabwareError: FlexStackerLabwareRetrieveError,
}
return DefinedErrorData(
public=error_map[type(error)](
@@ -269,6 +275,7 @@ async def execute(self, params: RetrieveParams) -> _ExecuteReturn:
FlexStackerStallError,
FlexStackerShuttleMissingError,
FlexStackerHopperLabwareError,
FlexStackerShuttleLabwareError,
) as e:
return self.handle_recoverable_error(
e, to_retrieve.primaryLabwareId, state_update
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
FlexStackerStallOrCollisionError,
FlexStackerShuttleError,
FlexStackerHopperError,
FlexStackerLabwareRetrieveError,
)
from opentrons.protocol_engine.resources import ModelUtils

@@ -57,6 +58,7 @@
FlexStackerStallError,
FlexStackerShuttleMissingError,
FlexStackerHopperLabwareError,
FlexStackerShuttleLabwareError,
)


@@ -663,6 +665,12 @@ async def test_retrieve_primary_adapter_and_lid(
),
FlexStackerHopperError,
),
(
FlexStackerShuttleLabwareError(
serial="123", labware_expected=True, shuttle_state=""
),
FlexStackerLabwareRetrieveError,
),
],
)
async def test_retrieve_raises_recoverable_error(
@@ -676,7 +684,11 @@ async def test_retrieve_raises_recoverable_error(
stacker_hardware: FlexStacker,
shared_data_error: Exception,
protocol_engine_error: Type[
Union[FlexStackerStallOrCollisionError, FlexStackerShuttleError]
Union[
FlexStackerStallOrCollisionError,
FlexStackerShuttleError,
FlexStackerLabwareRetrieveError,
]
],
) -> None:
"""It should raise a stall error."""
15 changes: 13 additions & 2 deletions app/src/assets/localization/en/error_recovery.json
Original file line number Diff line number Diff line change
@@ -26,6 +26,8 @@
"do_you_need_to_blowout": "First, do you need to blow out aspirated liquid?",
"door_open_robot_home": "The robot needs to safely move to its home location before you manually move the labware.",
"droplets_or_liquid_cause_failure": "Droplets or liquid in the tips may cause liquid level detection to fail",
"empty_stacker_of_labware_above_latch": "Empty stacker of labware above latch",
"empty_stacker_of_labware_above_latch_labware_stuck": "<block>Empty the stacker of all labware above the latch.</block><block>Labware stuck on the latch will be retrieved later in recovery.</block>",
"ensure_lw_is_accurately_placed": "Ensure labware is accurately placed in the slot to prevent further errors.",
"ensure_stacker_has_labware": "Ensure stacker has labware",
"error": "Error",
@@ -52,17 +54,21 @@
"ignore_only_this_error": "Ignore only this error",
"ignore_similar_errors_later_in_run": "Ignore similar errors later in the run?",
"inspect_the_robot": "<block>First, inspect the robot to ensure it's prepared to continue the run from the next step.</block><block>Then, close the robot door before proceeding.</block>",
"is_there_labware_stuck_on_the_stacker_latch": "Is there labware stuck on the stacker latch?",
"labware_not_retrieved": "Stacker latch jammed",
"labware_released_from_current_height": "The labware will be released from its current height.",
"latch_releasing_labware": "Latch releasing labware",
"latch_will_release_in_s": "Latch will release labware in {{seconds}} seconds",
"launch_recovery_mode": "Launch recovery mode",
"load_labware_into_labware_shuttle": "Load labware into labware shuttle",
"load_labware_into_stacker": "Load <#> labware into Stacker",
"load_labware_into_stacker_and_retry_step": "Load labware into Stacker and retry step",
"load_labware_shuttle_and_retry_step": "Load labware shuttle and retry step",
"load_labware_shuttle_onto_track": "Load labware shuttle onto track",
"load_labware_into_labware_shuttle": "Load labware into labware shuttle",
"make_sure_loaded_correct_number_of_labware_stacker": "Make sure you load the correct number of labware into the stacker.",
"manually_fill_liquid_in_well": "Manually fill liquid in well {{well}}",
"manually_fill_well_and_retry_same_tips": "Manually fill well and retry with same tips",
"manually_fill_well_and_retry_new_tips": "Manually fill well and retry with new tips",
"manually_fill_well_and_retry_same_tips": "Manually fill well and retry with same tips",
"manually_load_labware_into_labware_shuttle_and_skip_step": "Manually load labware into labware shuttle and skip step",
"manually_load_labware_into_shuttle_and_skip": "Manually load labware into labware shuttle and skip step",
"manually_move_lw_and_skip": "Manually move labware and skip to next step",
@@ -77,16 +83,20 @@
"pick_up_tips": "Pick up tips",
"pipette_overpressure": "Pipette overpressure",
"prepare_deck_for_homing": "Prepare deck for homing",
"prepare_for_stacker_latch_reengage": "Prepare for stacker latch to re-engage",
"prepare_track_for_homing": "Prepare for shuttle to move backwards",
"proceed_to_cancel": "Proceed to cancel",
"proceed_to_home": "Proceed to home",
"proceed_to_tip_selection": "Proceed to tip selection",
"re_engage_latch": "Re-engage latch",
"recovery_action_failed": "{{action}} failed",
"recovery_mode": "Recovery mode",
"recovery_mode_explanation": "<block>Recovery Mode provides you with guided and manual controls for handling errors at runtime.</block><br/><block>You can make changes to ensure the step in progress when the error occurred can be completed or choose to cancel the protocol. When changes are made and no subsequent errors are detected, the method completes. Depending on the conditions that caused the error, you will only be provided with appropriate options.</block>",
"release": "Release",
"release_labware_from_gripper": "Release labware from gripper",
"release_labware_from_latch": "Release labware from latch",
"remove_any_attached_tips": "Remove any attached tips",
"replace_labware_in_stacker_and_retry": "Replace labware in stacker and retry step",
"replace_labware_in_stacker_and_step": "Replace labware in stacker and retry step",
"replace_tips_and_select_loc_partial_tip": "Replace tips and select the last location used for partial tip pickup.",
"replace_tips_and_select_location": "It's best to replace tips and select the last location used for tip pickup.",
@@ -123,6 +133,7 @@
"skipping_to_step_succeeded_na": "Skipping to next step succeeded.",
"stacker_door_open_robot_home": "The robot needs to safely move to its home location before you manually move the labware.",
"stacker_empty": "Stacker empty",
"stacker_latch_will_reengage": "The stacker latch will re-engage so that you can reload the stacker. Make sure that any obstructions have been cleared.",
"stacker_stall_or_collision_error": "Stacker stalled",
"stall_or_collision_detected_when": "A stall or collision is detected when the robot's motors are blocked",
"stall_or_collision_error": "Stall or collision",
Original file line number Diff line number Diff line change
@@ -268,6 +268,8 @@
case RECOVERY_MAP.MANUAL_REPLACE_STACKER_AND_RETRY.ROUTE:
case RECOVERY_MAP.MANUAL_LOAD_IN_STACKER_AND_SKIP.ROUTE:
case RECOVERY_MAP.LOAD_LABWARE_SHUTTLE_AND_RETRY.ROUTE:
case RECOVERY_MAP.REPLACE_LABWARE_IN_HOPPER_AND_RETRY.ROUTE:
case RECOVERY_MAP.MANUAL_LOAD_ON_SHUTTLE_AND_SKIP.ROUTE:

Check warning on line 272 in app/src/organisms/ErrorRecoveryFlows/ErrorRecoveryWizard.tsx

Codecov / codecov/patch

app/src/organisms/ErrorRecoveryFlows/ErrorRecoveryWizard.tsx#L271-L272

Added lines #L271 - L272 were not covered by tests
return buildManualReplaceLwAndRetry()
case RECOVERY_MAP.ROBOT_DOOR_OPEN_SPECIAL.ROUTE:
return buildRecoveryDoorOpenSpecial()
@@ -278,6 +280,7 @@
case RECOVERY_MAP.ROBOT_PICKING_UP_TIPS.ROUTE:
case RECOVERY_MAP.ROBOT_SKIPPING_STEP.ROUTE:
case RECOVERY_MAP.ROBOT_RELEASING_LABWARE.ROUTE:
case RECOVERY_MAP.ROBOT_RELEASING_LABWARE_LATCH.ROUTE:

Check warning on line 283 in app/src/organisms/ErrorRecoveryFlows/ErrorRecoveryWizard.tsx

Codecov / codecov/patch

app/src/organisms/ErrorRecoveryFlows/ErrorRecoveryWizard.tsx#L283

Added line #L283 was not covered by tests
return buildRecoveryInProgress()
case RECOVERY_MAP.ROBOT_DOOR_OPEN.ROUTE:
return buildManuallyRouteToDoorOpen()
Loading
Oops, something went wrong.
Loading
Oops, something went wrong.