Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Unity BodyTracking Sample catching exception for background thread result = K4A_RESULT_FAILED #1600

Closed
naotoerg opened this issue May 18, 2021 · 4 comments
Assignees
Labels
Bug Something isn't working Code Sample This issue is related to a code sample

Comments

@naotoerg
Copy link

naotoerg commented May 18, 2021

Describe the bug

unity Example stops at init, catching exception for background thread result = K4A_RESULT_FAILED

I have found possible typo on MoveLibraryFiles.bat.
copy %BODY_TRACKING_TOOLS_PATH%cudnn64_cnn_infer64_8.dll./ copy %BODY_TRACKING_TOOLS_PATH%cudnn64_ops_infer64_8.dll
Azure Kinect Body Tracking SDK did not have such two files.
But it had

cudnn_ops_infer64_8.dll
cudnn_cnn_infer64_8.dll

Unfortunately fixing these two possible typo didn't fix the K4A_RESULT_FAILED issue.

SharedScreenshot png

To Reproduce
Execute all the steps on the readme.
open sample scene on unity and play.

Desktop (please complete the following information):

  • OS with Version:Windows 19042.928
  • SDK Version: Azure Kinect SDK v1.4.1 / Azure Kinect Body Tracking SDK v1.1.0
  • Firmware version: Current Firmware Versions:
    RGB camera firmware: 1.6.102
    Depth camera firmware: 1.6.75
    Depth config file: 6109.7
    Audio firmware: 1.6.14
    Build Config: Production
    -Unity Version: 2019.1.14f1

Additional context
k4aviewer and k4abt_simple_3d_viewer works flawlessly.

@naotoerg naotoerg added Bug Something isn't working Code Sample This issue is related to a code sample Triage Needed The Issue still needs to be reviewed by Azure Kinect team members. labels May 18, 2021
@naotoerg
Copy link
Author

I got the sample project working.
Not really a solution but, I copied all the dlls from the SDK to the unity project and now it works.
I assume that the batch file is missing some files to copy.

@WhimsicalToyBox
Copy link

It's not a radical measure, but if you use TrackerProcessingMode.Cuda instead of TrackerProcessingMode.Gpu when initializing Tracker, it will work for the time being.

https://github.com/microsoft/Azure-Kinect-Samples/blob/master/body-tracking-samples/sample_unity_bodytracking/Assets/Scripts/SkeletalTrackingProvider.cs#L46

@qm13 qm13 removed the Triage Needed The Issue still needs to be reviewed by Azure Kinect team members. label May 20, 2021
@qm13 qm13 self-assigned this May 20, 2021
@naotoerg
Copy link
Author

naotoerg commented May 21, 2021

It's not a radical measure, but if you use TrackerProcessingMode.Cuda instead of TrackerProcessingMode.Gpu when initializing Tracker, it will work for the time being.

https://github.com/microsoft/Azure-Kinect-Samples/blob/master/body-tracking-samples/sample_unity_bodytracking/Assets/Scripts/SkeletalTrackingProvider.cs#L46

Thank you for the tip!
Cuda mode works a lot faster then GPU mode!

To run the sample in Cuda mode, you still need to copy some dlls by hand.

copying these three from the SDK folder to the root of the project worked for me

cudnn_ops_infer64_8.dll
cudnn_cnn_infer64_8.dll
cufft64_10.dll

@UnaNancyOwen
Copy link
Contributor

This problem will be solved with microsoft/Azure-Kinect-Samples#62.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working Code Sample This issue is related to a code sample
Projects
None yet
Development

No branches or pull requests

4 participants