-
Notifications
You must be signed in to change notification settings - Fork 179
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): express stalls in a recoverable way #16861
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was quick! Thank you!
one small note, I worry that the error construction will now be scattered in a bunch of places, but it makes sense to add this logic in one place so I think its ok. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
Definitely paid off—way better than a global try
/catch
. Thank you!
class StallOrCollisionError(ErrorOccurrence): | ||
"""Returned when the machine detects that axis encoders are reading a different position than expected. | ||
|
||
All axes are stopped at the point where the error was encountered. | ||
|
||
The next thing to move the machine must account for the robot not having a valid estimate | ||
of its position. It should be a `home` or `unsafe/updatePositionEstimators`. | ||
""" | ||
|
||
isDefined: bool = True | ||
errorType: Literal["stallOrCollision"] = "stallOrCollision" | ||
|
||
errorCode: str = ErrorCodes.STALL_OR_COLLISION_DETECTED.value.code | ||
detail: str = ErrorCodes.STALL_OR_COLLISION_DETECTED.value.detail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the docstring.
Commands that use move_to_well now will return stalls as DefinedErrors, which means they can be hooked into error recovery en masse. Closes EXEC-831
Both move to addressable are and move to addressable area for drop tip handle stalls now.
Co-authored-by: Max Marrone <[email protected]>
a58bb37
to
f85594c
Compare
Well, that's the goal with the micro-operations - now they're not scattered, they're all in one place for each kind of micro-operation |
Commands that use
move_to_well
,move_to_coordinates
,move_to_addressable_area
, andmove_relative
now will return stalls as DefinedErrors, which means they can be hooked into error recovery en masse.This just leaves move labware.
Closes EXEC-831
Reviews
Testing
Further work and questions
aspirate
's automatic prepare for aspirate at the beginning and probably the same with drop tip but we didn't handle it at all so far so I don't know