sviborg
Posts: 8
Joined: Thu Jan 31, 2013 10:56 am

Re: Kinect - Would it ever work with a Raspberry Pi?

Thu Jan 31, 2013 3:48 pm

Using OpenNI unstable, also tried OpenNI2 but it crashes when log enabled, without log works slower.

hellcow
Posts: 2
Joined: Sun Mar 31, 2013 2:04 am

Re: Kinect - Would it ever work with a Raspberry Pi?

Sun Mar 31, 2013 2:07 am

Any luck with that data timeout issue on the Kinect? I'm bumping into the same problem now.

I'd be happy to spend the time debugging it, but I'm not sure what tools to use or where to start. Can anyone point me in the right direction?

jimthree
Posts: 1
Joined: Fri Nov 30, 2012 4:20 pm

Re: Kinect - Would it ever work with a Raspberry Pi?

Sun Mar 31, 2013 8:19 am

Perhaps we should loop in the team at Adafruit, they have the USB debugging hardware, and Pi knowledge that could help get a breakthrough here.
Jim

hellcow
Posts: 2
Joined: Sun Mar 31, 2013 2:04 am

Re: Kinect - Would it ever work with a Raspberry Pi?

Mon Apr 01, 2013 3:30 pm

I started a thread on Adafruit's forums to hopefully get some more people engaged with this. Looks like the recommendation is to get a digital storage oscilloscope and a logic analyzer. I'll start looking around to see if I can get a hold of these things.

http://forums.adafruit.com/viewtopic.php?f=8&t=38537

ctrlaltca
Posts: 1
Joined: Thu Apr 04, 2013 5:42 pm

Re: Kinect - Would it ever work with a Raspberry Pi?

Thu Apr 04, 2013 5:54 pm

I recently hit the wall of making a kinect work with a raspi, too. I got the motor, led and accellerometers working as everybody else but i'm stuck on the cameras.
I'm currently trying to debug the issue using software, here's what i've done and found.
Usb sniffing using tcpdump & analyzing the packets using wireshark exposes that the video data is received by the raspberry and exposed to the userspace. Here's the start of an usb iso packet payload grabbed from wireshark:

Code: Select all

0140  52 42 00 82 00 bd 07 80  0f c5 52 1d 01 01 01 02   RB...... ..R.....
It kinda matches the protocol as exposed at http://openkinect.org/wiki/Protocol_Documentation (see the "Cameras" section).
I then played a bit with libfreenect's regtest demo, adding some debug output when needed, to discover that packets gets received, but they're full of zero:

Code: Select all

(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
`/root/libfreenect/build-debug/bin/regtest' has changed; re-reading symbols.
Starting program: /root/libfreenect/build-debug/bin/regtest 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0xb6e3d470 (LWP 4962)]
Control cmd=0016 tag=0000 len=000a: 18
... libfreenect init cutted ...
Control cmd=0003 tag=0009 len=0004: 12
Control reply: 12

----------------------------
[0000] 0 0 0 0   0 0 0 0
[0008] 0 0 0 0   0 0 0 0
[0016] 0 0 0 0   0 0 0 0
[0024] 0 0 0 0   0 0 0 0
[0032] 0 0 0 0   0 0 0 0
[0040] 0 0 0 0   0 0 0 0
[0048] 0 0 0 0   0 0 0 0
... a lot of zero cutted...
[1904] 0 0 0 0   0 0 0 0
[1912] 0 0 0 0   0 0 0 0
[1920] 0 0 0 0   0 0 0 0
[Stream 80] Invalid magic 0000
----------------------------
As you can see, the libfreenect's camera packet parser halts because it find 0000 instead of the "magic value" RB. The actually involved code is in cameras.c:86 in the stream_process() function.

funkifunki
Posts: 1
Joined: Tue Apr 30, 2013 2:52 pm

Re: Kinect - Would it ever work with a Raspberry Pi?

Tue Apr 30, 2013 3:05 pm

hi everybody,

after successful installation of libusb, libfreenect and OpenNI on Fedora Remix, i'm stuck trying to install avin2 SensorKinect

i'm following the instructions given in the readme on github, but here's what i'm getting from Linux/Platform/CreateRedist/RedistMaker:

...
In file included from ../../../../Include/XnIONetworkStream.h:28:0,
from ../../../../Source/XnCore/XnIONetworkStream.cpp:25:
../../../../Include/XnIOStream.h:28:24: fatal error: XnPlatform.h: No such file or directory
compilation terminated.
make[1]: *** [Arm-Release/XnIONetworkStream.o] Error 1
make[1]: Leaving directory `/home/funki/kinect/SensorKinect/Platform/Linux/Build/XnCore'
make: *** [XnCore] Error 2
make: Leaving directory `/home/funki/kinect/SensorKinect/Platform/Linux/Build'

would really be grateful for any hint, what can be wrong here

thanks in advance!

pdf417
Posts: 1
Joined: Sat May 25, 2013 12:24 pm

Re: Kinect - Would it ever work with a Raspberry Pi?

Sat May 25, 2013 12:29 pm

Following up on your question, I believe it should work. Will try it out and repost. Meanwhile FYI, I intend to use the SimpleCV library to get a depth map from the kinect in a simple and straightforward way as described here -> http://tutorial.simplecv.org/en/latest/ ... inect.html
Will be interesting to see how computationally intensive this is and whether the RPi will be able to handle this data. First incarnation will probably bee a simple obstacle avoidance application.

KevinO
Posts: 10
Joined: Thu Feb 21, 2013 12:12 am
Location: Pasadena, CA

Re: Kinect - Would it ever work with a Raspberry Pi?

Sat May 25, 2013 10:22 pm

I have a Prime Sense which is basically the same thing as a Kinect working using openNI and OpenCV on my raspberry pi robot. Take a look.

video of it sensing object collision
http://www.youtube.com/watch?v=9iE3Yv2s6n4

view of the sensors using VNC
http://forums.trossenrobotics.com/galle ... ensors.jpg

Heads up display using openCV
http://forums.trossenrobotics.com/galle ... ttehud.jpg

bzhao
Posts: 1
Joined: Wed May 29, 2013 5:15 pm

Re: Kinect - Would it ever work with a Raspberry Pi?

Wed May 29, 2013 5:18 pm

What kind of powered usb hubs are you guys using to get the RPi to recognize the camera/audio?

Bruce

KevinO
Posts: 10
Joined: Thu Feb 21, 2013 12:12 am
Location: Pasadena, CA

Re: Kinect - Would it ever work with a Raspberry Pi?

Wed May 29, 2013 9:43 pm

I am using this one on my robot.

http://www.iogear.com/product/GUH274/

It's powered by a UBEC that brings my lipo battery down to 5.1V.

pranmala
Posts: 1
Joined: Sun Oct 20, 2013 4:30 pm

Re: Kinect - Would it ever work with a Raspberry Pi?

Sun Oct 20, 2013 4:58 pm

Hello Kevin,

I am catching up to the fun late here. I have a need to make Kinect (For Windows version)
to work with RPi for Skeleton tracking.

Can you please guide me to a useful links to set me in this direction.

Appreciate any help!

Ramesh

xxorde
Posts: 1
Joined: Tue Apr 15, 2014 8:58 am

Re: Kinect - Would it ever work with a Raspberry Pi?

Tue Apr 15, 2014 9:00 am

If you want to use video there is a driver in the kernel!

Code: Select all

modprobe videodev
modprobe gspca_main
modprobe gspca_kinect
You get a new /dev/videoX and can use it like any other webcam!

For depth you need another driver which can be found here: https://github.com/xxorde/librekinect

Both work well on the current Raspbian.

madara_x64
Posts: 8
Joined: Tue Nov 26, 2013 4:22 pm

Re: Kinect - Would it ever work with a Raspberry Pi?

Tue Jun 10, 2014 9:34 am

Hi xxorde,
I've been following news of your work quite keenly. Been interested in Kinect-Raspi interfacing for a long while now. I don't currently have a Kinect, but I want to get one. In the meantime, could you please post/upload pics/video of the video stream you're getting from the Kinect? I want to see the results, if possible..
Great work, once again.

T0mT0m
Posts: 1
Joined: Wed Jun 25, 2014 8:45 pm

Re: Kinect - Would it ever work with a Raspberry Pi?

Wed Jun 25, 2014 9:01 pm

Hi xxorde,

nice work....
i'm trying to get it working with your kernel but it stops by loading modules in liberkinect(see bellow), do you may be know what is the problem?
Once again great job and keep it going.

PS: can you post video how it works on RPi?

thank you

"[email protected]:/librekinect# make load
make unload_drivers
make[1]: Entering directory `/librekinect'
sudo sh unload_drivers.sh
Error: Module gspca_main is not currently loaded
Error: Module gspca_kinect is not currently loaded
Error: Module gspca is not currently loaded
Error: Module kinect is not currently loaded
make[1]: Leaving directory `/librekinect'
sudo modprobe videodev
sudo insmod gspca.ko
sudo insmod kinect.ko
sudo chown -f -R root:root /dev/video*
sudo chmod -f 755 /dev/video*"

samighi11
Posts: 46
Joined: Wed Apr 17, 2013 8:27 pm

Re: Kinect - Would it ever work with a Raspberry Pi?

Sun Jun 29, 2014 6:03 pm

I hate to ask the silliest of questions. I finally got a kernel built and installed (problem was the make didn't say use sudo). i now have a /dev/video0. Prior to that the tilttest worked fine. Now that I have the lib kinect installed, what is next? C/C++ library/code to read data and sample the information?

FYI, using the same idea, i was able to get a Wii Controllers to talk to my iOS app using the Raspi as the BT reader. (that took a day).

Now I am stuck on what to do next (samples, code, test) on the PI with this library.

Any simple help would be appreciated.

SA

dellagd
Posts: 2
Joined: Tue Aug 26, 2014 3:59 am

Re: Kinect - Would it ever work with a Raspberry Pi?

Tue Aug 26, 2014 4:02 am

Just would like to go on the record to say I just got librekinect set up and am successfully getting a depth stream out of the Kinect. I followed his guide pretty closely, just swapping out the kernel he used, "3.12.y", for the one I have of "3.10.y".

This is quite cool, it seems the answer to the OP is definitely yes, saying as the whole point of the Kinect is to get its depth stream.

samighi11
Posts: 46
Joined: Wed Apr 17, 2013 8:27 pm

Re: Kinect - Would it ever work with a Raspberry Pi?

Tue Aug 26, 2014 12:37 pm

dellagd wrote:Just would like to go on the record to say I just got librekinect set up and am successfully getting a depth stream out of the Kinect. I followed his guide pretty closely, just swapping out the kernel he used, "3.12.y", for the one I have of "3.10.y".

This is quite cool, it seems the answer to the OP is definitely yes, saying as the whole point of the Kinect is to get its depth stream.
I briefly worked on this over the summer and I got the depth to work but was not able to completely get the stream to work. Then I switched to the June Raspibian OS and the code continued to work (brand new SD image install). The questions I have is what Raspibian release did you start with? and could you link what you followed and if you make any diversion? I want to start again with the correct OS and correct procedures and implement something for my makerspace group.

dellagd
Posts: 2
Joined: Tue Aug 26, 2014 3:59 am

Re: Kinect - Would it ever work with a Raspberry Pi?

Tue Aug 26, 2014 1:17 pm

It's Raspian:

Code: Select all

[email protected] ~ $ uname -a
Linux raspberrypi 3.10.38 #1 PREEMPT Mon Aug 25 15:37:59 UTC 2014 armv6l GNU/Linux
[email protected]  ~ $ cat /etc/debian_version
7.2
[email protected] ~ $ cat /etc/issue.net
Raspbian GNU/Linux 7
Um, as for deviations besides doing a find and replace for his 3.12 kernel to my 3.10, I did do the whole process up until the end with the Kinect unpowered. I was having the final 'make load' fail and couldn't figure it out till I realized I never flipped the on switch to my USB hub. Even then it still failed. I'm not an expert, so I'm not sure what this means, but then I ran lsusb to check to see the the Kinect had actually connected to the pi and, seeing that it had, I tried 'make load' again. Lo and behold it went through and gave me the new video source.

Also It would appear I'm getting around 3fps with it, but I haven't run it through the native video output, that was in the VNC window, not sure if it would make a difference.

I have some more info and a screenshot over here (blog).

Return to “Automation, sensing and robotics”