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): engage axis to enable the motor before attempting to move the axis. #14955

Merged
merged 3 commits into from
Apr 19, 2024

Conversation

vegano1
Copy link
Contributor

@vegano1 vegano1 commented Apr 19, 2024

Overview

There seems to be some issue on the firmware where the motor is enabled but does not seem to get enabled, causing the axis we are attempting to move to throw a finished movement with a condition not met error. The firmware should be enabling the motor, and if we query the motor enable status with get_status_request = 0x01 we get the correct response where the motor is enabled. For whatever reason sending an explicit enable_motor_request = 0x06 before moving the axis fixes the problem.

Closes: RQA-2591

Test Plan

  • Make sure that we can attach/detatch single-channel pipettes
  • Make sure that we can attach/detatch multi-channel pipettes
  • Make sure that we can attach/detatch the 96-channel pipette
  • Make sure that we can attach/detatch the gripper
  • Make sure we can calibrate all instruments without failing on movement not met once the flow is done.

Changelog

  • explicitly enable the motor before attempting to move an axis during home and retract_axis

Review requests

  • Please test this with all the permutations of pipettes attached/detached/etc

Risk assessment

Med, needs testing so we understand all the implications.

ahiuchingau and others added 2 commits April 17, 2024 18:40
There seems to be some issue on the firmware where the motor is enabled but does not seem to actually get enabled, causing the axis we are attempting to move to error with finished movement with condition not met. The firmware should be enabling the motor and if we query the motor enable status with get_status_request = 0x01 we get the correct response where the motor is enabled. For whatever reason sending an explicit enable_motor_request = 0x06 before moving the axis fixes the problem.
@vegano1 vegano1 requested a review from a team as a code owner April 19, 2024 01:35
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.

Okay, glad we can work around it.

@vegano1 vegano1 merged commit 229573f into edge Apr 19, 2024
39 of 40 checks passed
@vegano1 vegano1 deleted the RQA-2591-engage-axis-before-move branch April 19, 2024 20:26
ahiuchingau added a commit that referenced this pull request Apr 22, 2024
…s attached (#14975)

<!--
Thanks for taking the time to open a pull request! Please make sure
you've read the "Opening Pull Requests" section of our Contributing
Guide:


https://github.com/Opentrons/opentrons/blob/edge/CONTRIBUTING.md#opening-pull-requests

To ensure your code is reviewed quickly and thoroughly, please fill out
the sections below to the best of your ability!
-->

# Overview
We now [unconditionally home the
axis](#14955) before
performing the homing move so we can now remove this patch. If we leave
this in, the head R is going to raise an error when the robot boots up
the first time because it will not be able to update the position
estimation.
<!--
Use this section to describe your pull-request at a high level. If the
PR addresses any open issues, please tag the issues here.
-->

# Test Plan

<!--
Use this section to describe the steps that you took to test your Pull
Request.
If you did not perform any testing provide justification why.

OT-3 Developers: You should default to testing on actual physical
hardware.
Once again, if you did not perform testing against hardware, justify
why.

Note: It can be helpful to write a test plan before doing development

Example Test Plan (HTTP API Change)

- Verified that new optional argument `dance-party` causes the robot to
flash its lights, move the pipettes,
then home.
- Verified that when you omit the `dance-party` option the robot homes
normally
- Added protocol that uses `dance-party` argument to G-Code Testing
Suite
- Ran protocol that did not use `dance-party` argument and everything
was successful
- Added unit tests to validate that changes to pydantic model are
correct

-->

# Changelog

<!--
List out the changes to the code in this PR. Please try your best to
categorize your changes and describe what has changed and why.

Example changelog:
- Fixed app crash when trying to calibrate an illegal pipette
- Added state to API to track pipette usage
- Updated API docs to mention only two pipettes are supported

IMPORTANT: MAKE SURE ANY BREAKING CHANGES ARE PROPERLY COMMUNICATED
-->

# Review requests

<!--
Describe any requests for your reviewers here.
-->

# Risk assessment

<!--
Carefully go over your pull request and look at the other parts of the
codebase it may affect. Look for the possibility, even if you think it's
small, that your change may affect some other part of the system - for
instance, changing return tip behavior in protocol may also change the
behavior of labware calibration.

Identify the other parts of the system your codebase may affect, so that
in addition to your own review and testing, other people who may not
have the system internalized as much as you can focus their attention
and testing there.
-->
Carlos-fernandez pushed a commit that referenced this pull request May 20, 2024
…he axis. (#14955)

There seems to be some issue on the firmware where the motor is enabled
but does not seem to get enabled, causing the axis we are attempting to
move to throw a `finished movement with a condition not met` error. The
firmware should be enabling the motor, and if we query the motor enable
status with get_status_request = 0x01 we get the correct response where
the motor is enabled. For whatever reason sending an explicit
enable_motor_request = 0x06 before moving the axis fixes the problem.

---------

Co-authored-by: ahiuchingau <[email protected]>
Carlos-fernandez pushed a commit that referenced this pull request May 20, 2024
…s attached (#14975)

<!--
Thanks for taking the time to open a pull request! Please make sure
you've read the "Opening Pull Requests" section of our Contributing
Guide:


https://github.com/Opentrons/opentrons/blob/edge/CONTRIBUTING.md#opening-pull-requests

To ensure your code is reviewed quickly and thoroughly, please fill out
the sections below to the best of your ability!
-->

# Overview
We now [unconditionally home the
axis](#14955) before
performing the homing move so we can now remove this patch. If we leave
this in, the head R is going to raise an error when the robot boots up
the first time because it will not be able to update the position
estimation.
<!--
Use this section to describe your pull-request at a high level. If the
PR addresses any open issues, please tag the issues here.
-->

# Test Plan

<!--
Use this section to describe the steps that you took to test your Pull
Request.
If you did not perform any testing provide justification why.

OT-3 Developers: You should default to testing on actual physical
hardware.
Once again, if you did not perform testing against hardware, justify
why.

Note: It can be helpful to write a test plan before doing development

Example Test Plan (HTTP API Change)

- Verified that new optional argument `dance-party` causes the robot to
flash its lights, move the pipettes,
then home.
- Verified that when you omit the `dance-party` option the robot homes
normally
- Added protocol that uses `dance-party` argument to G-Code Testing
Suite
- Ran protocol that did not use `dance-party` argument and everything
was successful
- Added unit tests to validate that changes to pydantic model are
correct

-->

# Changelog

<!--
List out the changes to the code in this PR. Please try your best to
categorize your changes and describe what has changed and why.

Example changelog:
- Fixed app crash when trying to calibrate an illegal pipette
- Added state to API to track pipette usage
- Updated API docs to mention only two pipettes are supported

IMPORTANT: MAKE SURE ANY BREAKING CHANGES ARE PROPERLY COMMUNICATED
-->

# Review requests

<!--
Describe any requests for your reviewers here.
-->

# Risk assessment

<!--
Carefully go over your pull request and look at the other parts of the
codebase it may affect. Look for the possibility, even if you think it's
small, that your change may affect some other part of the system - for
instance, changing return tip behavior in protocol may also change the
behavior of labware calibration.

Identify the other parts of the system your codebase may affect, so that
in addition to your own review and testing, other people who may not
have the system internalized as much as you can focus their attention
and testing there.
-->
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.

None yet

3 participants