Rtabmap::triggerNewMap() now does nothing in localization mode to make sure optimized map doesn't get regenerated

This commit is contained in:
matlabbe
2019-03-27 20:48:00 -04:00
parent 81313c32ee
commit 09ced82c9f
2 changed files with 11 additions and 1 deletions

View File

@@ -697,6 +697,13 @@ int Rtabmap::triggerNewMap()
int mapId = -1;
if(_memory)
{
if(!_memory->isIncremental())
{
UWARN("Memory is not incremental (%s=false), ignoring creating a new map as we "
"should be already processing new nodes in a new session.",
Parameters::kMemIncrementalMemory().c_str());
return mapId;
}
std::map<int, int> reducedIds;
mapId = _memory->incrementMapId(&reducedIds);
UINFO("New map triggered, new map = %d", mapId);