rosbag reindex problem

asked 2023-05-19 05:24:02 -0500

I had a file that was 12.2GB in size and I wanted to recover it to a .bag file, so I ran rosbag reindex and I got a 12.2GB file. However, the file became 117MB . Then I ran rosbag fix --force xxx.bag, and I got a 116MB .bag file. It seems that some data was lost during the reindex process. I also looked at the generated rosbag with the rosbag info command and found that the data in it was only a few seconds long, but in fact I recorded several minutes data. Why is that? Does anyone have a way to recover the rest of the data, because it's not easy to collect, so I would really appreciate it if there is any way to recover it.

edit retag flag offensive close merge delete


rosbag reindex is not very sophisticated. It's not stupid either, but .bags can corrupt in many different ways, and your .bag might just have a problem rosbag reindex can't fix.

Unfortunately I don't know of any publicly available tools that can do better.

There is/was a company that had (has?) something which can do better, but AFAIK, they never released it. See #q360520.

gvdhoorn gravatar image gvdhoorn  ( 2023-05-21 03:36:46 -0500 )edit