You could add the parameter "Mem/LocalizationDataSaved" to "true"
here. You would have to start in localization mode (see at 3:00 in the
video to enable it) and set "Rtabmap/StartNewMapOnLoopClosure" to "true"
here even for localization mode.
If you only want to save the poses without image data, set also "Mem/BinDataKept" to false
here.