ros2 bag recording in the same host have timing issues
I have recorded rosbag in ROS2 and when loading the rosbag I could find that some data packages are delayed. It looks like a 5ms delay after an approximate regular interval. I am publishing the topic every 1ms.
The plot looks good when I am directly subscribing it but once I look at the recorded data, it have this delay.
Attached : https://drive.google.com/drive/folder...
Can you confirm that you are using the foxy-future version of rosbag2? See discussion here
If so, can edit your question to include the command you use to make your rosbag recording?
I am not using foxy-future. I am using the default rosbag installation which came with foxy installation. I recorded using the command "ros2 bag record <topic_names>"
The default version of rosbag2 for foxy is known to have significant performance issues, but they could not be fixed while maintaining ABI/API compatibility with Foxy and previous versions. As a workaround, the fixes were released under
foxy-future
, in ROS Foxy, but have since been made standard in Galactic and onwards. Your problem will likely be fixed by simply switching to the foxy future version. The discussion I linked above has instructions.