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

Interprete PointCloud2 messages of Kinect

asked 2012-03-28 09:46:14 -0500

Poseidonius gravatar image

updated 2016-10-24 09:00:38 -0500

ngrennan gravatar image

Hi everyone,

how do I get the distance values out of the PointCloud2 message produced by a Kinect sensor efficiently? At the moment I use a loop iterating all points and writing the z-value to a file.

Thanks for your help


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-03-28 11:35:12 -0500

Mac gravatar image

Take a look at the pcl_ros tutorials; this will get you a PCL point cloud, rather than a ROS PointCloud2; the PCL version comes with all kinds of useful gadgetry.

edit flag offensive delete link more

answered 2012-03-28 13:42:27 -0500

f_r gravatar image

If you only need the depth values, just subscribe to /camera/depth_registered/image_rect_raw which gives you depth values in mm.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2012-03-28 09:46:14 -0500

Seen: 1,054 times

Last updated: Mar 28 '12