I had to use labview and kinect for an undergraduate project. I gave up on directly interfacing as I am not a fan of labview. I ultimately built a udp client-server. The server managed the kinect using an embedded linux development board and. The client received the stream and processed the data. It works pretty well and the kinect is very easy to control in linux with libfreenect.
Best Regards,
Arul Kamarudin
CEASTech Unimap
Basically my implementation relies on Libfreenect and Opencv 2.1, thus I use Ubuntu 11.10 which provides OpenCv2.1 in the repository (I didn't get around to learning 2.3). Libfreenect installs as specified on the website, it was initially broken for ARM's cores however Drew Fisher was kindly able to repair a memory allocation problem. I initially ran LXDE during my development stages, however it does require considerable resources and a headless ubuntu is a much better option once functionality is achieved.
My client-server architecture is developed using sockets. The USB connection for the kinect is provided by the HS USB hub back the OMAP's ULPI port. I have found this to be a trouble free exercise with the Kinect and Ethernet both sharing the Hub back to the ULPI port. However I did not stream entire images as I allowed the application to perform all the required object detection and only return the detected objects. However I believe streaming is possible and again when time permits I'll see how it goes.
As for Pi, unless the USB interface is not a High Speed HUB or similar capability i cannot see why it will not work.
As for dropped frames with Libfreenect, this is my biggest dislike about this library and my experience has found that this problem is not limited to ARM platforms. Libfreenect requires a separate thread to be spawned, this is a basic task with examples provided on OpenKinect, however if I block the UDP server waiting for a new UDP packet I get a nice stream of dropped packets. I have not being able to draw the link between the main thread impeding on the spawned thread. This problem is replicated on my x86 platform. Thus my only solution at current is to poll the UDP interface for a newly received packet, thus increasing CPU load. To me this is the only draw back of Libfreenect, otherwise I have found the library to be fantastic and initializing the library in registered mode (Depth Image matched to the RGB image) provides images highly suited to problem of computer vision as a coloured three dimensional representation of the local environment can be achieved.
Unfortunately if I cannot solve the blocking problem I am going to have to try OpenNI to see if the problem is replicated their, however unlike Libfreenect the installation task of OpenNI has proved to be painful and time consuming.
Its quite amazing that USB issues are plaguing the Pi.
However the provided link does highlight the project is in the Beta version and I am sure Pi will overcome them and we will see libfreenect operational.
Back to Ethernet streaming
Yes 30Hz may not be achievable, but 30Hz may not be the desirable rate for all applications. Accessing the server at a decreased rate would allow streaming to occur, not applicable to all users but since human reaction time is in the order of milliseconds maybe 4 Hz could be achieved which would be about 50Mbit/s. But yes a bigger pipe would be nice.
Do you guys think 60msec latency is good enough for dynamic application say for mobile robot use?I am currently looking for something similar; streaming the kinect's depth data to a client running labview program.Would netbook with Windows 7 Starter be compatible with Libfreenect and good enough to run this job?Thanks for any inputArul
Depends on how path planning and object detection are performed, and the speed of the robot. I built an occupancy grid so latency was an issue as the robot moved at 0.5m/s, thus I had to get the localization of the robot (its location in the map) to the object detection server and capture the kinect images prior to the images becoming invalid for the provided localisation data. This isn't the only approach available, due to the kinect having minimum depth range of 500mm you need close range sensor anyway. Use these for collision avoidance (direct control of drive frame) and stream the kinect at a reduced rate to look for distant obstacles, since there will be a large amount of error in the distance to the detected object you will need to determine how much error will exist and the decision that the robot will make.