rosbag exits recording abruptly after maximum file size is reached [closed]
I'm running octomap_mapping
on my robot, and also want to record data for post processing. The data mostly includes /tf
messages and /pointCloud2
data. I running my code on a real robot, so I do wireless ssh into the robot and then record the data on my remote machine. In the middle of recording, rosbag exits after recording 167Mb data and prints "Killed" and exit, leaving a .active file.
I have not had this issue before (when I run rosbag on the same computer as running ROS), I was wondering if this is happening because I'm recording data on a remote machine rather than the computer on the robot. Can someone confirm this theory and suggest a solution?
Here's a link to someone else having similar issues: http://ros-users.122217.n3.nabble.com/rosbag-exits-abnormally-td3637291.html
Edit: Here is the actual output from remote machine running rosbag command over ssh. This time it didn't crap out at 167Mb, 13Mb instead. I think 167Mb is not even a significant number as this may be just a chunk of data it was trying to store before it exited.
terminate called after throwing an instance of 'rosbag::BagIOException'
what(): Error writing to file: writing 13571512 bytes, wrote 7480895 bytes
Also, here is the kernel log:
[13694.190638] wlan0: deauthenticating from d8:67:d9:c2:d0:a0 by local choice (reason=3)
[13694.207447] cfg80211: Calling CRDA to update world regulatory domain
[13694.216192] cfg80211: World regulatory domain updated:
[13694.216198] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[13694.216202] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[13694.216205] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[13694.216208] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[13694.216211] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[13694.216213] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[13695.752099] PM: Syncing filesystems ... done.
[13695.982204] PM: Preparing system for mem sleep
[13697.548484] Freezing user space processes ... (elapsed 0.002 seconds) done.
[13697.550530] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[13697.551847] PM: Entering mem sleep
[13697.552000] Suspending console(s) (use no_console_suspend to debug)
[13697.552241] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[13697.552364] sd 0:0:0:0: [sda] Stopping disk
[13698.153598] [drm] Disabling audio 0 support
[13698.548633] PM: suspend of devices complete after 995.697 msecs
[13698.548815] PM: late suspend of devices complete after 0.179 msecs
[13698.564658] pcieport 0000:00:04.0: System wakeup enabled by ACPI
[13698.596559] ehci-pci 0000:00:12.2: System wakeup enabled by ACPI
[13698.612545] ohci-pci 0000:00:12.0: System wakeup enabled by ACPI
[13698.612632] PM: noirq suspend of devices complete after 63.761 msecs
[13698.612680] ACPI: Preparing to enter system sleep state S3
[13698.624727] PM: Saving platform NVS memory
[13698.628027] Disabling non-boot CPUs ...
[13698.628477] Broke affinity for irq 17 ...
Can you explain what you mean by "maximum file size reached" in the question title? Is the robot's disk full?
When I start recording data on my remote machine, rosbag process exits after recording 167Mb of data. There is more than enough space on my remote machine to store up to GBs of data.
Which command-line options are you passing to rosbag? Is there anything in your kernel log (dmesg) indicating that rosbag was killed because the system ran out of memory?
Deafult max size of rosbag is 256MB
use -b option to speciy bag size and try recording
-b
specifies the buffer size, not the maximum bag file size. This is how much memory rosbag will use while recording messages. If the buffer fills up, additional messages will be dropped until some data can be written to disk.I was confused by the same thing. "internal buffer" refers to the internal memory that ROS uses to store data temporarily before dumping it on to the disk.
Sorry, got blocked on hardware, will post results as soon as robot is working again. Thanks
This pops up another question though, what does dropping additional data mean, will ROS not record more data? If so, how can I make sure data is continuously recording (and being stored on disk before filling up internal buffer) and I don't miss any pieces of it?