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

Revision history [back]

click to hide/show revision 1
initial version

Thanks for your reply, I tried to solve the problem using the following approach, but, my code didn't work as expected, could you help me?

for (size_t i = 0; i < filteredCloud1->points.size(); i++) { //Radial search for estimating neighborhood indices pcl::KdTreeFLANN<pointt> kdtree; kdtree.setInputCloud (filteredCloud1); pcl::PointXYZRGBA searchPoint = filteredCloud1->points[i]; float radius = 0.03; std::vector<int> pointIdxRadiusSearch; std::vector<float> pointRadiusSquaredDistance; kdtree.radiusSearch (searchPoint, radius, pointIdxRadiusSearch, pointRadiusSquaredDistance);

 //Compute normal of a single point 
     float curvature; 
     Eigen::Vector4f plane_parameters; 
     computePointNormal(filteredCloud1,pointIdxRadiusSearch,plane_parameters,curvature); 


  }

I keep getting the following error: http://imgur.com/fO5CQKN

Thanks for your reply, I tried to solve the problem using the following approach, but, my code didn't work as expected, could you help me?

for (size_t i = 0; i < filteredCloud1->points.size(); i++) 
      { 
    {
     //Radial search for estimating neighborhood indices 
         pcl::KdTreeFLANN<pointt> pcl::KdTreeFLANN<PointT> kdtree; 
      kdtree.setInputCloud (filteredCloud1); 
      pcl::PointXYZRGBA searchPoint = filteredCloud1->points[i]; 
      float radius = 0.03; 
      std::vector<int> pointIdxRadiusSearch; 
      std::vector<float> pointRadiusSquaredDistance; 
      kdtree.radiusSearch (searchPoint, radius, pointIdxRadiusSearch, pointRadiusSquaredDistance); 

 //Compute normal of a single point 
     float curvature; 
     Eigen::Vector4f plane_parameters; 
     computePointNormal(filteredCloud1,pointIdxRadiusSearch,plane_parameters,curvature); 


  }

I keep getting the following error: http://imgur.com/fO5CQKN