Fixed occupancy grid not reconstructed if it was not saved in previous run

This commit is contained in:
matlabbe
2018-04-30 13:06:25 -04:00
parent a92748167d
commit 6c10d9fecf
3 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -495,7 +495,7 @@ std::map<int, rtabmap::Transform> MapsManager::updateMapCaches(
"save them back in the database for next sessions. This warning is only shown once.",
data.id(), Parameters::kRGBDCreateOccupancyGrid().c_str());
}
if(memory && occupancySavedInDB)
if(memory && occupancySavedInDB && generateGrid)
{
// if we are here, it is because we loaded a database with old nodes not having occupancy grid set
// try reload again