ros2 bag recording in the same host have timing issues

asked 2021-10-05 08:19:59 -0500

fayyaz gravatar image

updated 2021-10-05 08:24:44 -0500

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 :

edit retag flag offensive close merge delete


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?

shonigmann gravatar image shonigmann  ( 2021-10-06 13:19:51 -0500 )edit

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>"

fayyaz gravatar image fayyaz  ( 2021-10-12 02:31:15 -0500 )edit

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.

shonigmann gravatar image shonigmann  ( 2021-10-12 10:50:34 -0500 )edit