0
$\begingroup$

Rosanswers logo

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?

K


Originally posted by kbabu on ROS Answers with karma: 131 on 2011-11-22

Post score: 3

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Ben_S with karma: 2510 on 2011-11-22

This answer was ACCEPTED on the original site

Post score: 3

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.