mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
OdomF2M: fixed complexity null for first scan is not having normals already
This commit is contained in:
@@ -1271,9 +1271,17 @@ Transform OdometryF2M::computeTransform(
|
|||||||
Parameters::parse(parameters_, Parameters::kIcpPointToPlaneMinComplexity(), minComplexity);
|
Parameters::parse(parameters_, Parameters::kIcpPointToPlaneMinComplexity(), minComplexity);
|
||||||
if(p2n && minComplexity>0.0f)
|
if(p2n && minComplexity>0.0f)
|
||||||
{
|
{
|
||||||
complexity = util3d::computeNormalsComplexity(*mapCloudNormals, Transform::getIdentity(), lastFrame_->sensorData().laserScanRaw().is2d());
|
if(lastFrame_->sensorData().laserScanRaw().hasNormals())
|
||||||
if(complexity > minComplexity)
|
|
||||||
{
|
{
|
||||||
|
complexity = util3d::computeNormalsComplexity(*mapCloudNormals, Transform::getIdentity(), lastFrame_->sensorData().laserScanRaw().is2d());
|
||||||
|
if(complexity > minComplexity)
|
||||||
|
{
|
||||||
|
frameValid = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UWARN("Input raw scan doesn't have normals, complexity check on first frame is not done.");
|
||||||
frameValid = true;
|
frameValid = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user