Skip to content

Commit

Permalink
Merge branch 'main' into amessing/configs
Browse files Browse the repository at this point in the history
  • Loading branch information
amessing-bdai authored Dec 6, 2023
2 parents 15b0402 + 9ce3898 commit 14dc14d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bdai_ros2_wrappers/bdai_ros2_wrappers/tf_listener_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from tf2_ros.buffer import Buffer
from tf2_ros.transform_listener import TransformListener

import bdai_ros2_wrappers.scope as scope
from bdai_ros2_wrappers.futures import wait_for_future


Expand Down Expand Up @@ -70,7 +69,9 @@ def __init__(self, node: Optional[Node] = None, cache_time_s: Optional[float] =
node: optional node for transform listening, defaults to the current scope node.
cache_time_s: optional transform buffer size, in seconds.
"""
node = node or scope.node()
import bdai_ros2_wrappers.scope # locally to avoid circular import

node = node or bdai_ros2_wrappers.scope.node()
if node is None:
raise ValueError("no ROS 2 node available (did you use bdai_ros2_wrapper.process.main?)")
self._node = node
Expand Down

0 comments on commit 14dc14d

Please sign in to comment.