diff --git a/src/pycram/ros/tf_broadcaster.py b/src/pycram/ros/tf_broadcaster.py index 25c6878ed..14a7e635c 100644 --- a/src/pycram/ros/tf_broadcaster.py +++ b/src/pycram/ros/tf_broadcaster.py @@ -25,7 +25,7 @@ def __init__(self, projection_namespace="simulated", odom_frame="odom", interval self.tf_static_publisher = rospy.Publisher("/tf_static", TFMessage, queue_size=10) self.tf_publisher = rospy.Publisher("/tf", TFMessage, queue_size=10) - self.thread = threading.Thread(target=self._publish) + self.thread = threading.Thread(target=self._publish, daemon=True) self.kill_event = threading.Event() self.interval = interval @@ -52,9 +52,11 @@ def _update_objects(self) -> None: """ for obj in self.world.objects: pose = obj.get_pose() + pose.header.stamp = rospy.Time.now() self._publish_pose(obj.tf_frame, pose) for link in obj.links.keys(): link_pose = obj.get_link_pose(link) + link_pose.header.stamp = rospy.Time.now() self._publish_pose(obj.get_link_tf_frame(link), link_pose) def _update_static_odom(self) -> None: