mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
Fixed assert "((int)path.size() < = maxGraphDepth*2+1)" when Mem/ReduceGraph=On
This commit is contained in:
@@ -2894,11 +2894,10 @@ std::map<int, std::map<int, Transform> > Rtabmap::getPaths(std::map<int, Transfo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
UASSERT_MSG(path.size(), uFormat("nearestId=%d ids=%d", nearestId, (int)ids.size()).c_str());
|
UASSERT_MSG(path.size(), uFormat("nearestId=%d ids=%d", nearestId, (int)ids.size()).c_str());
|
||||||
if(maxGraphDepth > 0)
|
if(maxGraphDepth > 0 && !_memory->isGraphReduced() && (int)path.size() > maxGraphDepth*2+1)
|
||||||
{
|
{
|
||||||
UASSERT_MSG((int)path.size() <= maxGraphDepth*2+1,
|
UWARN("%s=Off but path(%d) > maxGraphDepth(%d)*2+1, nearestId=%d ids=%d. Is reduce graph activated before?",
|
||||||
uFormat("nearestId=%d path=%d ids=%d maxGraphDepth=%d",
|
Parameters::kMemReduceGraph().c_str(), (int)path.size(), maxGraphDepth, nearestId, (int)ids.size());
|
||||||
nearestId, (int)path.size(), (int)ids.size(), maxGraphDepth).c_str());
|
|
||||||
}
|
}
|
||||||
paths.insert(std::make_pair(nearestId, path));
|
paths.insert(std::make_pair(nearestId, path));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user