microsoft/Azure-Kinect-Sensor-SDK

Cannot get the tracking in the unity sample to run in build

casncl opened this issue · 1 comments

casncl commented

Describe the Bug
After setting everything up as suggested in the unity samples for the Azure Kinect SDK, the body tracking works fine in editor but the build throws an exception in the log:
"catching exception for background thread result = K4A_WAIT_RESULT_FAILED"
The documentation does not give much information as to what can cause this issue and I couldn't find anything in the existing issues.

To Reproduce
Followed all steps on the README file multiple times, each with this result.

Expected behavior
I expected a build of the sample project where the body tracking works.

Logs
catching exception for background thread result = K4A_WAIT_RESULT_FAILED
UnityEngine.StackTraceUtility:ExtractStackTrace () (at C:/build/output/unity/unity/Runtime/Export/Scripting/StackTrace.cs:37)
UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:Log (object)
SkeletalTrackingProvider:RunBackgroundThreadAsync (int,System.Threading.CancellationToken) (at C:/Users/user/test2/Azure-Kinect-Samples/body-tracking-samples/sample_unity_bodytracking/Assets/Scripts/SkeletalTrackingProvider.cs:127)
BackgroundDataProvider/<>c__DisplayClass9_0:<.ctor>b__0 () (at C:/Users/user/test2/Azure-Kinect-Samples/body-tracking-samples/sample_unity_bodytracking/Assets/Scripts/BackgroundDataProvider.cs:21)
System.Threading.Tasks.Task:InnerInvoke ()
System.Threading.Tasks.Task:Execute ()
System.Threading.Tasks.Task:ExecutionContextCallback (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.Tasks.Task:ExecuteWithThreadLocal (System.Threading.Tasks.Task&)
System.Threading.Tasks.Task:ExecuteEntry (bool)
System.Threading.Tasks.Task:System.Threading.IThreadPoolWorkItem.ExecuteWorkItem ()
System.Threading.ThreadPoolWorkQueue:Dispatch ()
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()

(Filename: C:/Users/user/test2/Azure-Kinect-Samples/body-tracking-samples/sample_unity_bodytracking/Assets/Scripts/SkeletalTrackingProvider.cs Line: 127)

Desktop:

  • Windows 11
  • Azure Kinect Body Tracking 1.1.2
  • Firmware version: RGB camera firmware: 1.6.110
    Depth camera firmware: 1.6.79

Hey I had a similar problem while reproducing the sample_unity_bodytracking.
My problem was solved by changing the versions to: Untiy Version 2019.1.2f1, Azure Kinect SDKv1.4.1 and the Body Tracking SDK v1.0.1.
If you need more help you can also take a look at the answer in this post: https://learn.microsoft.com/en-us/answers/questions/1340458/how-to-integrate-azure-kinect-bodytracking-in-unit