Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix script of Azure Kinect Body Tracking SDK sample program for Unity #62

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

UnaNancyOwen
Copy link

This pull request will change the following two things.
It will allow the sample program to work correctly.

  • Change TrackerProcessingMode To Cuda
    This project currently only works with CUDA execution provider.
    Azure Kinect Body Tracking SDK default processing mode (Gpu) is changed to DirectML execution provider.
    Therefor, It is nessesary to specify CUDA execution provider explicitly in this project.

  • Fix Copy Dependencies
    Fix file name cudnn_cnn_infer64_8.dll and cudnn_ops_infer64_8.dll.
    Add missing file cufft64_110.dll.

This project currently only works with CUDA execution provider.
Azure Kinect Body Tracking SDK default processing mode (Gpu) is changed to DirectML execution provider.
Therefor, It is specify CUDA execution provider explicitly in this project.
Fix file name cudnn_cnn_infer64_8.dll and cudnn_ops_infer64_8.dll.
Add missing file cufft64_110.dll.
@Fenikkel
Copy link

Fenikkel commented Jul 7, 2021

Hi! We should do the instalation before or after the branch pull?
Instructions -> (https://github.com/microsoft/Azure-Kinect-Samples/tree/master/body-tracking-samples/sample_unity_bodytracking)

adenprince added a commit to adenprince/unity-azure-kinect-motion-capture that referenced this pull request Sep 27, 2021
@MSDNAndi
Copy link

MSDNAndi commented Dec 7, 2021

I cannot confirm that GPU mode does not work (after copying a lot of dependencies both in Plugins and project root folder).

@leGITplease
Copy link

@UnaNancyOwen

Hi guys, i am not experienced in using git but maybe you could help me out please?
Im experiencing the same issue:
"catching exception for background thread result = K4A_RESULT_FAILED UnityEngine.Debug:Log(Object)"

Im relatively unexperienced in using git and i could spend a day trying to figure this out (i use git bash btw) but im just gonna give it a shot asking the right question:

From what i understand i should use a pull request: '""This pull request will change the following two things."

I do understand how to clone to my local desktop.

  1. Is pulling cloning? Im asking because i found the following picture:

afbeelding

  1. Will this pull request edit the existing file i cloned from: https://github.com/microsoft/Azure-Kinect-Samples.git or replace it for instance?

3.What should i enter as a reference adress to pull from? And what will i pull?

thank you

@MSDNAndi
Copy link

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests

A pull request simplified is a change someone is proposing and requesting it to be merged eventually if approved.

The naming is weird when coming from a non-GitHub world. It is not you pulling what you need.

@leGITplease
Copy link

leGITplease commented Dec 22, 2021

Thank you, i am starting to understand more of this topic.

So.. im gonna delete the local repository and just clone this(https://github.com/UnaNancyOwen/Azure-Kinect-Samples.git) one onto my local machine: edit <- Well, that does not work.. i have the same error: "catching exception for background thread result = K4A_RESULT_FAILED UnityEngine.Debug:Log(Object)"

So what im guessing is that UnaNacyOwen's repo does not have the changes found here() since the SkeletalTrackingProvider script still has the same TrackerProcessingMode.Gpu while i have read it should be cuda.

This should mean that the repository above which i cloned does not have the changes found here(#62). So i am trying to find a way to get those changes in my project.

I think i have 2 options(can anyone confirm, am i on the correct path?):

  1. Merge these(ef9f8e4, 115f27b, 984a95f) 3 commits with my local repo cloned from ((https://github.com/UnaNancyOwen/Azure-Kinect-Samples.git))?

  2. Do the changes in these 3 commits(ef9f8e4, 115f27b, 984a95f) manually?

@UnaNancyOwen
Copy link
Author

@leGITplease

git clone https://github.com/UnaNancyOwen/Azure-Kinect-Samples.git
cd Azure-Kinect-Samples
git checkout fix_script

@leGITplease
Copy link

@leGITplease

git clone https://github.com/UnaNancyOwen/Azure-Kinect-Samples.git
cd Azure-Kinect-Samples
git checkout fix_script

thank you!

I did all the changes by hand and its all working by now but thanks i will start to learn more on how to use github and start to do this stuff like i supposed to.

@kvibert
Copy link

kvibert commented Jan 11, 2022

@leGITplease

git clone https://github.com/UnaNancyOwen/Azure-Kinect-Samples.git
cd Azure-Kinect-Samples
git checkout fix_script

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

图片

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 18362.1256
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.3.0f1

Additional context
k4aviewer and k4abt_simple_3d_viewer works flawlessly.

@leGITplease
Copy link

leGITplease commented Jan 12, 2022

@leGITplease

git clone https://github.com/UnaNancyOwen/Azure-Kinect-Samples.git
cd Azure-Kinect-Samples
git checkout fix_script

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

图片

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 18362.1256
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.3.0f1

Additional context k4aviewer and k4abt_simple_3d_viewer works flawlessly.

it seems(im not sure) you have the same error message as i had..

To fix it i i used these 3 commits(ef9f8e4, 115f27b, 984a95f) and incorporated them manually.

Maybe the git checkout fix_script did not work correctly?

@kvibert
Copy link

kvibert commented Jan 13, 2022

@leGITplease

git clone https://github.com/UnaNancyOwen/Azure-Kinect-Samples.git
cd Azure-Kinect-Samples
git checkout fix_script

unity Example stops at init, catching exception for background thread result = K4A_RESULT_FAILED
图片
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 18362.1256
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.3.0f1

Additional context k4aviewer and k4abt_simple_3d_viewer works flawlessly.

it seems(im not sure) you have the same error message as i had..

To fix it i i used these 3 commits(ef9f8e4, 115f27b, 984a95f) and incorporated them manually.

Maybe the git checkout fix_script did not work correctly?

Yes, after I checkout your fix_script, the exception is still there.

@leGITplease
Copy link

@leGITplease

git clone https://github.com/UnaNancyOwen/Azure-Kinect-Samples.git
cd Azure-Kinect-Samples
git checkout fix_script

unity Example stops at init, catching exception for background thread result = K4A_RESULT_FAILED
图片
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 18362.1256
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.3.0f1

Additional context k4aviewer and k4abt_simple_3d_viewer works flawlessly.

it seems(im not sure) you have the same error message as i had..
To fix it i i used these 3 commits(ef9f8e4, 115f27b, 984a95f) and incorporated them manually.
Maybe the git checkout fix_script did not work correctly?

Yes, after I checkout your fix_script, the exception is still there.

you could do the changes manually..

Copy link

@leventalpsal leventalpsal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that, with only these changes, and using Azure Kinect Body Tracking SDK 1.1.0 (not 1.1.1) and Unity 2020.3.9 , body tracking works (with TrackerProcessingMode.Cuda).

@MoritzSkowronski
Copy link

I cannot confirm this, as I am getting the same K4A error as ever. Tried it using different Unity versions (2019.1.2f1 and 2020.3.32f1) and different Body Tracking SDKs (1.1.1, 1.1.0, 1.0.1)

@leventalpsal
Copy link

Have you :
installed sensor SDK too,
run the NuGet Package Manager-> Package Manager Console -> Update-Package -reinstall
apply these changes, then run the MoveLibraryFile.bat ?

@MoritzSkowronski
Copy link

I've figured it out: I did not use a device with a NVIDIA GPU, so this is why CUDA probably did not work ;)

Testet it now on a RTX 3070 machine and works fine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants