0
$\begingroup$

Rosanswers logo

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::RadiusOutlierRemovalpcl::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);


Originally posted by jhlim6 on ROS Answers with karma: 11 on 2016-02-11

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Is this line intended?

 sor.filter (PCL1_cloud_filtered);

It is possibly for statistical outlier removal. If it is not related, you can try removing it.


Originally posted by Akif with karma: 3561 on 2016-02-11

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by jhlim6 on 2016-02-11:
Mistake when pasting the code. Statistical outlier removal works for me. But it doesn't fully remove all the noise.

Comment by Akif on 2016-02-11:
Did you try debugging with something like gdb? Do you have any console output?

Comment by jhlim6 on 2016-02-11:
I used rviz to note that the pointcloud was present prior to filtering. It output the cloud details before filtering, but after that it hangs.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.