Microsoft.Azure.Kinect.BodyTracking icon indicating copy to clipboard operation
Microsoft.Azure.Kinect.BodyTracking copied to clipboard

Trying to make it work with Unity.

Open SethKaminski opened this issue 6 years ago • 10 comments

First, thank you for putting this together.

I've been trying to use your wapper and put it into Unity but keep getting "AzureKinectException: Couldn't create tracker".

I'm pretty sure none of your code is the problem but I wanted to know if you're planning on trying to work it into Unity and if you're successful.

SethKaminski avatar Nov 15 '19 16:11 SethKaminski

Does the sample app work for you? You might have to create a software instance if your gpu doesn't support CUDA

dotMorten avatar Nov 15 '19 17:11 dotMorten

Ya, It works great but Unity is having a problem with it.

SethKaminski avatar Nov 15 '19 17:11 SethKaminski

Are the native libs all getting deployed? Try also inspecting the exception. Sometimes there's more details/log into in the errors k4a throws.

dotMorten avatar Nov 15 '19 17:11 dotMorten

I'm going to confirm that CUDA is installed properly and then see what more information I can get out of the exception/problem.

SethKaminski avatar Nov 15 '19 17:11 SethKaminski

The sample app is configured to require CUDA, so if that works, you should be good there. My guess is the native libs aren't getting deployed correctly.

dotMorten avatar Nov 15 '19 18:11 dotMorten

[2019-11-18 14:26:31.794] [info] [t=19312] [K4ABT] D:\a\1\s\src\TrackerHost\TrackerHost.cpp (482): VerifyDependencies(). Verifying Dependencies! [2019-11-18 14:26:31.795] [error] [t=19312] [K4ABT] D:\a\1\s\src\TrackerHost\TrackerHost.cpp (484): VerifyDependencies(). Cannot locate onnxruntime.dll [2019-11-18 14:26:31.795] [error] [t=19312] [K4ABT] D:\a\1\s\src\TrackerHost\TrackerHost.cpp (131): Create(). At least one dependent library is missing! [2019-11-18 14:26:31.795] [error] [t=19312] [K4ABT] D:\a\1\s\src\sdk\k4abt.cpp (38): tracker->Create(sensor_calibration, config) returned failure in k4abt_tracker_create()

So it looks like is can't find onnxruntime.dll

SethKaminski avatar Nov 18 '19 19:11 SethKaminski

onnxruntime.dll and dnn_model_2_0.onnx must be in the same folder as Assets

SethKaminski avatar Nov 18 '19 19:11 SethKaminski

@SethKaminski I see. So it works now? I'm curious what the nuget package can do to ensure that happens? The nuget support in Unity has always been a little weird to me

dotMorten avatar Nov 18 '19 20:11 dotMorten

Yes, it finally works. Sadly nuget doesn't natively work with Unity since it controls what happens with the C# side of the project.

SethKaminski avatar Nov 19 '19 11:11 SethKaminski

Awesome! Would you mind documenting the steps you used to make it work, so others can follow them?

dotMorten avatar Nov 20 '19 00:11 dotMorten