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);
|
Parameters::parse(parameters_, Parameters::kIcpPointToPlaneMinComplexity(), minComplexity);
|
||||||
if(p2n && minComplexity>0.0f)
|
if(p2n && minComplexity>0.0f)
|
||||||
{
|
{
|
||||||
complexity = util3d::computeNormalsComplexity(*mapCloudNormals);
|
complexity = util3d::computeNormalsComplexity(*mapCloudNormals, Transform::getIdentity(), lastFrame_->sensorData().laserScanRaw().is2d());
|
||||||
if(complexity > minComplexity)
|
if(complexity > minComplexity)
|
||||||
{
|
{
|
||||||
frameValid = true;
|
frameValid = true;
|
||||||
|
|||||||
@@ -2993,7 +2993,7 @@ float computeNormalsComplexity(
|
|||||||
int oi = 0;
|
int oi = 0;
|
||||||
bool doTransform = false;
|
bool doTransform = false;
|
||||||
Transform tn;
|
Transform tn;
|
||||||
if(!t.isIdentity())
|
if(!t.isIdentity() && !t.isNull())
|
||||||
{
|
{
|
||||||
tn = t.rotation();
|
tn = t.rotation();
|
||||||
doTransform = true;
|
doTransform = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user