Skip to content

Commit

Permalink
bugfix: check loop can fail with exception
Browse files Browse the repository at this point in the history
Signed-off-by: Daisuke Sato <[email protected]>
  • Loading branch information
daisukes committed Oct 8, 2024
1 parent 807bb34 commit 7177417
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cabot_ui/cabot_ui/navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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:
Expand All @@ -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):
Expand Down

0 comments on commit 7177417

Please sign in to comment.