-
Notifications
You must be signed in to change notification settings - Fork 175
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(hardware): add acceleration to pick up tip for 96 channel #12944
feat(hardware): add acceleration to pick up tip for 96 channel #12944
Conversation
Codecov Report
@@ Coverage Diff @@
## internal-release_0.14.0 #12944 +/- ##
===========================================================
- Coverage 72.53% 65.19% -7.34%
===========================================================
Files 2394 1599 -795
Lines 66062 37028 -29034
Branches 7342 6590 -752
===========================================================
- Hits 47915 24139 -23776
+ Misses 16401 11259 -5142
+ Partials 1746 1630 -116
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
We talked on slack about it, but you need to make sure you're essentially mimicking what ot3_utils::create_move_group
does for the tip action steps. Otherwise you won't be moving the motors correctly.
moves = self._build_moves(gear_origin_dict, gear_target_dict) | ||
blocks = moves[0][0].blocks | ||
|
||
for block in blocks: |
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.
we should pass moves into the backend tip action
15c5190
to
9070819
Compare
5856a53
to
ffa0d23
Compare
ffa0d23
to
6181560
Compare
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.
Initial comments.
class GearMotorPositionResponse(EmptyPayload): | ||
"""Read Gear Motor Position Estimation.""" | ||
|
||
current_position: utils.UInt32Field |
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.
We can still have position flags here imo, it would just be related to boot-up only.
hardware/opentrons_hardware/firmware_bindings/messages/payloads.py
Outdated
Show resolved
Hide resolved
if len(self._expected_tip_action_motors) == 0: | ||
seq_id = message.payload.seq_id.value | ||
self._expected_tip_action_motors[seq_id].remove(gear_id) | ||
print(f"expected tip motors = {self._expected_tip_action_motors}") |
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.
print statement here.
hardware/opentrons_hardware/hardware_control/move_group_runner.py
Outdated
Show resolved
Hide resolved
@@ -563,14 +581,6 @@ async def home( | |||
if runner | |||
] | |||
positions = await asyncio.gather(*coros) | |||
if OT3Axis.Q in checked_axes: |
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.
We should be updating the position here and also why did we remove the tip action from the home command? We need to handle the use-case where a home command is called without any parameters.
e217855
to
79384d0
Compare
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.
Some more comments.
Mainly, it looks like you aren't handling the multiple types of responses you can now get from the 96 channel and there is some general code structure cleanup requests.
You should also make this PR not a draft and add a PR description please once you've finished those requests.
@@ -770,10 +771,10 @@ async def test_home_timeout( | |||
await subject.run(can_messenger=mock_can_messenger) | |||
|
|||
|
|||
async def test_tip_action_move_runner_receives_two_responses( | |||
async def test_tip_action_move_runner_receives_response( |
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.
We are still receiving multiple responses from the tip action request. We should have a test that captures that.
In fact, we should expand on this test to mimic all the varying responses you can get from a tip action (i.e. if it's an acceleration move, then 3 responses for each motor) or if it's a regular home then just two responses.
hardware/opentrons_hardware/hardware_control/move_group_runner.py
Outdated
Show resolved
Hide resolved
|
||
data = [] | ||
|
||
with WaitableCallback(can_messenger, _listener_filter) as reader: |
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.
Bump on this comment.
assert data[0] == data[1] | ||
if not data[0][1] or not data[1][1]: | ||
# If the stepper_ok flag isn't set, that means the node didn't update position. | ||
raise RuntimeError( |
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.
Bump on this comment.
0a0ed2b
to
e80089c
Compare
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.
We should definitely rename the UpdateGearMotorPositionEstimation
command and make sure the implementation of it just pulls the current position.
hardware/opentrons_hardware/firmware_bindings/messages/message_definitions.py
Outdated
Show resolved
Hide resolved
f955057
to
42777ac
Compare
42777ac
to
e201a43
Compare
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.
A couple nitpicks but really solid!
This pr adds acceleration to pick up tip and drop tip moves for the gear motors on the 96 channel pipette. The
ot3api
signature's forpick_up_tip
anddrop_tip
haven't changed, but the hardware controller'stip_action
function will now optionally take in a list of moves. For the purpose of homing the gear motors, the backendtip_action
function can also just take in adistance
andvelocity
.When
pick_up_tip
ordrop_tip
is called, the api function will now:Changelog
ot3controller
andot3utils
for the gear motorsgear_motor_position
property inot3controller
get_system_constraints
so we can grab default acceleration for the Q axisAxis.Q
its own enum value, rather than having it be part ofOTHER
move_group_runner