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

Revision history [back]

click to hide/show revision 1
initial version

Thanks for the answers. OpenCV and casting are good options.

The easiest solution is however to simply subscribe to /camera/depth_registrered/image_raw and then get this float value as: float middlepoint = (float)msg->data[640*480/2] * 0.001f;

This also results in 1/4th of the communication which is useful if doing this over a network.

The reason I got confused is because OpenNI's "raw data" is in millimeters and OpenKinect's raw data is 11-bit values certainly not in millimeters.