mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
DBReader: set calibrated true when only scans in db. RegIcp: added intensity matching option when complexity is low. OdomF2M: accept first key frame on low complexity if a guess is provided. DbViewer: added gravity visualization in 3D view.
This commit is contained in:
@@ -200,6 +200,18 @@ bool DBReader::init(
|
||||
{
|
||||
_calibrated = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Signature * s = _dbDriver->loadSignature(*_ids.begin());
|
||||
_dbDriver->loadNodeData(s);
|
||||
if( s->sensorData().imageCompressed().empty() &&
|
||||
s->getWords().empty() &&
|
||||
!s->sensorData().laserScanCompressed().empty())
|
||||
{
|
||||
_calibrated = true; // only scans
|
||||
}
|
||||
delete s;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1209,11 +1209,18 @@ Transform RegistrationIcp::computeTransformationImpl(
|
||||
UWARN("libpointmatcher icp...temporary maxDist=%s (%s=%f, %s=%f)", params["maxDist"].c_str(), Parameters::kIcpMaxCorrespondenceDistance().c_str(), _maxCorrespondenceDistance, Parameters::kIcpVoxelSize().c_str(), _voxelSize);
|
||||
params["knn"] = uNumber2Str(_libpointmatcherKnn);
|
||||
params["epsilon"] = uNumber2Str(_libpointmatcherEpsilon);
|
||||
if(_libpointmatcherIntensity)
|
||||
{
|
||||
icpTmp.matcher.reset(new KDTreeMatcherIntensity<float>(params));
|
||||
}
|
||||
else
|
||||
{
|
||||
#if POINTMATCHER_VERSION_INT >= 10300
|
||||
icpTmp.matcher = PM::get().MatcherRegistrar.create("KDTreeMatcher", params);
|
||||
icpTmp.matcher = PM::get().MatcherRegistrar.create("KDTreeMatcher", params);
|
||||
#else
|
||||
icpTmp.matcher.reset(PM::get().MatcherRegistrar.create("KDTreeMatcher", params));
|
||||
icpTmp.matcher.reset(PM::get().MatcherRegistrar.create("KDTreeMatcher", params));
|
||||
#endif
|
||||
}
|
||||
|
||||
#if POINTMATCHER_VERSION_INT >= 10300
|
||||
icpTmp.errorMinimizer = PM::get().ErrorMinimizerRegistrar.create("PointToPointErrorMinimizer");
|
||||
|
||||
@@ -1322,6 +1322,16 @@ Transform OdometryF2M::computeTransform(
|
||||
{
|
||||
frameValid = true;
|
||||
}
|
||||
else if(!guess.isNull() && !guess.isIdentity())
|
||||
{
|
||||
UWARN("Scan complexity too low (%f) to init robustly the first "
|
||||
"keyframe. Make sure the lidar is seeing enough "
|
||||
"geometry in all axes for good initialization. "
|
||||
"Accepting as an initial guess (%s) is provided.",
|
||||
complexity,
|
||||
guess.prettyPrint().c_str());
|
||||
frameValid = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user