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

PointCloud vs. PointCloud2 for unstructured point clouds

asked 2011-11-22 02:27:22 -0500

kbabu gravatar image

Hi, I have an application that publishes an unstructured point cloud, which in turn will be used to update a costmap. I remember reading that PointCloud is going to be retired in future a versions in favor of PointCloud2.

However, a cursory look at PointCloud2 seems as though it needs well-defined height & width fields. How can I represent an unstructured point cloud using PointCloud2?

Can I simply set height to 1 and width to N, and expect the library to treat it as a simple vector of (x,y,z) co-ordinates?


edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2011-11-22 02:36:26 -0500

Ben_S gravatar image

Have a look at the PointCloud2 definition including comments. Your guess is right, you can set height to 1 and width to the number of points in your cloud.

edit flag offensive delete link more

Question Tools


Asked: 2011-11-22 02:27:22 -0500

Seen: 4,745 times

Last updated: Nov 22 '11