From 229ff1cc4b253737e74060eb2547b9ce7da3d235 Mon Sep 17 00:00:00 2001 From: Pascal Schade Date: Wed, 25 Sep 2024 17:09:39 +0200 Subject: [PATCH] wait until axis is finished referencing --- field_friend/hardware/axis_D1.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/field_friend/hardware/axis_D1.py b/field_friend/hardware/axis_D1.py index 3cd391cb..b2988d15 100644 --- a/field_friend/hardware/axis_D1.py +++ b/field_friend/hardware/axis_D1.py @@ -111,6 +111,8 @@ async def try_reference(self) -> bool: # due to some timing issues, the homing command is sent twice await self.robot_brain.send(f'{self.name}_motor.home()') await self.robot_brain.send(f'{self.name}_motor.home()') + while not self.is_referenced: + await rosys.sleep(0.1) return self.is_referenced async def speed_Mode(self, speed: int):