Rosanswers logo


what will happen if I rosbag record ROS topics and don't have enough memory to store it? Will rosbag overwrite something or will automatic shutdown command ?

Kind regards

Originally posted by dembele123 on ROS Answers with karma: 13 on 2022-04-26

Post score: 0

Original comments

Comment by gvdhoorn on 2022-04-26:\

Will rosbag overwrite something [..]?

you mean random other files on your file system?

No, that's not what will happen. I know of no program that would do that.

Edit: I've updated the title of your post, as "rosbag question" doesn't really capture what you really want to know -- and is too generic in any case.


1 Answer 1


Rosanswers logo

I think the option --max-splits=MAX_SPLITS solves this problem for you:

Split bag at most MAX_SPLITS times, then begin deleting the oldest files. This creates a fixed size or duration recording.

rosbag record --split --size 1024 --max-splits 3 /chatter for size (in MB)

rosbag record --split --duration 10m --max-splits 6 /chatter for duration (in minutes)

Originally posted by ljaniec with karma: 3064 on 2022-04-26

This answer was ACCEPTED on the original site

Post score: 1


Your Answer

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