Fixed optimized map cleared when optimized graph is smaller than WM (poses should still refer to nodes in WM). Removed warning about max scan points smaller than actual scan (this can happen when assembling scans for proximity detection). Lowering default Icp/PMOutlierRatio to 0.85.

This commit is contained in:
matlabbe
2021-02-12 18:40:40 -05:00
parent 03cfaf2063
commit f871e4359d
3 changed files with 6 additions and 13 deletions

View File

@@ -330,7 +330,7 @@ void LaserScan::init(
}
else if(!is2D && maxPoints_>0 && data_.cols > maxPoints_)
{
UWARN("The number of points (%d) in the scan is over the maximum "
UDEBUG("The number of points (%d) in the scan is over the maximum "
"points (%d) defined by max points setting.",
data_.cols, maxPoints_);
}

View File

@@ -2062,20 +2062,13 @@ std::map<int, Transform> Memory::loadOptimizedPoses(Transform * lastlocalization
bool ok = true;
std::map<int, Transform> poses = _dbDriver->loadOptimizedPoses(lastlocalizationPose);
// Make sure optimized poses match the working directory! Otherwise return nothing.
if(poses.size() == _workingMem.size())
for(std::map<int, Transform>::iterator iter=poses.begin(); iter!=poses.end() && ok; ++iter)
{
for(std::map<int, Transform>::iterator iter=poses.begin(); iter!=poses.end() && ok; ++iter)
if(_workingMem.find(iter->first)==_workingMem.end())
{
if(_workingMem.find(iter->first)==_workingMem.end())
{
ok = false;
}
ok = false;
}
}
else
{
ok = false;
}
if(!ok)
{
UWARN("Optimized poses (%d) and working memory "
@@ -3217,7 +3210,7 @@ Transform Memory::computeIcpTransformMulti(
// scans are in base frame but for 2d scans, set the height so that correspondences matching works
assembledData.setLaserScan(
LaserScan(assembledScan,
fromScan.maxPoints()?fromScan.maxPoints():maxPoints,
maxPoints,
fromScan.rangeMax(),
fromScan.is2d()?Transform(0,0,fromScan.localTransform().z(),0,0,0):Transform::getIdentity()));