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): enable stall detection #12377

Merged
merged 30 commits into from
May 22, 2023
Merged

fix(api): enable stall detection #12377

merged 30 commits into from
May 22, 2023

Conversation

ahiuchingau
Copy link
Contributor

@ahiuchingau ahiuchingau commented Mar 28, 2023

Overview

We previously disable stall detection because the Y axes were unreliable and used to skip steps often on our EVT models. Now that we have the DVT units, we should verify that the motors are accurate enough for us to safely re-enable stall detection.

On top of that, how do we feel about adding a robot feature flag to disable & enable this feature for testing purposes?

Changes:

  • using new speeds and accelerations and new run current for Z/A from testing (data can be found here)
  • making sure stall check is disabled during tip pick up as stalling is expected during force pickup
  • add a new feature flag to allow stall detection to be disabled

Test Plan

In order to merge this PR, we need to put the changes in this PR on DVT several units (ideally, as many as we can) and make sure we can run a protocol or two without triggering any stall detection error.

  • Run on all DVT robots in 528
  • DVT robots in 520

@ahiuchingau ahiuchingau requested a review from a team as a code owner March 28, 2023 22:33
@codecov
Copy link

codecov bot commented Mar 28, 2023

Codecov Report

Merging #12377 (ec1a315) into edge (acbf638) will increase coverage by 0.28%.
The diff coverage is 82.97%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #12377      +/-   ##
==========================================
+ Coverage   73.13%   73.42%   +0.28%     
==========================================
  Files        1510     2291     +781     
  Lines       49516    62901   +13385     
  Branches     3025     6792    +3767     
==========================================
+ Hits        36215    46184    +9969     
- Misses      12838    15104    +2266     
- Partials      463     1613    +1150     
Flag Coverage Δ
g-code-testing 96.44% <ø> (ø)
hardware 58.80% <82.97%> (+0.18%) ⬆️
notify-server 89.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
api/src/opentrons/config/advanced_settings.py 94.21% <ø> (ø)
api/src/opentrons/config/feature_flags.py 86.66% <ø> (ø)
...entrons/hardware_control/backends/ot3controller.py 66.21% <ø> (-0.89%) ⬇️
api/src/opentrons/hardware_control/ot3api.py 79.46% <ø> (-0.20%) ⬇️
...rons_hardware/firmware_bindings/messages/fields.py 57.26% <22.22%> (-0.13%) ⬇️
...ons_hardware/hardware_control/move_group_runner.py 92.59% <96.87%> (+2.49%) ⬆️
.../opentrons_hardware/firmware_bindings/constants.py 100.00% <100.00%> (ø)

... and 823 files with indirect coverage changes

@sfoster1
Copy link
Member

I think we shouldn't target this on the internal release if it needs that much testing, unfortunately. Let's put it on edge, though!

And I think in terms of testing, you're right on about how to do it. I think a feature flag is a pretty good idea, although it's sort of getting to the point where we should add mechanical revisions or something to handle this.

@ahiuchingau ahiuchingau changed the base branch from internal-release_0.1.0 to edge March 30, 2023 20:16
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.

Got some minor feedback things but overall looks good as long as the hardware works now

api/src/opentrons/config/advanced_settings.py Outdated Show resolved Hide resolved
@@ -76,16 +76,16 @@
DEFAULT_MAX_SPEEDS: Final[ByGantryLoad[Dict[OT3AxisKind, float]]] = ByGantryLoad(
high_throughput={
OT3AxisKind.X: 500,
OT3AxisKind.Y: 500,
OT3AxisKind.Y: 375,
Copy link
Member

Choose a reason for hiding this comment

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

imo this should be a separate PR

@@ -35,3 +35,7 @@ def rear_panel_integration() -> bool:
"""Whether to enable usb connected rear_panel for the OT-3."""

return advs.get_setting_with_env_overload("rearPanelIntegration")


def disable_stall_detection() -> bool:
Copy link
Member

Choose a reason for hiding this comment

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

kinda sounds like a verb-phrase, can we call this like stall_detection_disabled()

Copy link
Member

Choose a reason for hiding this comment

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

or even stall_detection_enabled() and return not get_setting...("disableStallDetection")

@ahiuchingau ahiuchingau force-pushed the api_enable-stall-detection branch from e187d0a to ef52fac Compare April 19, 2023 18:31
@ahiuchingau ahiuchingau force-pushed the api_enable-stall-detection branch from cf818be to 838de1e Compare April 27, 2023 20:15
@ahiuchingau ahiuchingau force-pushed the api_enable-stall-detection branch from dc3a78e to 412e531 Compare May 1, 2023 22:20
@nusrat813 nusrat813 self-requested a review May 3, 2023 21:11
Copy link

@nusrat813 nusrat813 left a comment

Choose a reason for hiding this comment

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

Tested, LGTM

@skowalski08 skowalski08 self-requested a review May 10, 2023 16:31
Copy link
Contributor

@skowalski08 skowalski08 left a comment

Choose a reason for hiding this comment

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

tested 5/9. LGTM

@ahiuchingau ahiuchingau requested a review from a team as a code owner May 22, 2023 15:31
@ahiuchingau ahiuchingau merged commit 86b3298 into edge May 22, 2023
@ahiuchingau ahiuchingau deleted the api_enable-stall-detection branch May 22, 2023 17:08
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.

4 participants