I am trying to use a prerecorded .bag file as input to Nuitrack in Unity instead of a RealSense camera. To do so I have changed the FileRecord module of the nuitrack.config file to the exact path of the desired .bag file. The code is as follows:
“FileRecord”: ““C:\Users\johns\Dropbox\PC\Documents\20210928_174406.bag””,
However when I run Nuitrack after giving it the new path, the Realsesnse depth camera is still used as the input. If I unplug the camera, I get the following error:
nuitrack.ModuleNotInitializedException: NuitrackException (ModuleNotInitializedException): Can’t create DepthSensor module
AstraProPerseeDepthProvider: Can’t open device ( DeviceOpen using default: no devices found)
AzureKinectDepthProvider: No devices detected
OpenNI2DepthProvider: Can’t open device ( DeviceOpen using default: no devices found
Am I taking the wrong aproach to using a bag file as an input? Any help would be appreciated.
I am using Unity 2018.4.11 and the latest version of Nuitrack.
Hello @Stepan.Reuk
Thanks for your quick reply. I’ve just tried replacing the backslashes with forward slashes as you suggested but now when I press run the Unity just closes and I don’t know why, any thought?
Also, when I look in NuitrackScrips, there is no “Use record file” in the NuitrackManager section. Could it be because of the version of Unity I am using?
@Stepan.Reuk
I tried dowloading and importing the newest version of the NuitrackSDK.unitypackage to my project but many errors occured so I tried installing and transferring my project to Unity 2021.1.13 thinking that might some it but I still get the following errors when trying to import the new package:
@Stepan.Reuk
… or, now that I have upgraded to the newest version of Unity, when I put the .bag file path into the nuitrack.config FileRecord module I get the following error:
@Stepan.Reuk
I have now changed the bag file to a recording that has depth, color and infrared streams and I am now getting the same problem as previously where Unity seems to just close/crash when I hit run with no error or crash message. Any thoughts?
Hello @john
Your file does not work correctly with us either (on windows, but for some reason it works fine on linux). We also see errors when playing it in realsense viewer. Try writing a small file with only the color and depth streams. You can also experiment with other settings when recording