From 7aa62f789c2b918ca0b1c2553118723b99dbac34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=B8=D0=B8=D0=BB=20=D0=93=D1=80=D0=B0?= =?UTF-8?q?=D0=B1=D0=B0=D1=80=D1=8C?= Date: Sun, 8 Nov 2026 17:45:10 +1000 Subject: [PATCH] fix(experement): harden scene sync, cap grasp yaw and startup sequencing --- src/iiwa_experement/iiwa_experement/operations.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/iiwa_experement/iiwa_experement/operations.py b/src/iiwa_experement/iiwa_experement/operations.py index ce30949..b11c947 100644 --- a/src/iiwa_experement/iiwa_experement/operations.py +++ b/src/iiwa_experement/iiwa_experement/operations.py @@ -333,6 +333,15 @@ class ReferenceOperations: self.bridge.assert_synchronized(*self.bridge.expected_sets()) except Exception as error: raise OperationError(f'planning scene is not synchronized: {error}') from error + # The relay to /planning_scene is asynchronous for the MoveItPy + # monitor. Give it a short, bounded window before planning. + if self.node is None: + return + import time + + end = time.monotonic() + 0.5 + while time.monotonic() < end: + rclpy.spin_once(self.node, timeout_sec=0.05) def _expect_latest(self, timeout: float = 2.0) -> dict[str, Any]: import time