mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
Recovery: set back database in mapping mode after being saved in localization mode
This commit is contained in:
@@ -133,6 +133,18 @@ bool databaseRecovery(
|
||||
*errorMsg = uFormat("Failed renaming database file from \"%s\" to \"%s\". Is it opened by another app?", UFile::getName(databasePath).c_str(), UFile::getName(backupPath).c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
bool incrementalMemory = true;
|
||||
Parameters::parse(parameters, Parameters::kMemIncrementalMemory(), incrementalMemory);
|
||||
if(!incrementalMemory)
|
||||
{
|
||||
if(progressState)
|
||||
{
|
||||
progressState->callback("Database is in localization mode, setting it to mapping mode to recover...");
|
||||
}
|
||||
uInsert(parameters, ParametersPair(Parameters::kMemIncrementalMemory(), "true"));
|
||||
}
|
||||
|
||||
Rtabmap rtabmap;
|
||||
rtabmap.init(parameters, databasePath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user