Ask Your Question
4

Kinect for Windows

asked 2012-02-03 06:49:11 -0500

updated 2014-04-20 14:05:30 -0500

ngrennan gravatar image

Has anybody tried the new Kinect for Windows with ROS.

http://www.zdnet.com/blog/microsoft/whats-new-in-microsofts-kinect-for-windows-final-bits/11783

Hopefully it works with the standard ROS drivers.

edit retag flag offensive close delete

7 answers

Sort by ยป oldest newest most voted
3

answered 2012-05-04 01:56:58 -0500

GermanUser gravatar image

updated 2012-06-10 08:21:16 -0500

So far, I tested the new driver changes for the "Kinect for Windows" from Drew Fisher (k4w-drivers).

And it does work fine with the "Kinect for Windows" included the modified libfreenect device drivers!

The old drivers are the same, the only changes are the driver parameters which have to be added for the K4W in into the source code.

So far, I done this steps to change the openni drivers:

  1. 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).

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

  3. 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.

edit flag offensive delete publish link more

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?

Lean2 ( 2012-09-29 06:13:46 -0500 )edit

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!

S ( 2013-03-25 07:56:42 -0500 )edit

I need that file, too... Please give us a feedback

madeng84 ( 2013-03-26 07:04:24 -0500 )edit
4

answered 2012-04-23 13:51:27 -0500

Patrick Mihelich gravatar image

"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.

I don't believe libfreenect officially supports K4W out-of-the-box yet either, but Drew Fisher did manage to identify the USB protocol differences (thread):

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):

  • See if Drew's libfreenect branch with experimental K4W support works with your device.
  • 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.

edit flag offensive delete publish link more
3

answered 2012-03-04 23:57:22 -0500

I just tried it with the openni_camera driver (electric/.debs/Natty/64bit) and it keeps telling me:

[ INFO] [1330948479.141759180]: No devices connected.... waiting for devices to be connected
[ INFO] [1330948482.157149616]: No devices connected.... waiting for devices to be connected

So for the moment, it seems like the Kinect for Windows does not work out of the box with openni_camera (and the system specs I posted above).

edit flag offensive delete publish link more

Comments

Did they maybe just change some device ids, so it just requires a configuration fix?

dornhege ( 2012-03-05 00:20:33 -0500 )edit

Can you give me a hint what to do/what to look for? The Kinect was a plug and play affair for me so far and I currently don't have the time to spare to play around too long with it :)

Stefan Kohlbrecher ( 2012-03-06 19:03:28 -0500 )edit

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.

dornhege ( 2012-03-07 01:06:44 -0500 )edit
3

answered 2012-06-07 05:28:50 -0500

GermanUser gravatar image

updated 2012-06-10 08:24:14 -0500

Since some days I can stream video data from the "Kinect for Windows" in ROS. It is working not optimal, but it works.

After launching the openni drivers (with roslaunch openni_launch openni.launch) I get this Warnings:

[ INFO] [1339081254.638412112]: Number devices connected: 1
[ INFO] [1339081254.638652716]: 1. device on bus 002:05 is a Microsoft Kinect Camera (2bf) from Microsoft (45e) with serial id '0000000000000000'
[ INFO] [1339081254.639833104]: Searching for device with index = 1
[ INFO] [1339081254.697212118]: Opened 'Microsoft Kinect Camera' on bus 2:5 with serial number '0000000000000000'
[ INFO] [1339081254.729447364]: rgb_frame_id = '/camera_rgb_optical_frame' 
[ INFO] [1339081254.729658424]: depth_frame_id = '/camera_depth_optical_frame'

[ WARN] [1339081254.735901259]: Camera calibration file /home/test/.ros/camera_info/rgb_0000000000000000.yaml not found.
[ WARN] [1339081254.736156947]: Using default parameters for RGB camera calibration.
[ WARN] [1339081254.736304452]: Camera calibration file /home/test/.ros/camera_info/depth_0000000000000000.yaml not found.
[ WARN] [1339081254.736458941]: Using default parameters for IR camera calibration.

What could I do to solve the warnings?

edit flag offensive delete publish link more

Comments

1

Hi GermanUser, is there a way you can share your solution with us? It seems that you've done a great job at solving this thing!

Rob Janssen ( 2012-11-08 00:51:52 -0500 )edit
1

answered 2014-05-25 19:14:13 -0500

updated 2014-06-07 05:24:01 -0500

A quite dumb way to resolve the problem.

# Prepare the catkin workspace for the libfreenect
source /opt/ros/hydro/setup.bash
mkdir -p ~/libfreenect_catkin_ws/src
cd ~/libfreenect_catkin_ws/src
catkin_init_workspace
cd ~/libfreenect_catkin_ws/
catkin_make
source devel/setup.bash

# Get the latest sources from the github repository
cd ~/libfreenect_catkin_ws/src/ 
git clone https://github.com/OpenKinect/libfreenect.git

# Grab the source of the freenect_stack
git clone https://github.com/ros-drivers/freenect_stack.git tmp
mv tmp/freenect_stack .
mv tmp/freenect_camera .
mv tmp/freenect_launch .
rm -rf tmp/

# catkinize the "vanilla" libfreenect sources
cd ~/libfreenect_catkin_ws/src/libfreenect/
wget -q https://raw.githubusercontent.com/ros-drivers-gbp/libfreenect-release/master/patches/package.xml

replace :{version} in package.xml file with the 0.4.3 or the up-to-date version to the moment of accessing this page.

Original File

<?xml version="1.0"?>
<package>
  <name>libfreenect</name>
  <version>:{version}</version>

Updated file

<?xml version="1.0"?>
<package>
  <name>libfreenect</name>
  <version>0.4.3</version>

After that install the required packages using rosdep

# Installing package dependencies
rosdep update
rosdep install libfreenect
sudo aptitude install ros-hydro-camera-info-manager ros-hydro-diagnostic-msgs ros-hydro-diagnostic-updater ros-hydro-dynamic-reconfigure

Now you can build the packages using catkin_make_isolated

# use sudo if needed
catkin_make_isolated
# change hydro if you are using different distribution
catkin_make_isolated --install --install-space=/opt/ros/hydro/
edit flag offensive delete publish link more

Comments

I opened an issue for this: https://github.com/ros-drivers-gbp/libfreenect-release/issues/5 . Comments there about your needs and experiences with various libfreenect versions will be helpful.

joq ( 2014-05-26 06:05:26 -0500 )edit
1

answered 2012-06-03 09:31:15 -0500

Chong gravatar image

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...

edit flag offensive delete publish link more

Comments

just what i was looking for ... thanks

ankitravankar ( 2012-10-18 03:04:53 -0500 )edit
0

answered 2013-02-26 01:17:32 -0500

preetham.hegde gravatar image

@GermanUser: Can you please give a detailed method of how you solved this?? Cant seem to get it working.

edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Follow
8 followers

Stats

Asked: 2012-02-03 06:49:11 -0500

Seen: 4,713 times

Last updated: Jun 07