Raspberry pi 2 + kinect


#1

hello,
i want to run a kinect example in of but the kinect sensor dont init.

armv7l
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk±3.0
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): screenRect: 1920x1080
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): windowRect: 1024x768
[notice ] ofAppEGLWindow: createSurface(): setting up EGL Display
[notice ] ofAppEGLWindow: createSurface(): EGL Display correctly set
[notice ] ofAppEGLWindow: createSurface(): current renderer type: GL
[notice ] ofAppEGLWindow: createSurface(): default renderer detected
[notice ] ofAppEGLWindow: createSurface(): surface created correctly
[notice ] ofAppEGLWindow: createSurface(): API bound correctly
[notice ] ofAppEGLWindow: createSurface(): -----EGL-----
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION_MAJOR = 1
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION_MINOR = 4
[notice ] ofAppEGLWindow: createSurface(): EGL_CLIENT_APIS = OpenGL_ES OpenVG
[notice ] ofAppEGLWindow: createSurface(): EGL_VENDOR = Broadcom
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION = 1.4
[notice ] ofAppEGLWindow: createSurface(): EGL_EXTENSIONS = EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_vg_parent_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_lock_surface
[notice ] ofAppEGLWindow: createSurface(): GL_RENDERER = VideoCore IV HW
[notice ] ofAppEGLWindow: createSurface(): GL_VERSION = OpenGL ES-CM 1.1
[notice ] ofAppEGLWindow: createSurface(): GL_VENDOR = Broadcom
[notice ] ofAppEGLWindow: createSurface(): -------------
[notice ] ofAppEGLWindow: setupPeripherals(): peripheral setup complete
[notice ] ofAppEGLWindow: setupNativeUDev(): created udev object
[notice ] ofAppEGLWindow: setupMouse(): unabled to find mouse
[ error ] ofAppEGLWindow: setupMouse(): did not open mouse
[ error ] ofAppEGLWindow: setupMouse(): did not open mouse, mouse_fd < 0
[notice ] ofAppEGLWindow: setupKeyboard(): keyboard_fd= 5 devicePath=/dev/input/by-path/platform-3f980000.usb-usb-0:1.5.2:1.0-event-kbd
[notice ] ofAppEGLWindow: setupKeyboard(): keyboard device name = Apple, Inc Apple Keyboard
[notice ] ofAppEGLWindow: setupPeripherals(): native event setup complete
[notice ] ofAppEGLWindow: setupOpenGL(): peripheral setup complete
[notice ] ofAppEGLWindow: runAppViaInfiniteLoop(): entering infinite loop
[verbose] ofxKinect: context inited
[verbose] ofxKinect: 1 device found
Failed to open camera subdevice or it is not disabled.Failed to open motor subddevice or it is not disabled.Failed to open audio subdevice or it is not disabled.[ error ] ofxKinect: could not open device -1
[notice ] ofAppEGLWindow: runAppViaInfiniteLoop(): setting up notifications complete
[verbose] ofThread: - name: Thread 1 - External thread waiting for ofThread mutex to be unlocked
[verbose] ofThread: - name: Thread 1 - External thread locked the ofThread mutex.
[verbose] ofThread: - name: Thread 1 - External thread unlocked the ofThread mutex.
[verbose] ofThread: - name: Thread 1 - External thread waiting for ofThread mutex to be unlocked
[verbose] ofThread: - name: Thread 1 - External thread locked the ofThread mutex.

any person run this example on RPI 2?

pd: i use this to install OF

change opencv library

compile and run with this:
export MAKEFLAGS=-j4 PLATFORM_VARIANT=rpi2
make
make run


Raspberry Pi 2 Setup Guide (0.8.4)
#2

What version of the kinect are you using? Does it work if you run the example on OSX or Linux Desktop?


#3

kinect model 1414

the same code work fine in OSX


#4

I have had some success with the kinect360 (is that model 1414?) on my Rpi2.
Are you running the kinect example that comes with the addon?
Have you tried running with sudo?


#5

in of_v0.8.4_linuxarmv7l_release dont have a kinect example, i copy this from of_v0.8.4_osx_release.
i dont have try running this with sudo.
as you would?


#6

if i try to running with sudo, have this error in the console

pi@raspberrypi ~/of_v0.8.4_linuxarmv7l_release/examples/addons/kinectExample $ sudo make
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk±3.0 glesv1_cm glesv2 egl
…/…/…/libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk:260: *** couldn’t find some pkg-config packages, did you run the latest install_dependencies.sh?. Stop.

but if only use make, compilling fine.
is wierd u.u


#7

Could you try one of my tests and see if that works for you? (you can ignore the PWM part)
you can find a zip here:
https://drive.google.com/file/d/0B27_4JL_xnCqY0M0Smc2T2w0YVU/view?usp=sharing

don’t forget to replace the ofxKinect addon with the one you find in the zip (backup the old one!),
I think I may have made some modifications to it a while ago to get it to work on the RPI2 (but I forgot to document).

Also read the readme of the addon It tells you to copy a rules file to /etc/udev/rules.d so you don’t need to run with sudo


#8

thanks gepatto!
but i have the same problem.
i try to compile your proyect, this is the out of the console:
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): screenRect: 1920x1080
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): windowRect: 1280x720
[notice ] ofAppEGLWindow: createSurface(): setting up EGL Display
[notice ] ofAppEGLWindow: createSurface(): EGL Display correctly set
[notice ] ofAppEGLWindow: createSurface(): current renderer type: GL
[notice ] ofAppEGLWindow: createSurface(): default renderer detected
[notice ] ofAppEGLWindow: createSurface(): surface created correctly
[notice ] ofAppEGLWindow: createSurface(): API bound correctly
[notice ] ofAppEGLWindow: createSurface(): -----EGL-----
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION_MAJOR = 1
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION_MINOR = 4
[notice ] ofAppEGLWindow: createSurface(): EGL_CLIENT_APIS = OpenGL_ES OpenVG
[notice ] ofAppEGLWindow: createSurface(): EGL_VENDOR = Broadcom
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION = 1.4
[notice ] ofAppEGLWindow: createSurface(): EGL_EXTENSIONS = EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_vg_parent_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_lock_surface
[notice ] ofAppEGLWindow: createSurface(): GL_RENDERER = VideoCore IV HW
[notice ] ofAppEGLWindow: createSurface(): GL_VERSION = OpenGL ES-CM 1.1
[notice ] ofAppEGLWindow: createSurface(): GL_VENDOR = Broadcom
[notice ] ofAppEGLWindow: createSurface(): -------------
[notice ] ofAppEGLWindow: setupPeripherals(): peripheral setup complete
[notice ] ofAppEGLWindow: setupNativeUDev(): created udev object
[notice ] ofAppEGLWindow: setupMouse(): unabled to find mouse
[ error ] ofAppEGLWindow: setupMouse(): did not open mouse
[ error ] ofAppEGLWindow: setupMouse(): did not open mouse, mouse_fd < 0
[notice ] ofAppEGLWindow: setupKeyboard(): keyboard_fd= 5 devicePath=/dev/input/by-path/platform-3f980000.usb-usb-0:1.5.2:1.0-event-kbd
[notice ] ofAppEGLWindow: setupKeyboard(): keyboard device name = Apple, Inc Apple Keyboard
[notice ] ofAppEGLWindow: setupPeripherals(): native event setup complete
[notice ] ofAppEGLWindow: setupOpenGL(): peripheral setup complete
[notice ] ofAppEGLWindow: runAppViaInfiniteLoop(): entering infinite loop
Failed to open camera subdevice or it is not disabled.Failed to open motor subddevice or it is not disabled.Failed to open audio subdevice or it is not disabled.[ error ] ofxKinect: could not open device -1
grayImageWidth 640
[notice ] ofAppEGLWindow: runAppViaInfiniteLoop(): setting up notifications complete
[warning] ofxKinect: update(): device -1 isn’t delivering data, reconnecting tries: 1
Failed to open camera subdevice or it is not disabled.Failed to open motor subddevice or it is not disabled.Failed to open audio subdevice or it is not disabled.[ error ] ofxKinect: could not open device -1
[warning] ofxKinect: update(): device -1 isn’t delivering data, reconnecting tries: 2
Failed to open camera subdevice or it is not disabled.Failed to open motor subddevice or it is not disabled.Failed to open audio subdevice or it is not disabled.[ error ] ofxKinect: could not open device -1
[warning] ofxKinect: update(): device -1 isn’t delivering data, reconnecting tries: 3
Failed to open camera subdevice or it is not disabled.Failed to open motor subddevice or it is not disabled.Failed to open audio subdevice or it is not disabled.[ error ] ofxKinect: could not open device -1
[warning] ofxKinect: update(): device -1 isn’t delivering data, reconnecting tries: 4
Failed to open camera subdevice or it is not disabled.Failed to open motor subddevice or it is not disabled.Failed to open audio subdevice or it is not disabled.[ error ] ofxKinect: could not open device -1
[warning] ofxKinect: update(): device -1 isn’t delivering data, reconnecting tries: 5
Failed to open camera subdevice or it is not disabled.Failed to open motor subddevice or it is not disabled.Failed to open audio subdevice or it is not disabled.[ error ] ofxKinect: could not open device -1


#9

Looks like it’s not seeing the Kinect at all…
Can you run

lsusb

and see if you can spot your kinect? (something like)

Bus 001 Device 012: ID 045e:02ad Microsoft Corp. Xbox NUI Audio
Bus 001 Device 010: ID 045e:02b0 Microsoft Corp. Xbox NUI Motor
Bus 001 Device 013: ID 045e:02ae Microsoft Corp. Xbox NUI Camera

[edit]
Oh wait, I see that your first example Did find the kinect, but my test doesn’t


#10

Thanks for your help and interesting for this!!!

this is the out of the console when i run lsusb

Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 001 Device 005: ID 0951:1666 Kingston Technology
Bus 001 Device 007: ID 05ac:1006 Apple, Inc. Hub in Aluminum Keyboard
Bus 001 Device 009: ID 045e:02ad Microsoft Corp. Xbox NUI Audio
Bus 001 Device 006: ID 045e:02b0 Microsoft Corp. Xbox NUI Motor
Bus 001 Device 010: ID 045e:02ae Microsoft Corp. Xbox NUI Camera
Bus 001 Device 008: ID 05ac:0221 Apple, Inc. Aluminum Keyboard (ISO)


#11

Ok so it does find the kinect,
This may sound strange but have you tried a different USB port or connect without your usb-hub.
And try with the original ofxKinect-addon again.


#12

i try almost everything, format and reinstall everything from zero but I still get the same error, I am using optimal voltage and amperage (5V, 2A - 5A), the SD card is Class 4, it can affect?


#13

I never use class-4, only class-10

But I really don’t know if that could be the cause.
I have tried my kinect ( also a 1414) on 2 sd-cards that have of-0.8.4 on them and they both work with my test.

So I’m not sure what is going on unfortunately.


#14

i try everything. and i have de same problem, change the sd card, change the power supplies.
I do not know what is happening u.u


#15

my kinect not init in raspberry pi 2, someone knows something ? I’m desperate :c


#16

A few things to try:

  • It doesn’t seem clear whether you’ve confirmed that the RPI is able to see the Kinect device – Have you confirmed that the device is visible with lsusb?
  • If you can see the device, have you confirmed that another piece of software can connect to the kinect? If it can’t then it’s likely a hardware problem.
  • Have you tried using a different USB plug? Are you plugging in directly to the RPI?

Other ideas …

  • Have you tried to use the latest version of OF?
  • Have you tried changing the gpu / cpu memory distribution?

#17

I try everything of this, but dont work anyway. I’ll try to get a new camera to test kinect.
thanks for your help!


#18

hello
i test a two new kinect cameras (1414 model) and have the same problem.

[verbose] ofxKinect: context inited
[verbose] ofxKinect: 1 device found
Failed to open camera subdevice or it is not disabled.Failed to open motor subddevice or it is not disabled.Failed to open audio subdevice or it is not disabled.[ error ] ofxKinect: could not open device -1

u.u


#19

I am having similar mentioned issues in this thread with the KinectExample.

I didnt use the PG to compile the kinectExample in 0.9.0, but copied the OS X kinectExample over to RPi2 since the make files are compiled.

No errors during compiling. Something in detecting Kinect. I have used the libfreenect Python wrappers without any issues, so this isn’t a hardware issue ( for me).

EDIT:
had tried all suggestions from @bakercp & @gepatto

EDIT #2
on Rasbian Jessie Nov 2015 release


#20

I have upgraded to of 0.9.0 and raspbian jessie (clean install).
And it worked straight away for me with my xbox kinect model 1414
So I think it must somehow be related to the kinect device or the power-supply.
for me lsusb returns these vendor an product ids

Bus 001 Device 014: ID 045e:02ae Microsoft Corp. Xbox NUI Camera
Bus 001 Device 012: ID 045e:02b0 Microsoft Corp. Xbox NUI Motor
Bus 001 Device 013: ID 045e:02ad Microsoft Corp. Xbox NUI Audio

how about yours?