0
$\begingroup$

Rosanswers logo

Basically I was testing recording data to a rosbag using a timestamp.

I noticed that every time I open and close the file it just rewrites the data, so I just leave the file open when the program starts and close it when it ends. However if I want to write to that same file it just overwrites all of the data.

How can I just append/add onto the same bag file?


Originally posted by newbsaibot on ROS Answers with karma: 1 on 2016-05-19

Post score: 0


Original comments

Comment by sai krishna on 2019-03-14:
I use rosbag to open a new bag file in append mode and it throws an ROSBagException : empty file any inputs how to solve this ?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I don't think the rosbag file format or the API supports appending to a file.

Instead, the rosbag API supports seamlessly opening and reading from multiple bag files, so if I have multiple logging sessions, I record one bag file during each and then open all of them together when I want to analyze the data.


Originally posted by ahendrix with karma: 47576 on 2016-05-19

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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