From bd12333a51a2567664896756e92b222fbf41e8e5 Mon Sep 17 00:00:00 2001 From: Alise Au <20424172+ahiuchingau@users.noreply.github.com> Date: Fri, 8 Mar 2024 13:24:07 -0500 Subject: [PATCH] fix(api): raise error if fast home is stalling (#14609) Closes RQA-2312 We previously swallowed collision errors during fast home move and proceeded to slow home because we used to not handle encoder overflow properly and would mistakenly raise. Now that we have fixed those encoder issues, we should actually raise the error when the motor stalls. --- api/src/opentrons/hardware_control/ot3api.py | 22 ++++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/api/src/opentrons/hardware_control/ot3api.py b/api/src/opentrons/hardware_control/ot3api.py index 4099728f64a..cf76723c20c 100644 --- a/api/src/opentrons/hardware_control/ot3api.py +++ b/api/src/opentrons/hardware_control/ot3api.py @@ -33,9 +33,6 @@ pipette_load_name_conversions as pipette_load_name, ) from opentrons_shared_data.robot.dev_types import RobotType -from opentrons_shared_data.errors.exceptions import ( - StallOrCollisionDetectedError, -) from opentrons import types as top_types from opentrons.config import robot_configs @@ -1531,19 +1528,12 @@ async def _home_axis(self, axis: Axis) -> None: axis_home_dist = 20.0 if origin[axis] - target_pos[axis] > axis_home_dist: target_pos[axis] += axis_home_dist - try: - await self._backend.move( - origin, - target_pos, - speed=400, - stop_condition=HWStopCondition.none, - ) - except StallOrCollisionDetectedError: - self._log.warning( - f"Stall on {axis} during fast home, encoder may have missed an overflow" - ) - await self.refresh_positions(acquire_lock=False) - + await self._backend.move( + origin, + target_pos, + speed=400, + stop_condition=HWStopCondition.none, + ) await self._backend.home([axis], self.gantry_load) else: # both stepper and encoder positions are invalid, must home