Using PCL with ROS for surface normal estimation

asked 2019-06-05 07:21:42 -0600

ALI gravatar image

updated 2019-06-05 10:30:16 -0600

gvdhoorn gravatar image

Hi Guys,

I am trying to use PCL with ROS for normal estimation of point cloud data published from Gazebo. when i am trying to run my code

pcl::NormalEstimation<pcl::PointXYZ, pcl::Normal> ne;
     ne.setInputCloud (cloud);

I got such errors

error: no matching function for call to ‘pcl::NormalEstimation<pcl::PointXYZ, pcl::Normal>::setInputCloud(pcl::PCLPointCloud2*&)’
      ne.setInputCloud (cloud);
edit retag flag offensive close merge delete



You cannot pass a pcl::PointCloud2 directly as the input cloud. It needs to be a pcl::PointCloud<input point type>::Ptr see the example here.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-06-06 07:16:14 -0600 )edit

Thank you so much it solved the problem

ALI gravatar image ALI  ( 2019-06-06 07:59:29 -0600 )edit