Skip to content

Commit

Permalink
Merge pull request laboshinl#119 from jlblancoc/patch-1
Browse files Browse the repository at this point in the history
Fix bug in eigenvalues classifying points
  • Loading branch information
laboshinl authored Jan 25, 2019
2 parents ef1b9b7 + b5b326e commit 25db5dd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib/BasicLaserMapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -684,14 +684,14 @@ void BasicLaserMapping::optimizeTransformTobeMapped()
Vector3 a = Vector3(_laserCloudCornerFromMap->points[pointSearchInd[j]]) - vc;

mat_a(0, 0) += a.x() * a.x();
mat_a(0, 1) += a.x() * a.y();
mat_a(0, 2) += a.x() * a.z();
mat_a(1, 0) += a.x() * a.y();
mat_a(2, 0) += a.x() * a.z();
mat_a(1, 1) += a.y() * a.y();
mat_a(1, 2) += a.y() * a.z();
mat_a(2, 1) += a.y() * a.z();
mat_a(2, 2) += a.z() * a.z();
}
matA1 = mat_a / 5.0;

// This solver only looks at the lower-triangular part of matA1.
Eigen::SelfAdjointEigenSolver<Eigen::Matrix3f> esolver(matA1);
matD1 = esolver.eigenvalues().real();
matV1 = esolver.eigenvectors().real();
Expand Down Expand Up @@ -926,4 +926,4 @@ void BasicLaserMapping::optimizeTransformTobeMapped()
}


} // end namespace loam
} // end namespace loam

0 comments on commit 25db5dd

Please sign in to comment.