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

[sample_consensus] Circle3D: Changed segmentation collinear check precision from float to double. #6175

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pcl::SampleConsensusModelCircle3D<PointT>::isSampleGood (
// Check if the squared norm of the cross-product is non-zero, otherwise
// common_helper_vec, which plays an important role in computeModelCoefficients,
// would likely be ill-formed.
if ((p1 - p0).cross(p1 - p2).squaredNorm() < Eigen::NumTraits<float>::dummy_precision ())
if ((p1 - p0).cross(p1 - p2).squaredNorm() < Eigen::NumTraits<double>::dummy_precision ())
{
PCL_ERROR ("[pcl::SampleConsensusModelCircle3D::isSampleGood] Sample points too similar or collinear!\n");
return (false);
Expand Down Expand Up @@ -102,7 +102,7 @@ pcl::SampleConsensusModelCircle3D<PointT>::computeModelCoefficients (const Indic

// The same check is implemented in isSampleGood, so be sure to look there too
// if you find the need to change something here.
if (common_helper_vec.squaredNorm() < Eigen::NumTraits<float>::dummy_precision ())
if (common_helper_vec.squaredNorm() < Eigen::NumTraits<double>::dummy_precision ())
{
PCL_ERROR ("[pcl::SampleConsensusModelCircle3D::computeModelCoefficients] Sample points too similar or collinear!\n");
return (false);
Expand Down