If there is a rosbag *.bag.active instead of *.bag, then according to the documentation and some answers in ROS answers, one should do both:

  1. rosbag reindex
  2. rosbag fix

But if the most likely cause was just not closing the recording properly and nothing else is probably wrong with the bag, are those 2 steps really necessary? Is there a simpler way to properly close a bag if there is no other issues?

E.g. large >100GB bags can take a while to reindex. And rosbag fix results in an error, requiring a bag migration rules file (.bmr) which is not present in some ros packages. When reading about rosbag fix and from there, for more explanation, about rosbag migration, it really seems like an unnecessary step for a inexperienced bag fix user.

EDIT: I also tried rosbag fix -n instead but still results in requiring the rules file. Is is correct to just use rosbag fix --force?

Thanks for your help to explain and make it more understandable in a simple case of not closing the recording.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.