Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in eigenvalues classifying points #119

Merged
merged 1 commit into from
Jan 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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