0
$\begingroup$

Rosanswers logo

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.


Originally posted by sedwards on ROS Answers with karma: 1601 on 2012-02-03

Post score: 4

$\endgroup$

7 Answers 7

0
$\begingroup$

Rosanswers logo

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.


Originally posted by GermanUser with karma: 125 on 2012-05-04

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by Lean2 on 2012-09-29:
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?

Comment by S on 2013-03-25:
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!

Comment by madeng84 on 2013-03-26:
I need that file, too... Please give us a feedback

$\endgroup$
0
$\begingroup$

Rosanswers logo

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


Originally posted by Stefan Kohlbrecher with karma: 24361 on 2012-03-05

This answer was NOT ACCEPTED on the original site

Post score: 3


Original comments

Comment by dornhege on 2012-03-05:
Did they maybe just change some device ids, so it just requires a configuration fix?

Comment by Stefan Kohlbrecher on 2012-03-06:
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 :)

Comment by dornhege on 2012-03-07:
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.

$\endgroup$
0
$\begingroup$

Rosanswers logo

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


Originally posted by Patrick Mihelich with karma: 4336 on 2012-04-23

This answer was NOT ACCEPTED on the original site

Post score: 4

$\endgroup$
0
$\begingroup$

Rosanswers logo

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


Originally posted by Chong with karma: 76 on 2012-06-03

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by Vegeta on 2012-10-18:
just what i was looking for ... thanks

$\endgroup$
0
$\begingroup$

Rosanswers logo

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?


Originally posted by GermanUser with karma: 125 on 2012-06-07

This answer was NOT ACCEPTED on the original site

Post score: 4


Original comments

Comment by Rob Janssen on 2012-11-08:
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!

$\endgroup$
0
$\begingroup$

Rosanswers logo

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


Originally posted by preetham.hegde with karma: 31 on 2013-02-26

This answer was NOT ACCEPTED on the original site

Post score: 2

$\endgroup$
0
$\begingroup$

Rosanswers logo

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/

Originally posted by olzhas with karma: 11 on 2014-05-25

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by joq on 2014-05-26:
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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.