ofxKinect (included in of v0.9.8) on Raspberry Pi 3b (Jessie, arm6)

I’m trying to run ofxKinect on Raspberry Pi 3b with Jessie. I’ve tried so many different ways that I found on of forum, OF github issues, and many places on the web, but anything has worked for me yet.

I did everything below:

  • installed libusb and freenect
  • run sudo cp libs/libfreenect/platform/linux/udev/51-kinect.rules /etc/udev/rules.d
  • installed dependencies such as git-core cmake freeglut3-dev pkg-config build-essential libxmu-dev libxi-dev libusb-1.0-0-dev… (The list of dependencies from this post)
  • I disabled #define BUILD_AUDIO following a suggestion on the forum, but it didn’t help.

Freenect examples (freenect-glview, freenect-cppview, and more) are running without any problem and they show me depth image with rgb image, but when I run a kinect example, I’m not getting any data from my Kinect. The program I’m running is kinectExample which is originally a part of the OSX version of OF v0.9.8. I remade the file as a ARM6 version using Project Generator from my mac because ARM6 version of OF v0.9.8 doesn’t include an ofKinect example.

ofxKinect seems to find the device once I run the app, but then gives me these errors:

[verbose] ofxKinect: 1 device found
[verbose] ofxKinect:     id: 0 serial: A00365A11245052A
send_cmd: Input control transfer failed (18)
freenect_fetch_reg_info: send_cmd read 18 bytes (expected 118)
send_cmd: Output control transfer failed (-1)
freenect_fetch_reg_const_shift: send_cmd read -1 bytes (expected 8)
freenect_camera_init(): Failed to fetch const shift for device
[ error ] ofxKinect: could not open device 0
[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

After this, the app tries to connect to the device four more times, but they all fail.

Even more weird part is that the app sometimes runs properly, like once out of 30 times. It’s usually after trying 5 times to connect to my Kinect. I’m not sure what is the consequences. I feel like the app is likely to connect to the Kinect when I move the cursor a lot over the app as soon as I start the app? It might be totally my illusion. When the app is running well, I can perfectly see the depth image with 60 fps.

Is there anyone who has succeeded running ofxKinect on the same/similar environment? Any ideas what I could try? Should I use an old version of OF? If so, which version?

I’d really appreciate your help.

Hey @yeseul
I’d rather try a newer version than an older one.
use the latest nightly build for armv6 it is in http://openframeworks.cc/download/ you have to scroll down to almost the end of the page to find the nightly builds.
As far as I can remember I had no problems with it on the same setup as yours.
Let me know how it goes.

1 Like

Thank you @roymacdonald for the answer! I installed of_v20170714_linuxarmv6l_nightly.tar.gz and ran the kinect example, but I’m still getting the same errors.

Do you remember if you did any other things other than installing libusb and copying the rules file as instructed in the readme.md after installing OF? Did you install freenect? If so, did you use apt-get install or install by cloning the github repo? Did you install Open NI or anything else?

Thank you!

mmm that’s bad. I don’t remember exactly and don’t have a raspi at hand to test. I might updated libfreenect. I think that ofxKinect uses it’s own version of libfreenect so if you either install or update the regular libfrenect version it will have no effect on ofxKinect. I used the nightly version not the github version. Theres no need to use openNI. openNI works on top of libfreenect and ofxKinect doesnt use it.
OF has some scripts for updating the libraries of addons.
let me check if I modified those in order to make the whole thing work. I’ll let you know.

1 Like

Cool, that would be really helpful. Thanks!!

I checked what I have at hand and I couldnt figure out much. sorry.

1 Like

I´ve also tryed all steps below and is not working.

i also had all those problems today with rPi 3 and oF 0.10.0, they were solved by downloading the last libfreenect from github and then overwriting the include, src and platform folders in ofxKinect/libs/libfreenect with the newest ones (don’t forget to copy the dev rules from the platform folder, as usual)

Thanks ! this actually still the best solution ! worked perfect ! :sunglasses:

the fix has been merged in the latest openFrameworks release =)

1 Like