Ask Your Question
0

Rosbag record dying after bag reaches 4.3GB

asked 2019-02-26 02:15:23 -0500

sk12345 gravatar image

Hello,

I am using an Nvidia TX2 with a set of 3 cameras and a Pixhawk flight controller. I am attempting to record 3x 4k image streams and IMU data from the Pixhawk. The issue I am having is that rosbag record consistently dies at 4.3GB of bag size. It also leaves the bag as "active" when it stops. I have tried this with 4K resolution as well as lower resolutions; the only difference in outcome is that it happens sooner with the 4k imagery (always at 4.3GB).

This is the rosbag command I use.

rosbag record -b 0 -O /media/nvidia/C61C-EBE4/debug.bag /mavros/rc/out /mavros/cam_imu_sync/cam_imu_stamp /mavros/imu/data_raw /mavros/imu/data /camF/camera /camF/camera_info /camRR/camera /camRR/camera_info /camRL/camera /camRL/camera_info __name:=bag_record

This is the error I get.

[ INFO] [1551125050.845895518]: Recording to /media/nvidia/C61C-EBE4/debug.bag.
terminate called after throwing an instance of 'rosbag::BagIOException'
  what():  Error writing to file: writing 24883246 bytes, wrote 9454209 bytes

I have tried to find the answer and came across this: https://answers.ros.org/question/2188... but no answer there. Any ideas on what might be going wrong?

Thanks in advance!

edit retag flag offensive close merge delete

Comments

1

This is just a hunch, but afair something around 4.3GB is the maximum file size on FAT32 formatted drives. Could it be the hard drive you are using is FAT32? If yes, you should format this to another filesystem like ext4...

mgruhler gravatar image mgruhler  ( 2019-02-26 03:00:30 -0500 )edit
1

Judging from the path you are recording to, this seems to be a USB thumdrive or something. They are often FAT32 formatted by default...

Obviously, once the recording crashes, it cannot properly close the file, thus, it is left as active...

mgruhler gravatar image mgruhler  ( 2019-02-26 03:01:14 -0500 )edit

Hi mgruhler, I can't seem to mark your comment as the answer, but that was the problem. Thank you for that! It was solved by not using fat32. I was trying to record straight to a 64GB microSD card.

sk12345 gravatar image sk12345  ( 2019-02-26 03:12:46 -0500 )edit

well, this was just a comment and not an answer. But as this solved your problem I'll make it an answer now :-) Happy it worked out @sk12345

mgruhler gravatar image mgruhler  ( 2019-02-26 04:13:43 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-02-26 04:14:03 -0500

mgruhler gravatar image

This is just a hunch, but afair something around 4.3GB is the maximum file size on FAT32 formatted drives. Could it be the hard drive you are using is FAT32? If yes, you should format this to another filesystem like ext4...

Judging from the path you are recording to, this seems to be a USB thumdrive or something. They are often FAT32 formatted by default...

Obviously, once the recording crashes, it cannot properly close the file, thus, it is left as active...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-02-26 02:15:23 -0500

Seen: 339 times

Last updated: Feb 26 '19