-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kinect for Windows and Kinect for Xbox 360 Model 1473 support #325
Conversation
I applied your patch to "master" branch, but I still have problems with my Kinect for XBox 360 (model 1473). Kinect camera test (Tested OS X 10.8.3) |
Please check the latest commit, it supposedly fixes the issue for linux and mac |
Tested on Mac OS X 10.8.4 and it works!!! Thank you very much! |
You are welcome :) I'd appreciate some more feedback on linux & mac to check the other two kinects as well. If they work, which they should, all that's left is replicating the windows libusb-win32 drivers to make it easier to work there as well |
@wizgrav I'm confirming that applying this pull request to libfreenect/master made my Kinect for Xbox 360 model 1473 work on Ubuntu 13.04 amd64 (kernel 3.8.0, libusb 1.0.12) in standard demos. Thank you! |
Is this fix for any Kinect for Windows? I have a model 1517 and it shows a black screen. Kinect camera test |
@Meach please try with the latest commit |
This currently won't build on Windows as the libusb_set_interface_alt_setting function wrapper for libusb_win32 is missing from libusbemu.cpp. I'll try whipping up one now. |
@danomatika I wrote the wrapper but don't have windows handy to test it(I should setup mingw but it's getting very late here). Can you give it a try? |
Here's what I have: https://github.com/danomatika/libfreenect/commit/5775c6d91290c7de897d5f46fc28b184c01924ab and it builds. I'll don't have a new device handy, but I'll send out the changes to see if it works for others who do. This is through the OpenFrameworks freenect wrapper: ofxKinect |
Ha, we did the same thing at the same time. I incorporated your changes in my fork (I forgot to claim the interface) and I'll push out a version people can try on my end. If that's working, I can let you know and do a PR, etc. In any case, it's building and running on Windows, but I can't know for certain until I get a newer model kinect. |
That was a mistake on my part. The interface should have been claimed before setting the alternate config on it(claiming it again doesn't hurt per the docs of libusb though). My code was trying to set it before claiming it. It is fixed now. |
@wizgrav ok I tried the latest commit and it now works as well with my K4W model 1517. |
As a git newbie my apologies, but what is the command line recipe to pull this branch so I can also test it? |
@petergreis I've used this method https://gist.github.com/piscisaureus/3342247 |
OK, I have looked at that link and I am still in the dark... is there a fast way to pull everything here from wizgrav ? |
@petergreis you can also download directly wizgrav repository. (https://github.com/wizgrav/libfreenect/archive/master.zip) |
Beautiful, thank you. I will compile and test when I get back tonight. Best regards On Jun 19, 2013, at 13:31, "Mathieu Hingant" <notifications@github.commailto:notifications@github.com> wrote: @petergreishttps://github.com/petergreis you can also download directly wizgrav repository. (https://github.com/wizgrav/libfreenect/archive/master.zip) — |
OK - Model 1517 connected to a Macbook Pro retina: I finally get something! With the demos I have a picture for a while, then all of them crash. |
@petergreis can you provide some debugging info? what is the output of the demos on the console before they crash? I don't have access to any mac at the moment to test unfortunately |
From glview: freethinker-rMacBookPro:~ peter_greis$ glview shutting down streams... From the Problem Report: Process: glview [13734] Date/Time: 2013-06-20 16:44:29.224 +0200 Interval Since Last Report: 679135 sec Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Application Specific Information: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
Thread 1:: Dispatch queue: com.apple.libdispatch-manager Thread 2: Thread 3: Thread 0 crashed with X86 Thread State (64-bit): Binary Images:
External Modification Summary: VM Region Summary: REGION TYPE VIRTUAL Model: MacBookPro10,1, BootROM MBP101.00EE.B02, 4 processors, Intel Core i7, From: Yannis Gravezas notifications@github.com @petergreis https://github.com/petergreis can you provide some debugging � |
I gotten the same report from people on OSX as well. |
Wizgav, |
Yeah for now there's no tilt, leds or audio for the newer kinects. Is it worth dealing with those anyway? The complexity of the lib will be greatly increased if it is ever to support the kinect 2, and maybe won't even be feasible. I feel that libfreenect should focus on the primesense chipset and family. Their next iteration, capri, will give a big boost to the smart device market. It is reported as quite compatible to what we have now so it should be much simpler to support and the future much more certain than trying to get by with MS |
Wizgav, |
@wizgrav Regarding Kinect 2, considering the improved sensors, I'm sure there will be demand for open source drivers for it. I agree that supporting that device, which uses entirely different technology, would be better suited as a separate driver project, or at least separatable component of libfreenect if there is sufficient overlap in API-layer stuff. For now libfreenect itself should stay about the K4Xbox and closely related K4W sensors, and to the extent that there is a need/desire to add capri support that'd be fine too. OTOH, capri would already be well supported by OpenNI 2, so there may be less of a burning desire that there motivates people to work it out. |
@JoshBlake Do you agree with focusing on the camera device? Is the rest of the kinect's functionality useful enough to justify the complexity of having to handle multiple devices? Libfreenect is especially suited for embedded development so there's certainly a motive here |
Unfortunately I don't have a mac to test but found this https://discussions.apple.com/message/23102051#23102051 It supposedly provides a fix in the last post of the thread. Check it out. I feel it won't fix our situation but there are some options we can try though, and hopefully we can find a workaround. I need a volunteer to do a voip session with me so please contact me if you're interested |
please try this branch git clone -b macosx https://github.com/wizgrav/libfreenect.git Mind that I'm shooting in the dark so patience is required |
This worked a little better for me. It gave me window of 30-35 (approx) sec Kinect camera test shutting down streams... |
ok friends here is the Update. now the only issue i am facing is something to do with my system permission that is Can't open input server /Users/soni/Library/InputManagers/LiveDict_temporary. do any one know how to fix this !! |
@soni991 the serial 00000000 indicates that the device is either a K4W or 1473. You may have been given an older kinect which works. Can you provide us with the output of usb probe on your current device? |
@sameershah21 I've done some more experiments in my macosx branch can you try it again? Thanks |
Please also git clone -b unstable https://github.com/wizgrav/libfreenect.git and run the chunkview example. This doesn't utilise the rgb stream, I just want to check out if this is the problem |
@wizgrav i can see the chunkview.c file, but don't know how to run the example....Tried CMAKE and MAKE commands on examples folders but not able to run it. Can you please tell me how to run chunk view example? |
you should create a build directory in the root of the library source, cd into it then "cmake .." & make. This will contain the objects produced from the build in the build folder. If the build succeeds run "./bin/chunkview". It's supposed to be at the same place that glview and the rest are |
Thank you. I did as mentioned Just saw the RGB Frame for about 20 sec and foll is the o/p: shutting down streams... Please let me know if USB probe logs will be helpful. |
You can send me the logs from the usbtrace tool as a last resort but I fear that this is something that roots deeper than we can delve, in the kernel's usb stack. I feel there's no easy way out of this one. If you have the time you can try https://github.com/LuaVision/lua-vision. This is an uber binding for lbfreenect in Lua with many features not found in the C lib itself and, specifically for your case, the ability to recover from errors of the usb bus(originally intended for hot plugging kinects). Check it out and if you find that it fits you for the time being experiment with it until something better comes up. |
try our version of libfreenect - http://www.openframeworks.cc/versions/v0.8.0/of_v0.8.0_osx_release.zip Theo Watson http://openframeworks.ccOn Nov 26, 2013, at 1:54 AM, soni991 notifications@github.com wrote:
|
Hi, Kinect camera test And also a similar error when running the "regview" example. ... Error -1 received from libusb - aborting. I tried it with a Kincet4Win (1517, never connected to a XBox) on OS X 10.8.5 (with libusb-1.0.9 and the latest libfreenect commit Nov 15, 2013) I will try to get it running with the latest OpenFrameworks Version and also try to get the device running on Ubuntu 12.04, with the latest releases. But it would be nice to know, if this is a problem related to the very new K4W model, which is hard to figure out and will properly not get fixed, so I should get a older model? Thanks! |
@pjaehrling I suspect that the trouble comes from the macosx usb stack itself. Maybe the newer devices just break compliance enough so as to be non functional there. At least that's what I get from the reports as I have neither a new kinect nor a macosx setup at hand. There's a workaround you could try though. freenect_process_events() returns -1 on error so you can catch that and do a chain of freenect_stop_depth(...), freenect_close_device(...), and freenect_open_device(...) plus all the initialization you do from there on. This will at least keep the show going even with small pauses. It is good practice doing it anyway as the kinect tends to disconnect for various reasons. You can check a full implementation that implements hot plugging in https://github.com/LuaVision/lua-vision in src/device.c |
Thanks for the fast reply. But as you said, it seems to be a problem with OSX since I got it running with Ubuntu 12.04 with the latest version. |
Hi everyone. I'm also trying to troubleshoot this issue with the 1473 and OSX. I'm running OSX 10.9, compiled the latest libfreenect and I get a disconnect every 20-30 seconds. As far as I know the sensor never saw an XBox. @ofTheo, I also tried working with your version of OF but I get the same issue. Also, using USB Prober I see the device disappear and reappear every 20-30 seconds. Here are some questions if any of you wants to help:
I plan on testing the same sensor on Ubuntu running on the same machine, see if I can get any insight. |
Hi everyone, I also have the disconnect problem, OSX 10.9 and K4W model 1517 here. If I can do anything to help, please let me know. Best, |
In mycase i just have to get it replaced. Thereby it is working fine as its not connected with xbox for testing which i did in first case .
|
I don't know if this helps, but my K4W (1517) is working fine under the latest debian unstable. No disconnect issues as it happens with OSX 10.9. |
Hi, I am using OSX 10.9 and kinect 1473. I found that each times the kinect was disconnected, at the same time, in console log will output two more entries as following 23/1/14 下午09:18:11.000 kernel[0]: USBF: 10823.988 The IOUSBFamily is having trouble enumerating a USB device that has been plugged in. It will keep retrying. (Port 2 of Hub at 0xfa130000) Afterwards, I did a tricky experiment, starting a VirtualBox and a guest os and then assign the Kinect USB drive to the guest os. Run glview, the problem seems fixed. |
@samuelpfchoi thank you for sharing. I will try this.
|
I have submitted a PR which fixes the remaining disconnection issues for 1473 devices. The PR contains code which sets the LED for 1473 and K4W devices - setting the LED seems to stop the disconnections. PR is here: #361 |
Hi, what's the latest with this ? I just tried with the git version of libfreenect, and the problem is still there. Example: |
the problem with the freenect-glview example is, it's not loading the audio firmware. so you have to run first freenet-micview. to use the firmware you have to compile it with the parameter -DBUILD_REDIST_PACKAGE=OFF you can also edit the source of glview.c replace this
by this
don't forgett to copy audios.bin into ~/.libfreenect/audios.bin or the execution folder |
I run Kinect model : 1473 |
This patch does auto detection of all three models and disables motor subdevice for the 2 newer ones. It also
adds a function to test for the presence of the motor and audio devices on newer models.