0

I am trying to save color and depth frames from the XTION onto the BeagleBone Black (BBB) for further analysis.

I compiled and installed OpenNI2 both for the BBB and for my development computer (MacAir with Kubuntu 14.04). SimpleRead runs correctly on both platforms.

I got my program to run correctly on the MacAir correctly at 30fps. Both the color and depth frames are successfully returned from openni::OpenNI::waitForAnyStream(...)

(I am polling waitForAnyStream inside a producer thread which waits indefinitely for a new frame. Then the frame is copied to a buffer and put into a boost spsc_queue to be analyzed and saved by a consumer thread.)

Then, I ported the program to the BBB using the g++ cross-compiler. When I run on the BBB at 640x480, openni::OpenNI::waitForAnyStream(...) never returns. If I decrease the resolution to 320x240 and change the pixel format for the color stream to openni::PIXEL_FORMAT_YUYV, it returns properly. I can live with the YUYV format but I need to get 640x480 working.

My question is if you have seen this problem before with the OpenNI2 framework? If so, how did you fix it?

Thank you for your time, Ben

PS. I couldn't get the Kinect to be recognized at all on the BBB. When I plug it into the MacAir, the green led lights up and it works correctly. On the BBB, it stays dark and I can't get OpenNI2 to find it. Any thoughts on this?

bensch128
  • 63
  • 10
  • Just some questions that may help find the error. Did you compiled the openni2 with the ARM processor flag? does `openni::OpenNI::waitForAnyStream(...)` returns an error or anything? for the kinect, which drivers did you installed? what I can think is that is not receiving enough power or it doesn't have the correct drivers – api55 Nov 10 '14 at 00:48
  • Hi @api55, I am using the AC adapter for the Kinect so I think it's getting enough power. Just to be sure I also plugged in the BBB's power adapter along with the mini-USB cable to the powered hub (I read this could cause over-current problems...) openni::OpenNI::waitForAnyStream does not return any errors, it never returns!! I am using the libfreenect driver for OpenNI2. Now I'm using the same setup on an ODROID-XU3 and everything works fine. (The ODROID-XU3 is one heck of a powerful SoC) – bensch128 Dec 16 '14 at 19:16

1 Answers1

0

The problem with the Kinect could be that the kinect need more current than the ASUS, so maybe you have to use a HUB and then connect the HUB to the BBB.

And about the ASUS, (I don't know how fast can it process frames) but probably you are trying to make the BBB works faster than it can.

tonytr
  • 146
  • 2
  • 7
  • Thank you for the answer @tonytr . I am now developing with a ODROID-XU3 and `openni::OpenNI::waitForAnyStream(...)` works properly now – bensch128 Dec 16 '14 at 19:20