Using PCL with ROS for surface normal estimation

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

ALI gravatar image

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

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

Comments

3

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 imagePeteBlackerThe3rd ( 2019-06-06 07:16:14 -0500 )edit

Thank you so much it solved the problem

ALI gravatar imageALI ( 2019-06-06 07:59:29 -0500 )edit