Hello everyone,
I’m trying to implement Skeleton Tracking with a RealSense D435i depth camera connected via USB-C to an Oculus Quest VR headset, using the Nuitrack SDK for Unity.
So far I have personally tested and confirmed that the depth camera and the RealSense SDK is compatible with the Oculus Quest, as is documented here and here.
For this skeleton tracking project though, I attempt to skip completely the RealSense SDK and use the Nuitrack SDK instead, without luck so far. The skeleton does not show up, the RealSense sensor is not initialized (no IR pattern projected) and the logcat output is this:
InitNuitrackLibraries() starts.
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 48)
Nuitrack callback: onInitFailure
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 48)
Exception: UnityEngine.AndroidJavaException: java.lang.NullPointerException: Attempt to read from field 'android.content.pm.ServiceInfo android.content.pm.ResolveInfo.serviceInfo' on a null object reference
at UnityEngine.AndroidJNISafe.CheckException () [0x00091] in <549ed8055ed14737ac3b841d26182fec>:0
at UnityEngine.AndroidJNISafe.CallStaticVoidMethod (System.IntPtr clazz, System.IntPtr methodID, UnityEngine.jvalue[] args) [0x00011] in <549ed8055ed14737ac3b841d26182fec>:0
at UnityEngine.AndroidJavaObject._CallStatic (System.String methodName, System.Object[] args) [0x00036] in <549ed8055ed14737ac3b841d26182fec>:0
at UnityEngine.AndroidJavaObject.CallStatic (System.String methodName, System.Object[] args) [0x00001] in <549ed8055ed14737ac3b841d26182fec>:0
at NuitrackLoader.InitNuitrackLibraries () [0x00045] in <9d623a2bde8a41b9b8be63a499144ed4>:0
.
.
// Unrelated Oculus stuff //
.
.
Unable to find libnuitrack
Unable to find nuitrack
DllNotFoundException: libnuitrack
at (wrapper managed-to-native) nuitrack.NativeImporter.nuitrack_InitializeFromConfig(string)
at nuitrack.NativeNuitrack.Init (System.String config) [0x00000] in <e994b21777124ea9bce8f91cd774f163>:0
at nuitrack.Nuitrack.Init (System.String config, nuitrack.Nuitrack+NuitrackMode mode) [0x00029] in <e994b21777124ea9bce8f91cd774f163>:0
at NuitrackManager.NuitrackInit () [0x0005f] in <9d623a2bde8a41b9b8be63a499144ed4>:0
at NuitrackManager.OnApplicationPause (System.Boolean pauseStatus) [0x0004f] in <9d623a2bde8a41b9b8be63a499144ed4>:100:
Apparently something is failing when the Nuitrack.init()
java function is called from the NuitrackLoader.cs script at the beginning of the game, triggering the NuitrackCallback.onInitFailure()
callback.
When I printed the NuitrackLoader.initState
variable inside the onInitFailure
callback, I got the value INIT_NUITRACK_MANAGER_NOT_INSTALLED
, which is to be expected, since onInitSuccess()
, which is the only function that changes the initState
to INIT_OK
is never called.
What could be preventing onInitSuccess
from running ? What is the meaning of this
java.lang.NullPointerException: Attempt to read from field ‘android.content.pm.ServiceInfo android.content.pm.ResolveInfo.serviceInfo’ on a null object reference
null reference exception?
Any help from the Nuitrack dev team would be greatly appreciated !!
Extra Notes:
- I am working with the First Project > BasicSkeleton scene.
- I have included the android .so libraries in my project (libmiddleware.so, libnuitrack.so and libOpenNI.so) and placed them inside Assets>NuitrackSDK>Nuitrack>Nuitrack Assembly, alongside the default plugins coming with the Unity package.
- I have sideloaded the Nuitrack.apk on my Oculus Quest, but this doesn’t seem to make things better.
- I build the project for Android 7.1 (API Level 25) since this is the one supported by the Quest.
- I am using Unity 2019.1.4f
- The project runs fine when targeting Windows, and connecting the D435i to the PC