Robotics StackExchange | Archived questions

Playback issues with large rosbag files

Hi,

I'm running into issues playing back large rosbag files (> 1GB, they are bags generated of the KITTI dataset using this tool https://github.com/tomas789/kitti2bag for those that are interested).

The overall performance (particularly the tf) performance varies greatly, and is particularly poor the first time the bag is played. I suspect that the bag needs to be loaded into memory / cache for proper behavior.

I am playing the bags using sim time set to true and the clock option for rosbag play (the issues remain with the options off too).

Does anyone have ideas about the causes and fixes/workarounds?

Thanks!

Asked by vkee on 2017-08-02 08:24:27 UTC

Comments

Answers

This is not rosbag functionality but the OS has a Disk cache that makes following calls faster than the first one. See this:

http://answers.ros.org/question/211848/what-makes-rosbag-to-start-playing-fast/

You might be able to preload the file into cache using a tool called vmtouch, See:

https://serverfault.com/questions/406308/tell-the-linux-kernel-to-put-a-file-in-the-disk-cache

https://serverfault.com/questions/43383/caching-preloading-files-on-linux-into-ram

https://hoytech.com/vmtouch/

Asked by Wolf on 2017-08-02 15:46:08 UTC

Comments

Thanks this helped a lot, vmtouch works great and solved my issue!

Asked by vkee on 2017-08-03 04:05:44 UTC