Kinect - Would it ever work with a Raspberry Pi?


115 posts   Page 1 of 5   1, 2, 3, 4, 5
by morphy_richards » Mon Apr 02, 2012 11:15 am
Just as an idea:- would this work with a Raspberry Pi?

http://support.xbox.com/en-US/.....d899e1e4d4
User avatar
Posts: 860
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by Chris.Rowland » Mon Apr 02, 2012 11:41 am
I think it is very unlikely.

It's designed to work with Windows 7 and the only way it would even be possible would be if the low level communication between the Kinect box and the Windows PC was hacked and the SDK reverse engineered.

Even then the Pi is almost certainly not powerful enough to run what it needs to.

I suppose a Windows 7 box could be used as a front end for a Pi :-)
Posts: 239
Joined: Thu Jan 12, 2012 5:45 pm
by morphy_richards » Mon Apr 02, 2012 11:54 am
I saw a requirement somewhere that it would need to be connected to a computer with a dual core xxx gHZ processor and xxGB ram (cant seem to find where I saw that requirement now hence all the xxx's. WOnder if that's more a Windows 7 thing rather than the Kinect sensor itself)
User avatar
Posts: 860
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by Ravenous » Mon Apr 02, 2012 11:58 am
There are a few places that seem to use them on Linux.

http://www.showusyoursensors.com/ has a robot called "Maxwell"

There's something called the Open Kinect Project who appear to have C, Python, etc. mentioned on their wiki.

Not been able to find what sort of performance is required though bt I would hope the device itself does at least some of the low-level processing.
Posts: 1527
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK
by scep » Mon Apr 02, 2012 12:17 pm
The Kinect was hacked/reverse engineered on Linux way before the Windows version/official drivers AFAIK. MS went mental at first and then realised that this could be good and recanted :) .There is also an interface available thru Greenfoot, which I suspect will be ported to the RasPi.

No idea the RasPi will be beefy enough though – but IIRC there are uberchips(s) in the Kinect that handle a lot of heavy stuff (hence its popularity in research / academia due to its relatively huge bang for buck), so maybe?

[p.s. All unchecked conjecture, I know nuffin ;) ]

p.p.s The Kinect has been discussed around her quite a bit - too busy to make links but have a search for 'kinect' in "all forums"....
User avatar
Posts: 1063
Joined: Sun Nov 20, 2011 8:53 am
by zardoz99 » Mon Apr 02, 2012 3:22 pm
Well, when I *eventually* receive my R-Pi, I'll let you all know.

I have my Kinect working fine on my Fedora 14 system here and the drivers are libusb based, so extremely portable. It's only the sheer data rates that might be an issue.
Posts: 157
Joined: Fri Jan 13, 2012 2:25 pm
by morphy_richards » Mon Apr 02, 2012 3:31 pm
That"s quite exciting. Do you use it for anything specific or is it more a case of can do so did?
User avatar
Posts: 860
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by tech_monkey » Mon Apr 02, 2012 4:47 pm
You may want to look at OpenKinect.
http://www.casatech.eu
Posts: 130
Joined: Fri Mar 09, 2012 6:12 pm
by morphy_richards » Mon Apr 02, 2012 5:05 pm
Wow Python wrappers and everything!
User avatar
Posts: 860
Joined: Mon Mar 05, 2012 3:26 pm
Location: London
by practisevoodoo » Thu May 10, 2012 1:58 pm
I'm planning on using a kinect with a Rpi as a distance sensor for a robotics project so I don't need all the skeleton tracking stuff which means the OpenKinect library is fine for me.

I can report that the source compiles fine on the Rpi but it only kind of detects the kinect when it is actually plugged into the Rpi. At the moment it certainly can't actually access the kinect. I'll update if I figure out what's wrong.
Posts: 19
Joined: Thu May 10, 2012 12:52 pm
by Alun » Fri May 11, 2012 3:06 pm
I presume you are using the separate Kinect power adapter to eliminate power issues.
Posts: 17
Joined: Tue Jan 10, 2012 10:19 pm
by practisevoodoo » Mon May 14, 2012 9:17 pm
For the moment everything is just plugged into wall (and that means separate kinect power supply) but at the moment debian wont recognise the kinect at all.
Posts: 19
Joined: Thu May 10, 2012 12:52 pm
by fatcinco » Tue May 15, 2012 5:26 am
I was able to get it to read the usb audio/camera/motor on debian with libfreenect. I ran the example apps and it is blinking, changing color and tilting every once in a while. Today is the first time I have played with a kinect so I am not sure what it is supposed to do when it is working (probably should have read up on that first).

I had problems with it only detecting the motor first but that was cleared up by manually building libusb and libusb-compat.

I have the Kinect plugged into a powered usb hub and also plugged directly into the wall.

When I was running the tiltdemo app - the network connection didn't work. Not 100% sure it was related and I will test tomorrow.

Are they normally really loud when they move?


Jan 1 01:01:46 raspberrypi kernel: hub 1-1.2.3:1.0: 3 ports detected
Jan 1 01:01:46 raspberrypi kernel: usb 1-1.2.3.2: new full speed USB device number 8 using dwc_otg
Jan 1 01:01:46 raspberrypi kernel: usb 1-1.2.3.2: New USB device found, idVendor=045e, idProduct=02b0
Jan 1 01:01:46 raspberrypi kernel: usb 1-1.2.3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jan 1 01:01:46 raspberrypi kernel: usb 1-1.2.3.2: Product: Xbox NUI Motor
Jan 1 01:01:46 raspberrypi kernel: usb 1-1.2.3.2: Manufacturer: Microsoft
Jan 1 01:01:46 raspberrypi kernel: usb 1-1.2.3.1: new high speed USB device number 9 using dwc_otg
Jan 1 01:01:46 raspberrypi kernel: usb 1-1.2.3.1: New USB device found, idVendor=045e, idProduct=02ad
Jan 1 01:01:46 raspberrypi kernel: usb 1-1.2.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 1 01:01:46 raspberrypi kernel: usb 1-1.2.3.1: Product: Xbox Kinect Audio, © 2011 Microsoft Corporation. All rights reserved.
Jan 1 01:01:46 raspberrypi kernel: usb 1-1.2.3.1: Manufacturer: Microsoft
Jan 1 01:01:46 raspberrypi kernel: usb 1-1.2.3.1: SerialNumber: B44B
Jan 1 01:01:46 raspberrypi kernel: usb 1-1.2.1: reset low speed USB device number 5 using dwc_otg
Jan 1 01:01:46 raspberrypi kernel: usb 1-1.2.3.3: new high speed USB device number 10 using dwc_otg
Jan 1 01:01:46 raspberrypi kernel: usb 1-1.2.3.3: New USB device found, idVendor=045e, idProduct=02ae
Jan 1 01:01:46 raspberrypi kernel: usb 1-1.2.3.3: New USB device strings: Mfr=2, Product=1, SerialNumber=3
Jan 1 01:01:46 raspberrypi kernel: usb 1-1.2.3.3: Product: Xbox NUI Camera
Jan 1 01:01:46 raspberrypi kernel: usb 1-1.2.3.3: Manufacturer: Microsoft
Jan 1 01:01:46 raspberrypi kernel: usb 1-1.2.3.3: SerialNumber: B00B
Posts: 26
Joined: Tue May 15, 2012 4:50 am
by fatcinco » Tue May 15, 2012 7:09 am
make sure you turn off all the debug notices when building libusb.

Funny post about the same problem: https://github.com/ofTheo/ofxKinect/issues/48
Posts: 26
Joined: Tue May 15, 2012 4:50 am
by benosteen » Tue May 15, 2012 9:04 am
The quickest way to experiment is to use the python bindings for libfreenect - the depth 'image' is really a matrix of 11bit values. There is a means to convert that into a real-world distance (from 0.3 to its limit of 4m) if you have a google around. The biggest limitation is the viewing angle (47° by 56° IIRC) and the conflict between multiple kinects (they project a pattern in IR for depth sensing and overlaid patterns conflict.)

I can recommend numpy for slicing and dicing this data up - makes it easy to do the things you want.

And once you've got the python code doing what you want, it shouldn't be too tricky to write a version in C for speed :)
Posts: 28
Joined: Mon Jan 02, 2012 6:10 am
by patrikg » Tue May 15, 2012 5:34 pm
User avatar
Posts: 66
Joined: Sun Mar 18, 2012 10:19 pm
by practisevoodoo » Thu May 17, 2012 9:17 am
Thanks fatcinco for the libusb info
I'm still unable to get it working under debian though. Do you mind posting the results from running lsusb? All I get is
Bus 001 Device 008: ID 045e:02b0 Microsoft Corp. Xbox NUI Motor
but I'm pretty sure that there should be a Camera and Audio device listed too, at least there is on my other machine
Posts: 19
Joined: Thu May 10, 2012 12:52 pm
by fatcinco » Sun May 20, 2012 10:08 am
I jumped around to installing true crypt but I can test tomorrow. I had problems where only the motor was showing up originally until I rebuild libusb and libusb-compat. I think it is also important that the power is on to the kinect before starting the pi.
Posts: 26
Joined: Tue May 15, 2012 4:50 am
by Spacefish » Sun May 20, 2012 1:49 pm
I think there is a open source driver for the original Kinect Sensor, so one could just port it to arm and use it?
Posts: 4
Joined: Sun May 20, 2012 1:44 pm
by practisevoodoo » Sun May 20, 2012 2:49 pm
That isn't a problem. libfreenect and the drivers compile just fine on arm already. However, some people (including me) can't get the Pi to actually detect the kinect correctly (i.e the NUI camera and audio.
Posts: 19
Joined: Thu May 10, 2012 12:52 pm
by practisevoodoo » Sat May 26, 2012 12:14 pm
Is anyone able to get the image data back from the kinect. The Pi is now detecting the Camera and the Audio devices but I have yet to get freenect to actually grab the image data.
Posts: 19
Joined: Thu May 10, 2012 12:52 pm
by maverick7170 » Mon Jun 04, 2012 12:33 pm
How were you able to get the Pi to detect the camera and audio devices for the Kinect? I've read in another thread (http://www.raspberrypi.org/phpBB3/viewtopic.php?f=63&t=4228&p=86757&hilit=kinect#p86757) that compiling libusb and libusb-compat from source helped. I'm using the arch distro which has libusb 1.0.9 and libusb-compat 0.1.4, which are both up-to-date. Or did you need to compile from the latest git source?

I was able to get my PS3 eye cam working in arch, so perhaps there is hope for the Kinect.

Thanks!
Posts: 8
Joined: Mon Nov 21, 2011 1:04 am
by practisevoodoo » Mon Jun 04, 2012 12:36 pm
Are you using a powered hub to connect the kinect to the pi?
Posts: 19
Joined: Thu May 10, 2012 12:52 pm
by maverick7170 » Mon Jun 04, 2012 1:50 pm
No, but my kinect has the external power supply. Do I still need the powered hub?

Thanks!
Posts: 8
Joined: Mon Nov 21, 2011 1:04 am
by practisevoodoo » Mon Jun 04, 2012 2:00 pm
Without the hub lsusb only revealed NUI Motor on my pi, I had to use a powered hub to even detect the NUI Camera and NUI Audio devices. So I think that the powered hub is a requirement.
Posts: 19
Joined: Thu May 10, 2012 12:52 pm