ros-drivers / freenect_stack

libfreenect based ROS driver
http://ros.org/wiki/freenect_stack
35 stars 52 forks source link

Newer Kinect model 1473 errors out - "Unable to open specified kinect". Works fine with model 1414 #12

Closed mirzashah closed 9 years ago

mirzashah commented 10 years ago

I just bought a new set of Kinects for Xbox with model number 1473. This article http://idav.ucdavis.edu/~okreylos/ResDev/Kinect/MainPage.html explains the difference, but in a nutshell...the newer version updates the hardware to work with Kinect for Windows protocols.

This seems to break functionality with libfreenect. The older Kinect for XBox model (1414) had no problems. The problems are:

Output of lsusb: Bus 002 Device 005: ID 05e3:0727 Genesys Logic, Inc. microSD Reader/Writer Bus 002 Device 004: ID 8087:07d6 Intel Corp. Bus 002 Device 007: ID 045e:02ae Microsoft Corp. Xbox NUI Camera Bus 002 Device 006: ID 045e:02ad Microsoft Corp. Xbox NUI Audio Bus 002 Device 003: ID 045e:02c2 Microsoft Corp. Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 004: ID 046d:c52e Logitech, Inc. Bus 003 Device 003: ID 0d8c:013c C-Media Electronics, Inc. CM108 Audio Controller Bus 003 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 003: ID 2232:1018
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Output of roslaunch freenect_launch freenect_launch: ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found process[camera/camera_nodelet_manager-1]: started with pid [1421] [ INFO] [1406340292.910138575]: Initializing nodelet with 4 worker threads. process[camera/driver-2]: started with pid [1444] process[camera/debayer-3]: started with pid [1462] process[camera/rectify_mono-4]: started with pid [1491] [ INFO] [1406340293.320945433]: Number devices connected: 1 [ INFO] [1406340293.321044568]: 1. device on bus 000:00 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id '0000000000000000' [ INFO] [1406340293.321722756]: Searching for device with index = 1 [ INFO] [1406340293.336926894]: No matching device found.... waiting for devices. Reason: [ERROR] Unable to open specified kinect process[camera/rectify_color-5]: started with pid [1535] process[camera/rectify_ir-6]: started with pid [1572] process[camera/depth_rectify_depth-7]: started with pid [1660] process[camera/depth_metric_rect-8]: started with pid [1706] process[camera/depth_metric-9]: started with pid [1748] process[camera/depth_points-10]: started with pid [1795] process[camera/register_depth_rgb-11]: started with pid [1828] process[camera/points_xyzrgb_sw_registered-12]: started with pid [1881] process[camera/depth_registered_rectify_depth-13]: started with pid [1914] process[camera/points_xyzrgb_hw_registered-14]: started with pid [1959] process[camera/disparity_depth-15]: started with pid [2014] process[camera/disparity_registered_sw-16]: started with pid [2033] process[camera/disparity_registered_hw-17]: started with pid [2082] process[camera_base_link-18]: started with pid [2116] process[camera_base_link1-19]: started with pid [2157] process[camera_base_link2-20]: started with pid [2192] process[camera_base_link3-21]: started with pid [2230] [ INFO] [1406340296.338296397]: Number devices connected: 1 [ INFO] [1406340296.338637476]: 1. device on bus 000:00 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id '0000000000000000' [ INFO] [1406340296.340908036]: Searching for device with index = 1 [ INFO] [1406340296.342048120]: No matching device found.... waiting for devices. Reason: [ERROR] Unable to open specified kinect [ INFO] [1406340299.343443561]: Number devices connected: 1 [ INFO] [1406340299.343618105]: 1. device on bus 000:00 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id '0000000000000000' [ INFO] [1406340299.346420492]: Searching for device with index = 1 [ INFO] [1406340299.347807542]: No matching device found.... waiting for devices. Reason: [ERROR] Unable to open specified kinect [ INFO] [1406340302.349236789]: Number devices connected: 1 [ INFO] [1406340302.349391321]: 1. device on bus 000:00 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id '0000000000000000'

However, it seems libfreenect is not able to query the serial number.

Output of lsusb: Bus 002 Device 005: ID 05e3:0727 Genesys Logic, Inc. microSD Reader/Writer Bus 002 Device 004: ID 8087:07d6 Intel Corp. Bus 002 Device 007: ID 045e:02ae Microsoft Corp. Xbox NUI Camera Bus 002 Device 006: ID 045e:02ad Microsoft Corp. Xbox NUI Audio Bus 002 Device 003: ID 045e:02c2 Microsoft Corp. Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 004: ID 046d:c52e Logitech, Inc. Bus 003 Device 003: ID 0d8c:013c C-Media Electronics, Inc. CM108 Audio Controller Bus 003 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 003: ID 2232:1018
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Output of roslaunch freenect_launch freenect_launch: ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found process[camera/camera_nodelet_manager-1]: started with pid [1421] [ INFO] [1406340292.910138575]: Initializing nodelet with 4 worker threads. process[camera/driver-2]: started with pid [1444] process[camera/debayer-3]: started with pid [1462] process[camera/rectify_mono-4]: started with pid [1491] [ INFO] [1406340293.320945433]: Number devices connected: 1 [ INFO] [1406340293.321044568]: 1. device on bus 000:00 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id '0000000000000000' [ INFO] [1406340293.321722756]: Searching for device with index = 1 [ INFO] [1406340293.336926894]: No matching device found.... waiting for devices. Reason: [ERROR] Unable to open specified kinect process[camera/rectify_color-5]: started with pid [1535] process[camera/rectify_ir-6]: started with pid [1572] process[camera/depth_rectify_depth-7]: started with pid [1660] process[camera/depth_metric_rect-8]: started with pid [1706] process[camera/depth_metric-9]: started with pid [1748] process[camera/depth_points-10]: started with pid [1795] process[camera/register_depth_rgb-11]: started with pid [1828] process[camera/points_xyzrgb_sw_registered-12]: started with pid [1881] process[camera/depth_registered_rectify_depth-13]: started with pid [1914] process[camera/points_xyzrgb_hw_registered-14]: started with pid [1959] process[camera/disparity_depth-15]: started with pid [2014] process[camera/disparity_registered_sw-16]: started with pid [2033] process[camera/disparity_registered_hw-17]: started with pid [2082] process[camera_base_link-18]: started with pid [2116] process[camera_base_link1-19]: started with pid [2157] process[camera_base_link2-20]: started with pid [2192] process[camera_base_link3-21]: started with pid [2230] [ INFO] [1406340296.338296397]: Number devices connected: 1 [ INFO] [1406340296.338637476]: 1. device on bus 000:00 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id '0000000000000000' [ INFO] [1406340296.340908036]: Searching for device with index = 1 [ INFO] [1406340296.342048120]: No matching device found.... waiting for devices. Reason: [ERROR] Unable to open specified kinect [ INFO] [1406340299.343443561]: Number devices connected: 1 [ INFO] [1406340299.343618105]: 1. device on bus 000:00 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id '0000000000000000' [ INFO] [1406340299.346420492]: Searching for device with index = 1 [ INFO] [1406340299.347807542]: No matching device found.... waiting for devices. Reason: [ERROR] Unable to open specified kinect [ INFO] [1406340302.349236789]: Number devices connected: 1 [ INFO] [1406340302.349391321]: 1. device on bus 000:00 is a Xbox NUI Camera (2ae) from Microsoft (45e) with serial id '0000000000000000'

salsaman commented 10 years ago

Exact same problem here. Any suggestions for this ?

piyushk commented 10 years ago

As @mirzashah pointed out, I think the libfreenect version is too old to query for the serial number in Saucy and Trusty. There's an ongoing discussion https://github.com/ros-drivers-gbp/libfreenect-release/issues/5 to upgrade the libfreenect version for Indigo.

mirzashah commented 10 years ago

@salsaman I found that the openni_launch driver works with this model of Kinect. IMPORTANT: openni_launch is not the same as openni2_launch!

I'd prefer the freenect library as they seem to have better support than openni...especially now that openni has shutdown.

ccsmart commented 10 years ago

I believe to be in the same boat with a Kinect for Windows / PC. freenect-glview works. Original topic with added info: http://answers.ros.org/question/195168/kinect-on-jetson-tk1/?comment=195386#comment-195386 Would therefore join in with requesters for an update of freenect version for ROS. Thanks for your great work and the ROS project.

piyushk commented 10 years ago

I'll look into updating ros-indigo-libfreenect to 0.5.0 or 0.4.3 later this week.

ccsmart commented 10 years ago

That would be great. Thanks !

alexmartinnnnnn commented 10 years ago

@piyushk does this mean precise/hydro will be fixed as well?

piyushk commented 10 years ago

@kinect-guy No. Precise/Hydro will not be updated. I am not inclined to update a package that hasn't been touched since Hydro was first released. I'm not sure how backwards compatible 0.5 is with the Hydro 0.1.2 release.

If you're interested, once the indigo release is made, you should be able to download the indigo version of libfreenect-release to your catkin workspace and build it there.

stefie10 commented 10 years ago

Any updates on this issue? Half our kinects are broken right now... I was hoping we could apt-get update to get the fix sometime soon, but if not we'll start investigating doing the upgrade ourselves.

piyushk commented 10 years ago

Sorry. I got stuck on a paper deadline. I should be able to look into it next week and report back on this thread.

stefie10 commented 10 years ago

Can you maybe give a brief summary of what you would do? We might take a look at this tomorrow, and some pointers on where to start would be helpful. I was thinking the right thing is to look at this package: http://wiki.ros.org/libfreenect and create a new version with the latest libfreenect. But it doesn't seem to be in github so I'm not sure if we would make a pull request or what?

I also found some evidence that openni2 can be made to work on this thread: http://answers.ros.org/question/61542/kinect-xbox360-new-model-1473-has-problems-example-serial-number-soundcard/

piyushk commented 10 years ago

Sure! libfreenect has been released as a third party package ( http://wiki.ros.org/bloom/Tutorials/ReleaseThirdParty). In short, a third party package release downloads a particular revision from an external repository (in this case: https://github.com/OpenKinect/libfreenect), applies some patches to it ( https://github.com/ros-drivers-gbp/libfreenect-release/tree/patches/release/indigo/libfreenect), and releases it using bloom.

To update the release, a different and newer version of libfreenect will have to be downloaded, and the patches modified to support this new version.

On Thu, Nov 13, 2014 at 1:54 PM, Stefanie Tellex notifications@github.com wrote:

Can you maybe give a brief summary of what you would do? We might take a look at this tomorrow, and some pointers on where to start would be helpful. I was thinking the right thing is to look at this package: http://wiki.ros.org/libfreenect and create a new version with the latest libfreenect. But it doesn't seem to be in github so I'm not sure if we would make a pull request or what?

I also found some evidence that openni2 can be made to work on this thread:

http://answers.ros.org/question/61542/kinect-xbox360-new-model-1473-has-problems-example-serial-number-soundcard/

— Reply to this email directly or view it on GitHub https://github.com/ros-drivers/freenect_stack/issues/12#issuecomment-62955282 .

jack-oquin commented 10 years ago

I recommend that we only release the new libfreenect package to Indigo.

The Hydro package has been stable for a long time. Releasing a completely new libfreenect version there would risk disrupting lots of users.

jack-oquin commented 10 years ago

Should we consider converting libfreenect from a 3rd-party package to a "normal" catkin ROS package?

piyushk commented 10 years ago

@jack-oquin I don't think we plan on releasing this change into Hydro.

I really like the suggestion of converting libfreenect from a 3rd party package to a normal catkin package, as that makes it possible for Hydro users to use the more up-to-date Indigo version. IIRC, it is hard (but not impossible) to use a 3rd party release from source.

I'll get back to you on Tuesday.

jack-oquin commented 10 years ago

I agree, @piyushk: using normal catkin workspace tools to install and build the correct source tree from a 3rd-party release repository is absurdly complex.

piyushk commented 10 years ago

@jack-oquin I'm working on this now. Can you fork the https://github.com/OpenKinect/libfreenect library into https://github.com/ros-drivers? I don't have admin privileges for that organization. Once you've forked the repo, can you add the fork to the freenect team: https://github.com/orgs/ros-drivers/teams/freenect-maintainers

mikeferguson commented 10 years ago

@piyushk just forked and added it for you.

piyushk commented 10 years ago

Thanks @mikeferguson!

piyushk commented 10 years ago

I've now got indigo version for ros wrapper around v0.5.1 for libfreenect up on github, and an indigo-devel branch for the freenect_stack package. These packages work with the old kinect for xbox, but I don't have the newer sensors to test it out.

@mirzashah, @stefie10, @salsaman, @ccsmart: Can one of you guys test if the new sensor is working and get back to me? In the meantime, I'll order one of the new sensors.

Note that the following instructions will only work on Ubuntu 14.4 (Trusty). The version of libusb is not up to date on Precise to compile libfreenect. If you'd like help building on Precise, ping me for instructions on this thread.

Instructions to get this to work on Indigo:

sudo apt-get purge ros-indigo-libfreenect ros-indig-freenect-stack
mkdir -p ~/freenect_ws/src
cd ~/freenect_ws/src
wstool init
wstool set freenect_stack --git https://github.com/ros-drivers/freenect_stack.git --version-new indigo-devel
wstool set libfreenect --git https://github.com/ros-drivers/libfreenect.git --version-new ros-devel
wstool update
cd ~/freenect_ws
source /opt/ros/indigo/setup.bash
catkin_make_isolated --install
source install_isolated/setup.bash
roslaunch freenect_launch freenect.launch

A few things might change between now and the final release. I just want to verify that the new Kinect sensor works here.

salsaman commented 9 years ago

Hello, trying to test this now. What are the current instructions to test ? I tried following piyushk steps above, but I got an error:

sudo apt-get purge ros-indigo-libfreenect ros-indig-freenect-stack mkdir -p ~/freenect_ws/src cd ~/freenect_ws/src wstool set freenect_stack --git https://github.com/ros-drivers/freenect_stack.git --version-new indigo-devel

ERROR in config: Command requires a target workspace.

Edit: seems there was a "ws init" missing.

salsaman commented 9 years ago

Yes there were some odd things with it not finding headers *, but it is working now !

jack-oquin commented 9 years ago

What is the advantage of using build_type cmake, instead of catkin? Is that mainly to minimize changes to the CMakeLists.txt?

I recommend moving the README.md to another file, where it can be referenced from a new one that explains why this version is specialized as a ROS package.

piyushk commented 9 years ago

@jack-oquin Could you elaborate on your comment a bit. I'm not sure I quite follow what you meant here.

jack-oquin commented 9 years ago

The existing README.md is for the original OpenKinect/libfreenect repository. Leaving it here will confuse people. Their original README should be retained under some other name, like README_OpenKinect.

We should add our own README, explaining what we have done and why.

piyushk commented 9 years ago

@jack-oquin: Using build type cmake does minimize changes to CMakeLists.txt, but also allows for building packages outside the ROS ecosystem. I would recommend doing so for any code that does not have a true ROS dependency.

That's a good point about the README. I will update it once I've got a working release (and before I close this issue).

piyushk commented 9 years ago

@salsaman Thanks for testing! It should have resolved those headers automatically. I'm assuming there was a temporary snafu with workspace sourcing. I'll try to get the release out ASAP.

salsaman commented 9 years ago

Great ! Any chance of fixing openni now, so we can start doing object detection :-D ?

jack-oquin commented 9 years ago

Piyush: I agree about making minimal changes, and that no unnecessary ROS dependencies should be introduced.

Adding package.xml does no harm.

Don't forget that we had to patch many header references to make the header installation ROS-compliant.

piyushk commented 9 years ago

PR for new indigo debs: https://github.com/ros/rosdistro/pull/7036 https://github.com/ros/rosdistro/pull/7037

ccsmart commented 9 years ago

Greetings and thanks for your time. Was this implemented ? Currently trying on armhf Trusty / Indigo but appears to not be. Is there a test version maybe ? Thanks

On 20.10.2014 21:06, Piyush Khandelwal wrote:

I'll look into updating ros-indigo-libfreenect to 0.5.0 or 0.4.3 later this week.

— Reply to this email directly or view it on GitHub https://github.com/ros-drivers/freenect_stack/issues/12#issuecomment-59822167.

piyushk commented 9 years ago

@ccsmart It's been implemented, but the Indigo sync hasn't happened yet, and you're probably still using the old debs. Tully said it would be on Monday. In the meantime, you can try the shadow-fixed ROS repository.