0
$\begingroup$

Rosanswers logo

I'd like to get the raw depth data off of the Kinect on my Turtlebot, using ROS.

What I've been doing is running roslaunch openni_camera openni_node.launch, and then looking at the published /camera/depth/image_raw.

Online research has indicated that the Kinect should spit out 11-bit values. However, it seems this topic spits out something like 14-bit values...

I made a histogram of all the depth values in 183 random depth images I collected with all sorts of varying depths in them, and I found that the array of 16-bit values which come out of the /camera/depth/image_raw topic (actually 8-bit values which I have to put together into 16-bit) range over the values zero and a seemingly logarithmic distribution of exactly 799 values between 342 and 9757 -- exactly 800 values in total.

So I'm confused about whether the values I'm getting are actually the "raw" output from the Kinect (which I want), or if something between me and the Kinect is doing some processing to it that I don't want done. (I'm using it for some very specific scientific mapping applications, and I want to know exactly what is happening to my data.)

What I've found online says that the values should range from 0 to 2^11.

If the data is straight off the Kinect, then it's odd that 2^13 < 9757 < 2^14.

If the data is simply being scaled or something, then I'd think that there'd be somewhere between 2^10 and 2^11 different values, instead of exactly 800.

Can anyone explain to me how to get the real raw data off the Kinect using OpenNI through ROS, or if I'm doing it correctly, can you explain what's going on and why it's not coming out as I would expect?

Thank you so much!

Update: sebsch answered the first part -- No, the OpenNI driver doesn't publish what I want. But it seems the suggested package won't work for my needs either. Still searching for a way to do it.


Originally posted by Yo on ROS Answers with karma: 183 on 2011-10-10

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Data published on /camera/depth/image_raw is the depth in millimeters as a 16 bit unsigned integer.

The openni driver does not publish the original (disparity-like) data as provided by the kinect. You could try one of the other (libfreenect-based) drivers, e.g. this one.


Originally posted by sebsch with karma: 790 on 2011-10-19

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by Yo on 2011-10-31:
[cont.] it), but it turns out that it's not exactly all that correct in its computation either -- it's not just not publishing it. This is where the computation is done: http://bazaar.launchpad.net/~cyphylab/cyphy/bonsai/view/head:/cyphy_kinect/kinect_camera/src/kinect_driver.cpp#L462

Comment by Yo on 2011-10-31:
Thank you for answering the first part of the question! However, it seems that the driver you posted doesn't do what I need either... First, what the wiki says it publishes is incorrect. I started editing the code to get it to give me what I need (since it seemed it just wasn't publishing [cont.]

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.