Skip to content

Commit 5a21e8d

Browse files
Catch all TF errors
1 parent 81bd532 commit 5a21e8d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

kf_hungarian_tracker/kf_hungarian_tracker/kf_hungarian_node.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import colorsys
1111
from kf_hungarian_tracker.obstacle_class import ObstacleClass
1212

13-
from tf2_ros import LookupException
1413
from tf2_ros.buffer import Buffer
1514
from tf2_ros.transform_listener import TransformListener
1615
from tf2_geometry_msgs import do_transform_point, do_transform_vector3
@@ -112,8 +111,10 @@ def callback(self, msg):
112111
s.vector = detections[i].size
113112
detections[i].size = do_transform_vector3(s, trans).vector
114113

115-
except LookupException:
116-
self.get_logger().info('fail to get tf from {} to {}'.format(msg.header.frame_id, self.global_frame))
114+
except Exception as ex:
115+
self.get_logger().error(
116+
'fail to get tf from {} to {}: {}'.format(
117+
msg.header.frame_id, self.global_frame, ex))
117118
return
118119

119120
# hungarian matching

0 commit comments

Comments
 (0)