ransac computeModel() issue

asked 2020-09-16 00:42:38 -0500

scarlet191101 gravatar image

updated 2020-09-16 01:02:58 -0500

I have a issue about ransac.computeModel() function.

I am coding NDT_mapping with ground_detection using RANSAC.

My NDT_mapping works successfully,

however it cause mapping problem while I use RANSAC library with NDT_mapping.

I find that the problem is caused by ransac.computeModel() function.

pcl::SampleConsensusModelPlane<pcl::PointXYZI>::Ptr model_p(new pcl::SampleConsensusModelPlane<pcl::PointXYZI> (cloud_ptr));
pcl::RandomSampleConsensus<pcl::PointXYZI> ransac(model_p);
ransac.setDistanceThreshold(0.01);
//ransac.computeModel();      //issue
ransac.getInliers(inliers);
pcl::PointCloud<pcl::PointXYZI>::Ptr final(new pcl::PointCloud<pcl::PointXYZI>);
//final->resize(inliers.size());
pcl::copyPointCloud(*cloud_ptr, inliers, *final);

I using ubuntu 18.04/melodic

edit retag flag offensive close merge delete