-
Notifications
You must be signed in to change notification settings - Fork 178
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(api): add new pick up tip function #15275
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1796,6 +1796,49 @@ async def hold_jaw_width(self, jaw_width_mm: int) -> None: | |
self._gripper_handler.check_ready_for_jaw_move("hold_jaw_width") | ||
await self._hold_jaw_width(jaw_width_mm) | ||
|
||
async def execute_pick_up_tip( | ||
self, | ||
mount: OT3Mount, | ||
presses: Optional[int] = None, | ||
increment: Optional[float] = None, | ||
) -> None: | ||
realmount = OT3Mount.from_mount(mount) | ||
instrument = self._pipette_handler.get_pipette(realmount) | ||
if ( | ||
self.gantry_load == GantryLoad.HIGH_THROUGHPUT | ||
and instrument.nozzle_manager.current_configuration.configuration | ||
== NozzleConfigurationType.FULL | ||
): | ||
spec = self._pipette_handler.plan_ht_pick_up_tip( | ||
instrument.nozzle_manager.current_configuration.tip_count | ||
) | ||
if spec.z_distance_to_tiprack: | ||
await self.move_rel( | ||
realmount, top_types.Point(z=spec.z_distance_to_tiprack) | ||
) | ||
await self._tip_motor_action(realmount, spec.tip_action_moves) | ||
else: | ||
spec = self._pipette_handler.plan_lt_pick_up_tip( | ||
realmount, | ||
instrument.nozzle_manager.current_configuration.tip_count, | ||
presses, | ||
increment, | ||
) | ||
await self._force_pick_up_tip(realmount, spec) | ||
|
||
# neighboring tips tend to get stuck in the space between | ||
# the volume chamber and the drop-tip sleeve on p1000. | ||
# This extra shake ensures those tips are removed | ||
for rel_point, speed in spec.shake_off_moves: | ||
await self.move_rel(realmount, rel_point, speed=speed) | ||
|
||
# fixme: really only need this during labware position check so user | ||
# can verify if a tip is properly attached | ||
if spec.ending_z_retract_distance: | ||
await self.move_rel( | ||
realmount, top_types.Point(z=spec.ending_z_retract_distance) | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we need to do the simulator state update thing that's on line 2159 too, this: if isinstance(self._backend, OT3Simulator):
self._backend._update_tip_state(realmount, True) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we want this? My impression was that we want to leave any kind of state updates to the caller There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This specifically is a hack to get the simulated tip presence sensors returning the right thing - that's why it's checking the backend. You're right in general, but this is an exception |
||
|
||
async def _move_to_plunger_bottom( | ||
self, | ||
mount: OT3Mount, | ||
|
@@ -2160,40 +2203,8 @@ def add_tip_to_instr() -> None: | |
self._backend._update_tip_state(realmount, True) | ||
|
||
await self._move_to_plunger_bottom(realmount, rate=1.0) | ||
if ( | ||
self.gantry_load == GantryLoad.HIGH_THROUGHPUT | ||
and instrument.nozzle_manager.current_configuration.configuration | ||
== NozzleConfigurationType.FULL | ||
): | ||
spec = self._pipette_handler.plan_ht_pick_up_tip( | ||
instrument.nozzle_manager.current_configuration.tip_count | ||
) | ||
if spec.z_distance_to_tiprack: | ||
await self.move_rel( | ||
realmount, top_types.Point(z=spec.z_distance_to_tiprack) | ||
) | ||
await self._tip_motor_action(realmount, spec.tip_action_moves) | ||
else: | ||
spec = self._pipette_handler.plan_lt_pick_up_tip( | ||
realmount, | ||
instrument.nozzle_manager.current_configuration.tip_count, | ||
presses, | ||
increment, | ||
) | ||
await self._force_pick_up_tip(realmount, spec) | ||
|
||
# neighboring tips tend to get stuck in the space between | ||
# the volume chamber and the drop-tip sleeve on p1000. | ||
# This extra shake ensures those tips are removed | ||
for rel_point, speed in spec.shake_off_moves: | ||
await self.move_rel(realmount, rel_point, speed=speed) | ||
|
||
# fixme: really only need this during labware position check so user | ||
# can verify if a tip is properly attached | ||
if spec.ending_z_retract_distance: | ||
await self.move_rel( | ||
realmount, top_types.Point(z=spec.ending_z_retract_distance) | ||
) | ||
await self.execute_pick_up_tip(realmount, presses, increment) | ||
|
||
add_tip_to_instr() | ||
|
||
|
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.
API
class so the two classes can be substituted for each other?pick_up_tip()
?pick_up_tip_bare()
orjust_pick_up_tip()
orpick_up_tip_motions()
or something else?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.
Yeah thats a good point, I'll make another commit with some changes.
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.
pick_up_tip_in_place
? I think at some poitn we're going to want to get it out of this file anywayThere 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.
I wouldn't use
_in_place
because in Protocol Engine,_in_place
is used to roughly mean "do the operation without moving X/Y," whereas here, neither function moves in X/Y, and the difference instead has to do with tip-state and volume-state setting.