Skip to content

Commit

Permalink
Let's support z-coordinates in offsets.
Browse files Browse the repository at this point in the history
  • Loading branch information
SyntaxColoring committed Dec 18, 2023
1 parent 435fb46 commit 308c637
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class MoveToAddressableAreaParams(PipetteIdMixin, MovementMixin):
description=(
"If `true`, the pipette will retract to its highest possible height"
" and stay there instead of descending to the destination."
" `minimumZHeight` and the z-coordinate of `offset` will be ignored."
" `minimumZHeight` will be ignored."
),
)

Expand Down
12 changes: 8 additions & 4 deletions api/src/opentrons/protocol_engine/state/motion.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,19 @@ def get_movement_waypoints_to_addressable_area(
addressable_area_name
)
)
destination = base_destination + Point(x=offset.x, y=offset.y, z=offset.z)
if stay_at_max_travel_z:
destination = Point(
destination.x,
destination.y,
base_destination_at_max_z = Point(
base_destination.x,
base_destination.y,
# FIX BEFORE MERGE: Explain this hack.
# Possibly related: https://github.com/Opentrons/opentrons/pull/6882#discussion_r514248062
max_travel_z - _STAY_AT_MAX_TRAVEL_Z_MARGIN,
)
destination = base_destination_at_max_z + Point(
offset.x, offset.y, offset.z
)
else:
destination = base_destination + Point(offset.x, offset.y, offset.z)

# TODO(jbl 11-28-2023) This may need to change for partial tip configurations on a 96
destination_cp = CriticalPoint.XY_CENTER
Expand Down

0 comments on commit 308c637

Please sign in to comment.