pcl icon indicating copy to clipboard operation
pcl copied to clipboard

SampleConsensusModelPlane::optimizeModelCoefficients error message unclear.

Open rkeatin3 opened this issue 9 years ago • 2 comments

My Environment

  • Operating System and version: Ubuntu 16.04.1
  • Compiler: GCC 5.4.0
  • PCL Version: 1.7.2

Current Behavior

pcl::SampleConsensusModelPlane::optimizeModelCoefficients prints Not enough inliers found to support a model (3)! Returning the same coefficients. when trying to optimize a plane model with 3 inliers.

Possible Solution

It makes sense to return if inliers.size() < 3 to avoid extra computation (as I assume the PCA approach will have the same plane coefficients as the initial calculation), but maybe the error could be more clear that a valid model was calculated from the inliers but couldn't be further refined.

rkeatin3 avatar Jan 26 '17 20:01 rkeatin3

Is this better?

taketwo avatar Jan 27 '17 10:01 taketwo

I missed this a few days ago, but that looks good to me! I hope that will save someone else a bit of confusion in the future.

rkeatin3 avatar Jan 30 '17 21:01 rkeatin3