Closed peredwardsson closed 1 year ago
For debugging purpose, by default rtabmap saves all data. You can set Mem/NotLinkedNodesKept
to false to avoid saving data when the robot is not moving.
Other optimization, you can also set Mem/BinDataKept
to false to avoid saving RGB/Depth images to database. However, this reduces the convenience to debug the map afterwards.
These two params are really useful, but is there any way to remove these RGB/Depth data and not linked nodes in post-processing? Like if I built map, then verified in rtabmap-databaseViewer
its quality is acceptable, and now want to delete debug data from .db
file to use it in production.
You can reprocess the database with those parameters set to false:
rtabmap-reprocess --Mem/NotLinkedNodesKept false --Mem/BinDataKept false rtabmap.db output.db
However, the loop closures detected may be not exactly the same, so the resulting map may be slightly different than the one you inspected.
I guess --Mem/NotLinkedNodesKept false
could be always set, even in your original mapping session. For Mem/BinDataKept
, instead of reprocessing, you could delete the data from the database with a sqlite3 query and shrink it afterwards:
sqlite3 rtabmap.db "UPDATE Data SET image = null, depth=null"
sqlite3 rtabmap.db 'VACUUM;'
Rtabmap listens to two cameras at 15fps 720p, which produces a database file which grows with about 2 mb/s. This is even when the robot is stationary and even when no or very few visual words are added at all. At time of writing, robot has been stationary but active for 25 minutes. Rtabmap has accumulated 4 visual words, and the database file weighs in at 3.0 Gb. For parameters,
Is this correct behavior? Is it possible to trim the database? The size makes the databases very cumbersome to move between robots.