From 14e16cc6e8268a7adae1ff2d8c3db47390a4ec6f Mon Sep 17 00:00:00 2001 From: Bill Finger Date: Thu, 22 May 2025 17:23:30 +0300 Subject: [PATCH] remove wait_until_stopped method --- utils.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/utils.py b/utils.py index dd9815c..ff29e67 100644 --- a/utils.py +++ b/utils.py @@ -103,24 +103,6 @@ class RobotClient: # 4. Выполняем линейное перемещение self.move_line(joint_target) - self.wait_until_stopped() - - def wait_until_stopped(self, timeout=10.0, poll_interval=0.2): - start = time.time() - last_status = None - while time.time() - start < timeout: - try: - status = self.get_robot_state() - if status != last_status: - print(f"DEBUG: Robot status changed to {status}") - last_status = status - if status == RobotStatus.Stopped: - print("DEBUG: Robot is stopped.") - return - except Exception as e: - print(f"DEBUG: Failed to get robot status: {e}") - time.sleep(poll_interval) - raise TimeoutError("Timeout: Robot did not reach 'Stopped' status within timeout") def add_waypoint(self, joint_radian: list): cmd = {"command": "add_waypoint", "joint_radian": joint_radian}