First, I change the Product and Vendor IDs in XnDeviceSensorIO.cpp. Furthermore, I'm setting the USB alternative interface to enable the two isochronous endpoints. More informations to libusb (function: libusb_set_interface_alt_setting).

Second, I modified the access permissions rules for the primesense sensor usb (55-primesense-usb.rules).

I recompiled the modified openni drivers.

Basicly now the driver is adjusted only for the K4W. The Kinect for Xbox can actually no longer be identified. But this is okey for my purpose until now.

Comments

I need to have the k4W with ROS, but im not really experiment with it. im having problems changing the XnDeviceSensorIO.cpp. could anybody explain a bit more all necessary changes needed to have the K4W working?

Is there any progress in getting K4W work out of the box?
If not, can someone tell me where XnDeviceSensorIO.cpp is located? I checked out openni drivers, but I can't find neither that file nor 55-primesense-usb.rules.
Thanks!

"Kinect for Windows" does not yet work in ROS. The official OpenNI software supports the ASUS Xtion and PrimeSense's own devices. We apply a patch (basically just adding the Kinect's USB ids) to OpenNI to support Kinect for Xbox. AFAIK no one has yet produced a similar patch for K4W.

Now: it turns out the K4W device is
(from a protocol level) practically
identical. You have to set the K4W to
use an alternate USB configuration,
and the productIds are different, but
other than that, all the rest of the
code works as-is. The patch to get
data streaming, registration and all,
was about 50 lines. It was somewhat
hackish, but for a proof of concept:
very promising.

So, in case anyone feels like taking this on :), here's how you could go about getting K4W support in ROS (via OpenNI):

Examine the relevant patch to understand the changes in opening the device at the USB level.

Our build scripts and patches for OpenNI are located in the openni/drivers project. Examine our patch for the ps-engine device driver to see where Kinect for Xbox support is added - the key file is XnDeviceSensorIO.cpp.

Modify the patch to add K4W support, following Drew's example.

Finally, an entirely different approach if you're on Windows: there's an experimental module that uses Microsoft's Kinect SDK to communicate with the device, then relays the data through OpenNI.

lspci would be a first start. if that doesn't give you enough you might need to play around with udevadm just listing everything. I don't have one here right now, but my config file says that it should have vendorId 045e and productids 02ad - 02b0. The hope would be that they just changed that.

I tried to use Kinect for Windows for weeks and always get "No device connected" error. Once I changed to Kinect for Xbox everything works... so my suggestion is just to get a Kinect for Xbox or wait until the driver comes out...