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

PCL Normal estimation with PointNormal

asked 2016-06-25 14:19:59 -0500

bhaskarama gravatar image

The NormalEstimation nodelet in pcl_ros produces point clouds whose point type is Normal (i.e., not including xyz). I have code that needs to work with PointNormals, i.e., x, y, z, nx, ny, nz. Now I could just subscribe to both the normal cloud and the original cloud but then I have to worry about time synchronization as well. Is there a simple way of solving this problem that doesn't require duplicating and modifying pcl_ros/normal_3d.cpp?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-09-26 21:43:56 -0500

buckley.toby gravatar image

updated 2017-09-27 17:23:30 -0500

jayess gravatar image

//Concatenate the XYZ and normal fields*

pcl::PointCloud<pcl::PointNormal>::Ptr cloud_with_normals (new pcl::PointCloud<pcl::PointNormal>);
pcl::concatenateFields (*original_XYZ_cloud, *normals, *cloud_with_normals);
edit flag offensive delete link more

Question Tools

Stats

Asked: 2016-06-25 14:19:59 -0500

Seen: 1,874 times

Last updated: Sep 27 '17