PCL removing outliers using radius as condition
Hi I'm using a radius filter to remove outliers from my pointcloud, however the code hangs while creating the filtering object. The code never gotten to the point of outputting the message "cloud after filtering".
std::cerr << "Cloud before statistical filtering: " << std::endl;
std::cerr << PCL1_temp_cloud << std::endl;
// Create the filtering object
pcl::RadiusOutlierRemoval<pcl::pointxyz> outrem;
outrem.setInputCloud(PCL1_temp_cloud);
outrem.setRadiusSearch(0.8);
outrem.setMinNeighborsInRadius (2);
outrem.filter (PCL1_cloud_filtered);
std::cerr << "Cloud after filtering: " << std::endl; // code stops before this point
std::cerr << PCL1_cloud_filtered << std::endl;
pcl::toROSMsg (PCL1_cloud_filtered, output);