Bug 752481 - openni- does not work with kinect
Summary: openni- does not work with kinect
Alias: None
Product: Fedora
Classification: Fedora
Component: 0xFFFF
Version: 16
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Tim Niemueller
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2011-11-09 16:22 UTC by Gabor Papp
Modified: 2012-01-16 11:36 UTC (History)
2 users (show)

Fixed In Version: openni-primesense-
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-12-31 20:25:54 UTC

Attachments (Terms of Use)

Description Gabor Papp 2011-11-09 16:22:01 UTC
Description of problem:
openni and openni-primesense don't work with kinect

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. sudo yum install openni* --enablerepo=u*g
2. connect kinect
3. start NiSimpleViewer
Actual results:
$ NiSimpleViewer
Open failed: Device Protocol: Bad Parameter sent!

Expected results:
Window opened with kinect images.

Additional info:
last time the rpms were working for me in F14 with openni-1.0.0

in F16 openni- gives the following result:
$ NiSimpleViewer 
Open failed: Error!

the device works with libfreenect

Comment 1 Tim Niemueller 2011-11-09 16:35:38 UTC
Works just fine here, but using x86_64 on F-14 and F-15. Do you have access to such a machine to test?

Can you check if /var/lib/ni/modules.xml is not empty (should contain multiple lines, not just one). Upgrades might have brought a problem and I'm trying to solve this.

Can you please also remove the openni packages and re-install them and test again, please.

Comment 2 Gabor Papp 2011-11-09 17:03:12 UTC
Thank you for the quick reply.

I only tried on i686 machines with similar results, but I will try installing F15 x64_64 soon.

/var/lib/ni/modules.xml seems to be fine:
$ cat /var/lib/ni/modules.xml 
    <Module path="/usr/lib/libnimMockNodes.so" />
    <Module path="/usr/lib/libnimCodecs.so" />
    <Module path="/usr/lib/libnimRecorder.so" />
    <Module path="/usr/lib/libXnDeviceSensorV2.so" />
    <Module path="/usr/lib/libXnDeviceFile.so" />

although I'm not sure about the version of the registered modules:

$ niReg -l
       21 INFO       OpenNI version is 1.3.2 (Build 1)-Linux-x86 (Oct 18 2011 09:53:00)
       68 INFO       Filter Info - minimum severity: ERROR, masks: NONE
       76 INFO       Filter Info - minimum severity: WARNING, masks: NONE
       83 INFO       Filter Info - minimum severity: WARNING, masks: ALL
OpenNI version is

Registered modules:

(compiled with OpenNI
	Script: OpenNI/OpenNI/
/usr/lib/libnimMockNodes.so (compiled with OpenNI
	ProductionNode: OpenNI/Mock/
	Generator: OpenNI/Mock/
	MapGenerator: OpenNI/Mock/
	Device: OpenNI/Mock/
	Depth: OpenNI/Mock/
	IR: OpenNI/Mock/
	Image: OpenNI/Mock/
	Audio: OpenNI/Mock/

/usr/lib/libnimCodecs.so (compiled with OpenNI
	Codec: OpenNI/16zP/
	Codec: OpenNI/16zT/
	Codec: OpenNI/Im8z/
	Codec: OpenNI/JPEG/
	Codec: OpenNI/NONE/

/usr/lib/libnimRecorder.so (compiled with OpenNI
	Recorder: OpenNI/Recorder/
	Player: OpenNI/Player/

/usr/lib/libXnDeviceSensorV2.so (compiled with OpenNI
	Device: PrimeSense/SensorV2/
	Depth: PrimeSense/SensorV2/
	Image: PrimeSense/SensorV2/
	IR: PrimeSense/SensorV2/
	Audio: PrimeSense/SensorV2/

/usr/lib/libXnDeviceFile.so (compiled with OpenNI
	Player: PrimeSense/File/

This shows that the sensor was compiled with an earlier OpenNI version which can cause problems, can't it?

Also is PrimeSense sensor supposed to work with the kinect? I assume it is if it works for you, although it seemed to me that SensorKinect by avin2 is required for this.

Comment 3 Gabor Papp 2011-11-09 17:46:37 UTC
I quickly tried with the F16 x86_64 live cd, and the result was the same.

$ NiSimpleViewer
Open failed: Device Protocol: Bad Parameter sent!

removing/reinstalling on F16 i686 didn't help either unfortunately.

Comment 4 Tim Niemueller 2011-11-09 21:49:45 UTC
I'll try this tomorrow on a machine which has never seen the Kinect before to see if I can reproduce the problem there.

The primesense packages contains the patches by Willow Garage (from ROS) which enable it to work with the Kinect. I have tried a newer version of the primesense package but that didn't work for me.

Comment 5 Gabor Papp 2011-11-10 10:11:26 UTC
Thanks. Meanwhile I managed to compile the latest OpenNI from source, which works.

OpenNI unstable (b8a2e793) with the libusb_detach_kernel_driver patch by elpaquete from https://github.com/OpenNI/OpenNI/pull/34

avin2 SensorKinect unstable (2d139677) from https://github.com/avin2/SensorKinect.git

Comment 6 Tim Niemueller 2011-11-19 00:16:45 UTC
I have checked this with a new Kinect on a new machine, it indeed fails. However, using the exact same OpenNI and primesense drivers works when running it with Fawkes (openni-enabled version not yet in the repos). I'll try the newer version you suggested next week. avin2 might be pushed by someone else who is working on a package and we aim at compatibility/coexistence of both, the original primesense and the akin2 driver in the system.

Comment 7 Gabor Papp 2011-11-19 16:46:07 UTC
Thanks. I updated the rpm for the latest git version and made a koji scratch build for f15 and f16 that might help you. Please feel free to use it:

I haven't found the avin2 sensorkinect driver package anywhere. I'm planning to make one based on your primesense driver.

About Fawkes, does this mean that if i build Fawkes from source and install it kinect and openni will work in other applications?

Comment 8 Tim Niemueller 2011-12-15 12:31:56 UTC
I have tracked down the problem. It happens when registering the depth to the image data, i.e. if you set an alternate viewpoint such that the depth data is transformed into the camera's frame. We did not do this in Fawkes for a while since we worked on depth/point cloud data only.

I will now try your package and issue an update if that works for my test cases. Have you created an avin2 package that is compatible with the primesense package (installable in parallel)?

Comment 9 Gabor Papp 2011-12-15 13:32:21 UTC
Great! Yes, I built the avin2 rpm. You can find it here along with the openni srpm: http://kibu.hu/~gabor/rpms/

Comment 10 Tim Niemueller 2011-12-23 01:42:46 UTC
I have now a working combination of openni and openni-primesense Newer (stable and unstable) versions just break for me and produce no or broken output. These are the same versions currently used for ROS and the package contains some of their patches, so I'm pretty confident these versions are good. SSE needs to be disabled. Issuing updates shortly. Please test and provide karma. Happy holidays.

Comment 11 Fedora Update System 2011-12-23 01:45:09 UTC
openni-primesense-,openni- has been submitted as an update for Fedora 15.

Comment 12 Fedora Update System 2011-12-23 01:45:41 UTC
openni-primesense-,openni- has been submitted as an update for Fedora 16.

Comment 13 Fedora Update System 2011-12-23 22:20:04 UTC
Package openni-primesense-, openni-
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing openni-primesense- openni-'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 14 Fedora Update System 2011-12-31 20:25:34 UTC
openni-primesense-, openni- has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2011-12-31 20:25:54 UTC
openni-primesense-, openni- has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 Gabor Papp 2012-01-16 11:36:04 UTC
At last I had time to test openni and primesense and I'm happy to report that it works fine. Thank you!

Note You need to log in before you can comment on or make changes to this bug.