ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

PCL removing outliers using radius as condition

asked 2016-02-11 03:43:39 -0500

jhlim6 gravatar image

updated 2016-02-11 06:03:02 -0500

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.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);

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-02-11 05:06:22 -0500

Akif gravatar image

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.

edit flag offensive delete link more


Mistake when pasting the code. Statistical outlier removal works for me. But it doesn't fully remove all the noise.

jhlim6 gravatar image jhlim6  ( 2016-02-11 06:04:42 -0500 )edit

Did you try debugging with something like gdb? Do you have any console output?

Akif gravatar image Akif  ( 2016-02-11 06:13:37 -0500 )edit

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.

jhlim6 gravatar image jhlim6  ( 2016-02-11 06:37:30 -0500 )edit

Question Tools

1 follower


Asked: 2016-02-11 03:43:39 -0500

Seen: 1,253 times

Last updated: Feb 11 '16