How to access the depth data in meter (float) from /camera/depth_registrered/image as published by openni_launch
I am using Kinect combined with ROS for accessing depth data.
/camera/depth_registrered/image is supposed to output depth as float in meters (http://www.ros.org/wiki/openni_launch).
When echoing this topic it does not at all looks like floats. But rather like 8-bit integers as defined by http://www.ros.org/doc/api/sensor_msgs/html/msg/Image.html.
How do I access the depth value in meters (as a float). How do I do this casting?
More specifically, can someone write some pseudo code that would go into the callback function for /camera/depth_registrered/image. I would like this code to output the depth in meters (float) for the pixel in the middle (the 640*480/2-th pixel).
Thanks in advance!