Skip to content

Commit

Permalink
accumulate pickup distances, fix drop tip
Browse files Browse the repository at this point in the history
  • Loading branch information
caila-marashaj committed Sep 28, 2023
1 parent 28cd067 commit a524623
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -766,14 +766,16 @@ def build_presses() -> Iterator[Tuple[float, float]]:
yield (press_dist, backup_dist)

if instrument.channels == 96:
prep_move_dist = instrument.pick_up_configurations.prep_move_distance
clamp_move_dist = instrument.pick_up_configurations.distance
tip_motor_moves = [
TipMotorPickUpTipSpec(
distance=instrument.pick_up_configurations.prep_move_distance,
distance=prep_move_dist,
speed=instrument.pick_up_configurations.prep_move_speed,
home_buffer=10,
),
TipMotorPickUpTipSpec(
distance=instrument.pick_up_configurations.distance,
distance=prep_move_dist + clamp_move_dist,
speed=instrument.pick_up_configurations.speed,
home_buffer=10,
),
Expand Down
10 changes: 4 additions & 6 deletions api/src/opentrons/hardware_control/ot3api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1907,7 +1907,6 @@ async def _motor_pick_up_tip(
gear_origin_float = axis_convert(self._backend.gear_motor_position, 0.0)[
pipette_axis
]

move_targets = []
for move_segment in pipette_spec:
move_targets.append(
Expand All @@ -1920,7 +1919,6 @@ async def _motor_pick_up_tip(
_, moves = self._move_manager.plan_motion(
origin={Axis.Q: gear_origin_float}, target_list=move_targets
)

await self._backend.tip_action(moves=moves[0])

await self.home_gear_motors()
Expand Down Expand Up @@ -1966,7 +1964,7 @@ async def pick_up_tip(

# fixme: really only need this during labware position check so user
# can verify if a tip is properly attached
await self.move_rel(realmount, top_types.Point(z=spec.retract_target))
await self.move_rel(realmount, spec.tiprack_up)

# TODO: implement tip-detection sequence during pick-up-tip for 96ch,
# but not with DVT pipettes because those can only detect drops
Expand Down Expand Up @@ -2008,7 +2006,6 @@ async def drop_tip(
"""Drop tip at the current location."""
realmount = OT3Mount.from_mount(mount)
spec, _remove = self._pipette_handler.plan_check_drop_tip(realmount, home_after)

for move in spec.drop_moves:
await self._backend.set_active_current(move.current)

Expand All @@ -2027,8 +2024,6 @@ async def drop_tip(
)
await self._backend.tip_action(moves=drop_moves[0])

await self.home_gear_motors()

else:
target_pos = target_position_from_plunger(
realmount, move.target_position, self._current_position
Expand All @@ -2041,6 +2036,9 @@ async def drop_tip(
if move.home_after:
await self._home(move.home_axes)

if any([move.is_ht_tip_action for move in spec.drop_moves]):
await self.home_gear_motors()

for shake in spec.shake_moves:
await self.move_rel(mount, shake[0], speed=shake[1])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,18 +163,18 @@ def dummy_value() -> np.float64:
max_speed=np.float64(0),
blocks=(
Block(
distance=np.float64(20),
initial_speed=np.float64(3),
distance=np.float64(0),
initial_speed=np.float64(0),
acceleration=np.float64(0),
),
Block(
distance=np.float64(20),
initial_speed=np.float64(3),
distance=np.float64(0),
initial_speed=np.float64(0),
acceleration=np.float64(0),
),
Block(
distance=np.float64(20),
initial_speed=np.float64(3),
distance=np.float64(0),
initial_speed=np.float64(0),
acceleration=np.float64(0),
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ def update(
Recursively update the given dictionary to ensure no data is lost when updating.
"""
next_key = next(iter_of_configs, None)
breakpoint()
if next_key and isinstance(dict_to_update[next_key], dict):
dict_to_update[next_key] = update(
dict_to_update.get(next_key, {}), iter_of_configs, value_to_update
Expand All @@ -160,7 +159,6 @@ def build_nozzle_map(
) -> Dict[str, List[float]]:
Y_OFFSET = 9
X_OFFSET = -9
breakpoint()
if channels == PipetteChannelType.SINGLE_CHANNEL:
return {"A1": nozzle_offset}
elif channels == PipetteChannelType.EIGHT_CHANNEL:
Expand Down

0 comments on commit a524623

Please sign in to comment.