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): clean up tip motor distance caching/usage #14156

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

fsinapi
Copy link
Contributor

@fsinapi fsinapi commented Dec 8, 2023

Overview

RQA-2038 seems to be related to the Tip Check that occurs when cancelling a protocol. The Serialization error was a result of the software attempting to send a move group with a duration far exceeding a 32-bit integer. I was able to replicate the issue by cancelling a run during the setup stage, and then re-entering setup at a time such that a Tip Motor home action got interrupted, leaving the tip motors with a "motor_position" estimate that is orders of magnitude higher than the actual max position of the axis.

Once the tip motor is in this situation, the software will fail a subsequent Tip Presence Check because of the invalid cached position of the motor.

To fix this, I added a few bandaids

  • Wrap tip presence checks in the motion lock
  • If a tip action fails for any reason, clear the cached tip motor position
  • (Most importantly) if the cached tip motor position is higher than the physical limit of the axis, force the software to run a slow home.

With all of these changes, I can no longer replicate the issue.

Test Plan

Replication is mentioned above.

Changelog

Listed above

Review requests

Risk assessment

Medium/low, doesn't touch anything too integral

@fsinapi fsinapi requested review from nusrat813 and a team December 8, 2023 21:43
@fsinapi fsinapi self-assigned this Dec 8, 2023
@fsinapi fsinapi requested a review from a team as a code owner December 8, 2023 21:43
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.

Ah, yeah, the downside of doing home the way we do it

Copy link

codecov bot commented Dec 8, 2023

Codecov Report

Merging #14156 (4252d1a) into chore_release-7.1.0 (2053ac9) will increase coverage by 0.00%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                  @@
##           chore_release-7.1.0   #14156   +/-   ##
====================================================
  Coverage                70.45%   70.45%           
====================================================
  Files                     2512     2512           
  Lines                    71216    71215    -1     
  Branches                  8970     8970           
====================================================
  Hits                     50173    50173           
+ Misses                   18849    18848    -1     
  Partials                  2194     2194           
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 Δ
...entrons/hardware_control/backends/ot3controller.py 68.26% <ø> (+0.40%) ⬆️
api/src/opentrons/hardware_control/ot3api.py 79.58% <ø> (ø)

@fsinapi fsinapi merged commit d26e72b into chore_release-7.1.0 Dec 8, 2023
25 checks passed
@fsinapi fsinapi deleted the RQA-2038-tip-motor-overflow branch December 8, 2023 22:02
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