Ask to set detection rate to 0 when selecting a source database. DBReader: set 9999 covariance for the first odom pose of a database.

This commit is contained in:
matlabbe
2017-01-29 18:24:10 -05:00
parent e3b3a08f5f
commit 819db9538f
3 changed files with 23 additions and 2 deletions

View File

@@ -323,11 +323,16 @@ SensorData DBReader::getNextData(CameraInfo * info)
{
std::map<int, Link> links;
_dbDriver->loadLinks(*_currentId, links, Link::kNeighbor);
if(links.size())
if(links.size() && links.begin()->first < *_currentId)
{
// assume the first is the backward neighbor, take its variance
infMatrix = links.begin()->second.infMatrix();
}
else
{
// first node, set high variance to make rtabmap trigger a new map
infMatrix /= 9999.0;
}
}
else
{