mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
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:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user