Azure Kinect Body Tracking With Unity3D

대호 최 1 Reputation point
2022-09-07T03:30:24.17+00:00

I'm using Unity3D and Azure Kinect DK.
I set up Azure Kinect Body Tracking SDK and set dlls In Plugins folder.
I saw guide page

https://github.com/microsoft/Azure-Kinect-Samples/tree/master/body-tracking-samples/sample_unity_bodytracking

when i play Unity3D, creating Trakcer is Failed with following error message.

AzureKinectBodyTrackingCreateException: result = K4A_RESULT_FAILED
Microsoft.Azure.Kinect.BodyTracking.Tracker.Create (Microsoft.Azure.Kinect.Sensor.Calibration calibration, Microsoft.Azure.Kinect.BodyTracking.TrackerConfiguration configuration) (at C:/source/src/csharp/Microsoft.Azure.Kinect.BodyTracking/Tracker.cs:32)
KinectCtrl.initKinect () (at Assets/Scripts/Kinect/KinectCtrl.cs:53)
KinectCtrl.Start () (at Assets/Scripts/Kinect/KinectCtrl.cs:29)

anyone knows what this error and how i can fix this error?
anyone knows sample code for Unity3D and Azure Kinect DK body tracking.
i wanna someone's help.

thank you.

Azure Kinect DK
Azure Kinect DK
A Microsoft developer kit and peripheral device with advanced artificial intelligence sensors for sophisticated computer vision and speech models.
287 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. QuantumCache 20,031 Reputation points
    2022-09-26T20:46:54.263+00:00

    Hello @대호 최 ,

    Sample Unity Body Tracking Application
    Azure Kinect Body Tracking Unity Integration

    This is similar to the reported Github issues as listed here, I hope they may be helpful for the initial query.

    Azure Kinect known issues and troubleshooting

    Reference : Tracker.Create fails on Unity

    The onnxruntime.dll should be at the same location of the k4abt.dll. Could you check whether it is the case in your project? accidentally load the onnxruntime.dll at the system32 folder (The system32 onnxruntime.dll doesn't have some functionalities we need). In the new design, we require the onnxruntime.dll to be placed at the same folder as the k4abt.dll. Please place both of them at the Assets/Plugins folder and give it a try. The logging system should work as long as you are using the k4a.dll and k4abt.dll. Could you try to modify your system environmental variable to add these two line? (In addition to K4A_ENABLE_LOG_TO_A_FILE and K4A_LOG_LEVEL, you need to use separate environmental varialbe to capture K4ABT logs: K4ABT_ENABLE_LOG_TO_A_FILE and K4ABT_LOG_LEVEL) And also, the log file by default is saved to the executable folder. In your case, if you are in unity running the test scene, you might be able to find it at the folder of unity.exe. Please try to pass in a full file path instead of simply the k4a.log so that it could save to the folder you want. (e.g. use C:\Users\XXX\Desktop\k4abt.log to save it to your desktop)

    place

    cublas64_100.dll
    cudart64_100.dll
    at project's root directory instead of Assets/Plugins.
    Because these DLL files are ignored in git repository,and previously placed at project's root directory,if you are upgrading from previous version,it works(which is evil). BTW,it seems like we need to place onnxruntime.dll both in Assets/Plugins and project's root directory. But onnxruntime.dll at project's root directory is not locked while executing body tracking.

    244909-image.png

    For further support please submit an issue at the Azure Kinect DK Github page.

    0 comments No comments