OT-2 (legacy): fix _current_channel_position, and add move_channel_to - #1238
Closed
miikee wants to merge 1 commit into
Closed
OT-2 (legacy): fix _current_channel_position, and add move_channel_to#1238miikee wants to merge 1 commit into
miikee wants to merge 1 commit into
Conversation
_current_channel_position called ot_api.lh.save_position, which ot_api does not define, so every caller raised: move_channel_x, move_channel_y and move_channel_z could not work at all. It now enqueues savePosition itself and polls the command the way ot_api's own command wrapper does. The poll awaits rather than sleeping, so a robot that never answers does not hold the event loop for the whole 30s budget. With the read working, move_channel_to moves a channel to an absolute position and holds whichever axes are left out. Chaining the per-axis calls was the only way to reach an arbitrary point before, and each of those descends separately, so a three-axis move could clip labware between the steps. This lifts to the traversal height and travels once. get_channel_position exposes the read. Not verified on an OT-2. The savePosition command and its response shape are the same ones a Flex uses, where they are hardware verified.
miikee
force-pushed
the
u6-ot2-position
branch
from
September 3, 2026 14:25
0ab64d1 to
c6d356b
Compare
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
_current_channel_positioncallsot_api.lh.save_position, whichot_apidoes not define. Every caller therefore raises, so
move_channel_x,move_channel_yandmove_channel_zon the OT-2 backend cannot work at alltoday: they always fail with
RuntimeError: Failed to query current pipette position.It now enqueues
savePositionitself and polls the command the wayot_api'sown command wrapper does. The poll awaits rather than sleeping, so a robot that
never answers does not hold the event loop for the whole 30s budget.
With the read working,
move_channel_tomoves a channel to an absoluteposition and holds whichever axes are left out. Chaining the per-axis calls was
the only way to reach an arbitrary point before, and each of those descends
separately, so a three-axis move could clip labware between the steps. This
lifts to the traversal height and travels once.
get_channel_positionexposesthe read.
Not verified on an OT-2. I do not have one. The
savePositioncommand andits response shape are the same ones a Flex uses, where they are hardware
verified, and the new tests fake the robot at its command queue so they pin the
params a real robot would receive.
Known gap I did not want to fold in silently:
move_channel_x/y/zstillduplicate the same three lines rather than delegating to
move_channel_to.Delegating would change what those three do on the wire (a coordinated move
instead of a single-axis one), which is a behaviour change I would rather
propose separately than smuggle into a fix. Happy to do it here if you would
prefer.
Draft, and independent of my PreciseFlex PRs. A second OT-2 PR follows this
one, bounding every request and taking it off the event loop.