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

What's the meaning of sensor_msgs/PointCloud2

asked 2016-08-04 21:45:58 -0500

iROS gravatar image

Recently, I'm using VLP-16 to get point cloud data. But I am really confused about the structure of sensor_msgs/PointCloud2. I used the commend $ rostopic echo /velodyne_points to check the data. I have known that 32 numbers are used to describe a point. But how to transform these numbers to x, y, z coordinate of the points ? Thanks.

For example: 164, 129, 148, 191, 79, 29, 4, 191, 114, 146, 181, 188, 1, 0, 0, 0, 0, 0, 128, 63, 7, 0, 0, 0, 70, 88, 8, 112, 61, 127, 0, 0, 163, 248, 106, 191, 20, 9, 209, 190, 228, 208, 137, 62, 1, 0, 0, 0, 0, 0, 0, 64, 15, 0, 0, 0, 70, 88, 8, 112, 61, 127, 0, 0, 226, 211, 151, 191, 178, 208, 6, 191, 65, 147, 185, 60, 1, 0, 0, 0, 0, 0, 176, 66, 8, 0, 0, 0, 70, 88, 8, 112, 61, 127, 0, 0,

edit retag flag offensive close merge delete

Comments

I am facing the same problem, could you tell me how that structure works? Thanks!

z1huo gravatar image z1huo  ( 2018-08-18 11:57:38 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-08-08 02:07:51 -0500

tfoote gravatar image

updated 2016-08-08 13:11:36 -0500

The PointCloud2 message is defined here: http://docs.ros.org/api/sensor_msgs/h...

For interacting with PointClouds it's common to use the PCL datatype: http://wiki.ros.org/pcl_ros You can subscribe and publish directly as a PCL datatype using pcl_ros/point_cloud.h

There are also a couple of iterators defined in sensor_msgs to allow access to the PointCloud2 message without the added dependency on pcl: http://docs.ros.org/api/sensor_msgs/h...

edit flag offensive delete link more

Comments

Thanks a lot. And I have solved this problem now.

iROS gravatar image iROS  ( 2016-08-10 19:33:19 -0500 )edit

Please click the checkmark buttom at left to indicate your question is solved.

tfoote gravatar image tfoote  ( 2016-08-11 13:01:18 -0500 )edit

Can you please tell me what solution did you use??

MohamedEhab gravatar image MohamedEhab  ( 2019-04-16 05:29:35 -0500 )edit

Question Tools

4 followers

Stats

Asked: 2016-08-04 21:43:20 -0500

Seen: 8,304 times

Last updated: Aug 08 '16