Issues with synchronization & rviz visualization

asked 2021-07-12 02:56:38 -0500

Ifx13 gravatar image

updated 2022-02-13 16:43:35 -0500

lucasw gravatar image

Hello everyone,

Thanks for taking the time to check my issue. Let me describe the problem. I am recording a bag carrying 2 topics. [1] a topic with point cloud messages and at the same time I record [2] a topic which is storing custom messages containing timestamps of video frames and the directory to the videos' paths.

After that there is a subscriber/publisher node that iterates through the topics inside the bag and by using cv_bridge the following thing happens. The point cloud is getting republished as is and an image topic is being published by the frames of the videos with their corresponding timestamps from the [2] topic.

So far I thought that when I publish the data they are going to be approximately in sync but when I view them in rviz it seems that the images are much faster, up to a few seconds ahead of the lidar data.

My first thought is that this is happening because of the difference in publishing rate. I throttled the data to have almost the same publishing rate but this did not change anything.

Another thing I tried is to edit the timestamp of the image data setting by subtracting from it 10 seconds but it did not make any difference in the visualization and making me wonder how is the data visualized in rviz if not based on their timestamps? Is there a change for the data to be in sync but the rviz visualizing paradigm to create the difference between them ?

Any ideas are always welcome!

edit retag flag offensive close merge delete


rviz is mostly showing most recent data and not trying to synchronize all the visuals- try out the experimental checkbox in the lower right corner and the exact and approximate time syncing options.

lucasw gravatar image lucasw  ( 2022-02-13 16:47:28 -0500 )edit