OpenNI library can't find any module

Mar 28, 2011 at 12:44 AM

Hi there, I'm new to Kinect and have been trying to get your sample project to run, having a little trouble :s

HandPointGenerator during VerifyInit gives the following exception: "OpenNI library can't find any module!"

After some googling, I came across a command in this thread to list the modules OpenNI has installed, the output looks like this:

C:\Users\Craig>nireg -l
OpenNI version is 1.0.0.25.

Registered modules:

C:\Program Files (x86)\OpenNI\bin\nimRecorder.dll (compiled with OpenNI 1.0.0.25):
        Recorder: OpenNI/Recorder/1.0.0.25
        Player: OpenNI/Player/1.0.0.25

C:\Program Files (x86)\OpenNI\bin\nimMockNodes.dll (compiled with OpenNI 1.0.0.25):
        Device: OpenNI/Mock/1.0.0.25
        Depth: OpenNI/Mock/1.0.0.25
        IR: OpenNI/Mock/1.0.0.25
        Image: OpenNI/Mock/1.0.0.25
        Audio: OpenNI/Mock/1.0.0.25

C:\Program Files (x86)\OpenNI\bin\nimCodecs.dll (compiled with OpenNI 1.0.0.25):

        Codec: OpenNI/16zP/1.0.0.25
        Codec: OpenNI/16zT/1.0.0.25
        Codec: OpenNI/Im8z/1.0.0.25
        Codec: OpenNI/JPEG/1.0.0.25
        Codec: OpenNI/NONE/1.0.0.25

C:\Program Files (x86)\Prime Sense\Sensor\Bin\XnDeviceFile.dll (compiled with OpenNI 1.0.0.25):
        Player: PrimeSense/File/1.0.0.25

C:\Program Files (x86)\Prime Sense\Sensor\Bin\XnDeviceSensorV2.dll (compiled with OpenNI 1.0.0.25):
        Device: PrimeSense/SensorV2/5.0.0.25
        Depth: PrimeSense/SensorV2/5.0.0.25
        Image: PrimeSense/SensorV2/5.0.0.25
        IR: PrimeSense/SensorV2/5.0.0.25
        Audio: PrimeSense/SensorV2/5.0.0.25

C:\Program Files (x86)\Prime Sense\NITE\Features\Bin\XnVFeatures.dll (compiled with OpenNI 1.0.0.25):
        Scene: PrimeSense/XnVSceneAnalyzer/1.3.0.18
        User: PrimeSense/XnVSkeletonGenerator/1.3.0.18

C:\Program Files (x86)\Prime Sense\NITE\Hands\Bin\XnVHandGenerator.dll (compiled with OpenNI 1.0.0.25):
        Gesture: PrimeSense/XnVGestureGenrator/1.3.0.18
        Hands: PrimeSense/XnVHandTracker/1.3.0.18

 

Seems like I have the modules registered correctly, any ideas?

Coordinator
Mar 28, 2011 at 1:17 AM

This is an OpenNI error. OpenNI requires you to have a file named openni.xml in a folder named data, which should be where your executable is located. Check the HandTesting sample for an example of this.

Mar 28, 2011 at 1:31 AM
Edited Mar 28, 2011 at 1:37 AM

Thanks for the speedy reply, I think I had it in the correct location:

My openni.xml file looks like this:

<OpenNI>
	<Licenses>
		<License vendor="PrimeSense" key="0KOIk2JeIBYClPWVnMoRKn5cdYr="/>
	</Licenses>
	<Log writeToConsole="true" writeToFile="false">
		<!-- 0 - Verbose, 1 - Info, 2 - Warning, 3 - Error (default) -->
		<LogLevel value="3"/>
		<Masks>
			<Mask name="ALL" on="false"/>
		</Masks>
		<Dumps>
		</Dumps>
	</Log>
	<ProductionNodes>
    <Node type="Image" name="Image1">
      <Configuration>
        <MapOutputMode xRes="640" yRes="480" FPS="30"/>
        <Mirror on="true"/>
      </Configuration>
    </Node>
		<Node type="Depth" name="Depth1">
			<Configuration>
				<MapOutputMode xRes="640" yRes="480" FPS="30"/>
				<Mirror on="true"/>
			</Configuration>
		</Node>
		<Node type="Gesture" />
		<Node type="Hands" />
	</ProductionNodes>
</OpenNI>
Coordinator
Mar 28, 2011 at 1:35 AM

Is your Kinect plugged in? Are you able to run any OpenNI sample applications such as UserTracker.net?

Mar 28, 2011 at 2:12 AM
Edited Mar 28, 2011 at 2:17 AM
joshb wrote:

Is your Kinect plugged in? Are you able to run any OpenNI sample applications such as UserTracker.net?


Yes, it's plugged in and I can run UserTracker.net.exe along with the other sample projects. Maybe I'll try copying your project's output into that directory and see if it makes a difference.

Edit: No difference

Mar 31, 2011 at 7:20 PM

Hmm, I think this may be a problem with my installation, I've recently plugged the Kinect back in after a series of restarts an I now see a new exception message: "Unknown USB device speed!"

Coordinator
Mar 31, 2011 at 7:38 PM

There are some posts on that error on the OpenNI mailing list:

http://groups.google.com/group/openni-dev/search?group=openni-dev&q=unknown+usb+device+speed

Apr 1, 2011 at 8:13 PM

Finally solved this!

I overwrote the OpenNI libs included with the motionfx project with those thay came with the latest OpenNI install and the project now runs.

Maybe those included with the project are the ones prior to the fix they included on the 10th Jan for the USB enumeration bug (https://github.com/OpenNI/OpenNI/commit/4c9ff978637cf1c6d387345657b26373470c1460) ?

 

Coordinator
Apr 17, 2011 at 12:33 AM

craig, yes the distributed versions were the released ones rather than the April 10th one. I'll be upgrading to the latest version of openni soon and will update after it passes tests.