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

Interprete PointCloud2 messages of Kinect

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

Poseidonius gravatar image

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

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

Sebastian

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

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

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
0

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

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

Stats

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

Seen: 1,069 times

Last updated: Mar 28 '12