From 717741770f3286f6ac284e5a52b468a380e6f601 Mon Sep 17 00:00:00 2001 From: Daisuke Sato Date: Tue, 8 Oct 2024 15:39:03 -0400 Subject: [PATCH] bugfix: check loop can fail with exception Signed-off-by: Daisuke Sato --- cabot_ui/cabot_ui/navigation.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cabot_ui/cabot_ui/navigation.py b/cabot_ui/cabot_ui/navigation.py index 01992288..7385f4db 100644 --- a/cabot_ui/cabot_ui/navigation.py +++ b/cabot_ui/cabot_ui/navigation.py @@ -194,7 +194,7 @@ def unblock(future): if not future.done(): if not event.wait(1.0): # Timed out. remove_pending_request() to free resources - self.remove_pending_request(future) + self.lookup_transform_service.remove_pending_request(future) raise RuntimeError("timeout") if future.exception() is not None: raise future.exception() @@ -281,6 +281,8 @@ def current_ros_pose(self, frame=None): return ros_pose except RuntimeError: self._logger.debug("cannot get current_ros_pose") + except: + self._logger.debug(traceback.format_exc()) raise RuntimeError("no transformation") def current_local_pose(self, frame=None) -> geoutil.Pose: @@ -298,6 +300,8 @@ def current_local_pose(self, frame=None) -> geoutil.Pose: return current_pose except RuntimeError: self._logger.debug("cannot get current_local_pose") + except: + self._logger.debug(traceback.format_exc()) raise RuntimeError("no transformation") def current_local_odom_pose(self):