mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
CCCorelib: updated wrong output check. Updated RGBD/MaxOdomCacheSize approach to work properly with Rtabmap/CreateIntermediateNodes=true.
This commit is contained in:
@@ -1579,7 +1579,7 @@ bool Rtabmap::process(
|
|||||||
}
|
}
|
||||||
// Localization mode stuff
|
// Localization mode stuff
|
||||||
_lastLocalizationPose = newPose; // keep in cache the latest corrected pose
|
_lastLocalizationPose = newPose; // keep in cache the latest corrected pose
|
||||||
if(!_memory->isIncremental())
|
if(!_memory->isIncremental() && signature->getWeight() >= 0)
|
||||||
{
|
{
|
||||||
UDEBUG("Update odometry localization cache (size=%d/%d)", (int)_odomCachePoses.size(), _maxOdomCacheSize);
|
UDEBUG("Update odometry localization cache (size=%d/%d)", (int)_odomCachePoses.size(), _maxOdomCacheSize);
|
||||||
if(!_odomCachePoses.empty())
|
if(!_odomCachePoses.empty())
|
||||||
|
|||||||
@@ -137,15 +137,14 @@ rtabmap::Transform icpCC(
|
|||||||
icpTransformation.setNull();
|
icpTransformation.setNull();
|
||||||
return icpTransformation;
|
return icpTransformation;
|
||||||
}
|
}
|
||||||
else if(finalPointCount < 50)
|
else if(!transform.R.isValid())
|
||||||
{
|
{
|
||||||
std::string msg = uFormat("CCCoreLib has failed: Rejecting transform as finalPointCount %d < 50 ", finalPointCount);
|
std::string msg = uFormat("CCCoreLib has failed: Rotation matrix is invalid");
|
||||||
UDEBUG(msg.c_str());
|
UDEBUG(msg.c_str());
|
||||||
if(errorMsg)
|
if(errorMsg)
|
||||||
{
|
{
|
||||||
*errorMsg = msg;
|
*errorMsg = msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
icpTransformation.setNull();
|
icpTransformation.setNull();
|
||||||
return icpTransformation;
|
return icpTransformation;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user