mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
OdomF2M: fixed complexity check on 2d scans (https://github.com/introlab/rtabmap_ros/issues/412)
This commit is contained in:
@@ -1276,7 +1276,7 @@ Transform OdometryF2M::computeTransform(
|
||||
Parameters::parse(parameters_, Parameters::kIcpPointToPlaneMinComplexity(), minComplexity);
|
||||
if(p2n && minComplexity>0.0f)
|
||||
{
|
||||
complexity = util3d::computeNormalsComplexity(*mapCloudNormals);
|
||||
complexity = util3d::computeNormalsComplexity(*mapCloudNormals, Transform::getIdentity(), lastFrame_->sensorData().laserScanRaw().is2d());
|
||||
if(complexity > minComplexity)
|
||||
{
|
||||
frameValid = true;
|
||||
|
||||
@@ -2993,7 +2993,7 @@ float computeNormalsComplexity(
|
||||
int oi = 0;
|
||||
bool doTransform = false;
|
||||
Transform tn;
|
||||
if(!t.isIdentity())
|
||||
if(!t.isIdentity() && !t.isNull())
|
||||
{
|
||||
tn = t.rotation();
|
||||
doTransform = true;
|
||||
|
||||
Reference in New Issue
Block a user