Interpretation of PointCloud2 Datatype

asked 2015-05-29 07:06:25 -0500

hannjaminbutton gravatar image

updated 2015-05-29 07:38:26 -0500

Hey,

I'm working with PointCloud2 but actually I have some problems understanding the reprsentation. I'm aware of this link, and I understand the variables header, width, height, point_step, row_step, is_bigendian and is_dense. But I have some problems with PointField[] fields and uint8[] data.

The docu says that fields describes the channels and their layout. But what kind of channels?

And data holds the actual point data? So how can I get the x,y and z coordinates of all the points stored in the PointCloud?

Thanks in advance :)

edit retag flag offensive close merge delete

Comments

First, tell me that which package are you using to publish the pointcloud2 message from your camera, then perhaps it can be extended from there.

Raman gravatar image Raman  ( 2015-05-29 08:15:20 -0500 )edit

Actually I have a Laserscanner and convert the sensor_msgs::LaserScan into sensor_msgs::PointCloud2, so I think that my PointCloud is unordered.

hannjaminbutton gravatar image hannjaminbutton  ( 2015-05-29 08:33:34 -0500 )edit

do you have an openni device like kinect or asus pro. then you can try working with point clouds in a better way. otherwise i beleive that you'll need to configure the laser_geometry package

Raman gravatar image Raman  ( 2015-05-29 10:38:11 -0500 )edit

No, I have no openni device. So there is no other way to get the x, y and z cooridnates?

hannjaminbutton gravatar image hannjaminbutton  ( 2015-06-01 09:47:59 -0500 )edit