Warning "RtabmapThread.cpp:575::addData() Data buffer is full, the oldest data is removed to add the new one."

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Warning "RtabmapThread.cpp:575::addData() Data buffer is full, the oldest data is removed to add the new one."

jendzi
Hi, I wrote my own camera grabber that constructs rtabmap::SensorData and posts it in rtabmap::CameraEvent. SLAM seems to work fine, pointcloud looks reasonable too.

However I started seeing the error
RtabmapThread.cpp:575::addData() Data buffer is full, the oldest data is removed to add the new one.


Is this concerning? Could it mean that rtabmap cannot process data in time and it start accumulating? If so, should I look into lowering the framerate and resolution?

Thanks,
Jenna
Reply | Threaded
Open this post in threaded view
|

Re: Warning "RtabmapThread.cpp:575::addData() Data buffer is full, the oldest data is removed to add the new one."

matlabbe
Administrator
What frame rate did you set? If you use 1 Hz by default, that warning would show if RTAB-Map cannot process the previous frame under 2 seconds. For example, the thread received at least more 2 frames (2 seconds) while RTAB-Map is still processing the previous one, so the buffered frame is skipped to put the new frame.

If you set frame rate at 10 Hz and RTAB-Map can only process frames at 200-300 ms, then that warning will be shown often.

jendzi wrote
Could it mean that rtabmap cannot process data in time and it start accumulating?
it is not accumulating, it is skipping a frame. The data buffer size is 1 by default. If you don't see that warning often, I would not be too concerned. It may happens that rtabmap needs to reconstruct the incremental vocabulary to make sure it stays balanced, that could make RTAB-Map spiking in processing time, so that warning may happen at that time. If it is the cause, it should not happen often though. You can show the processing time of rtabmap with:
rtabmap-report Timing/Total/ms rtabmap.db
Here an example (the spikes over 1 sec could cause that warning):
Reply | Threaded
Open this post in threaded view
|

Re: Warning "RtabmapThread.cpp:575::addData() Data buffer is full, the oldest data is removed to add the new one."

jendzi
Thanks for the reply.
when I am running rtabmap with realsense depth camera at 30 FPS ( I think its also the default value), I dont see this warning. But once I use two cameras at 30 FPS ( and pass images stitched in SensorData) I start getting the warning very often. Processing time doubles with two cameras I assume? And I need to reduce FPS to 15?

I tried to use the rtabmap-report tool, but get an error that it was built without QT. Is there a way to view timing in the main app? when I open database there I see pointcloud, but "Edit database..." is grayed out. And adding Timing figure in Statistics window shows an empty plot.

Or could you advise what can I print in console to get the timing output?
Reply | Threaded
Open this post in threaded view
|

Re: Warning "RtabmapThread.cpp:575::addData() Data buffer is full, the oldest data is removed to add the new one."

matlabbe
Administrator

Close the database to "un-gray" Edit database, or you can also start rtabmap-databaseViewer directly.

The default frame rate of the camera driver would be as fast as it can. In your case, it could be 30 Hz. If you stictch together the images, make sure the stamp is correctly updated, that could cause also the warning to appear if the stamps are messed up for some reason.