You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In humble, after setting use_sim_time and running a bag in a loop via ros2 bag play -l --clock 10 <bag>
I get the Warning: TF_OLD_DATA ignoring data from the past for frame tilt at time ... error message. This does not occur when using rclcpp and only rclpy. I have verified that in the source code for buffer.py the logic for detecting clock jumps is missing, but is in the source for buffer.cpp. Minimum code to reproduce is as follows:
#!/usr/bin/env python3
import rclpy
from rclpy.node import Node
from rclpy.qos import qos_profile_sensor_data
from sensor_msgs.msg import PointCloud2
from tf2_ros import TransformException
from tf2_ros.buffer import Buffer
from tf2_ros.transform_listener import TransformListener
class TestNode(Node):
def __init__(self):
super().__init__("test_node")
# Subscribe to /points
self.get_logger().info("Subscribing to PointCloud2 topic...")
self.subscription = self.create_subscription(
PointCloud2,
"/points",
self.callback_main,
qos_profile_sensor_data,
)
self.tf_buffer = Buffer()
self.tf_listener = TransformListener(self.tf_buffer, self)
def callback_main(self, pc_msg):
self.get_logger().info(f"time = {self.get_clock().now()}")
def main(args=None):
# Init client library
rclpy.init(args=args)
# Create the pub/sub
test_node = TestNode()
# Spinning...
try:
rclpy.spin(
test_node,
)
except KeyboardInterrupt:
pass
return 0
And I ran this simply by ros2 run test test_node --ros-args -p use_sim_time:=true
The text was updated successfully, but these errors were encountered:
In
humble
, after settinguse_sim_time
and running a bag in a loop viaros2 bag play -l --clock 10 <bag>
I get the
Warning: TF_OLD_DATA ignoring data from the past for frame tilt at time ...
error message. This does not occur when usingrclcpp
and onlyrclpy
. I have verified that in the source code forbuffer.py
the logic for detecting clock jumps is missing, but is in the source forbuffer.cpp
. Minimum code to reproduce is as follows:And I ran this simply by
ros2 run test test_node --ros-args -p use_sim_time:=true
The text was updated successfully, but these errors were encountered: