Skip to content

Commit

Permalink
updated body tracking SDK to 0.9.5
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterverweirder committed Dec 22, 2019
1 parent d5deecc commit 27c6b6b
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/kinect-azure.js
Expand Up @@ -81,7 +81,7 @@ class KinectAzure {
}
{
KinectAzure.K4ABT_JOINT_PELVIS = 0,
KinectAzure.K4ABT_JOINT_SPINE_NAVAL = 1,
KinectAzure.K4ABT_JOINT_SPINE_NAVEL = 1,
KinectAzure.K4ABT_JOINT_SPINE_CHEST = 2,
KinectAzure.K4ABT_JOINT_NECK = 3,
KinectAzure.K4ABT_JOINT_CLAVICLE_LEFT = 4,
Expand Down
6 changes: 3 additions & 3 deletions lib/settings.js
Expand Up @@ -2,9 +2,9 @@ const path = require('path');

module.exports = () => {
const KINECT_SENSOR_SDK_URL = 'https://www.nuget.org/api/v2/package/Microsoft.Azure.Kinect.Sensor/1.3.0';
const KINECT_BODY_TRACKING_SDK_URL = 'https://www.nuget.org/api/v2/package/Microsoft.Azure.Kinect.BodyTracking/0.9.4';
const KINECT_BODY_TRACKING_DEPENDENCIES_URL = 'https://www.nuget.org/api/v2/package/Microsoft.Azure.Kinect.BodyTracking.Dependencies/0.9.0';
const KINECT_CUDNN_URL = 'https://www.nuget.org/api/v2/package/Microsoft.Azure.Kinect.BodyTracking.Dependencies.cuDNN/0.9.0';
const KINECT_BODY_TRACKING_SDK_URL = 'https://www.nuget.org/api/v2/package/Microsoft.Azure.Kinect.BodyTracking/0.9.5';
const KINECT_BODY_TRACKING_DEPENDENCIES_URL = 'https://www.nuget.org/api/v2/package/Microsoft.Azure.Kinect.BodyTracking.Dependencies/0.9.1';
const KINECT_CUDNN_URL = 'https://www.nuget.org/api/v2/package/Microsoft.Azure.Kinect.BodyTracking.Dependencies.cuDNN/0.9.1';

const TARGET_SDK_DIR = path.resolve(__dirname, '../sdk');
const TARGET_KINECT_SENSOR_SDK_ZIP = path.resolve(TARGET_SDK_DIR, 'sensor-sdk.zip');
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "kinect-azure",
"version": "0.0.7",
"version": "0.0.8",
"description": "Nodejs library to access the azure kinect data from the official SDK",
"repository": "https://github.com/wouterverweirder/kinect-azure",
"main": "lib/kinect-azure.js",
Expand All @@ -16,6 +16,8 @@
},
"scripts": {
"install": "node ./scripts/install.js && node-gyp rebuild",
"clean": "node ./scripts/clean.js",
"reinstall": "npm run clean && npm run install",
"prepublishOnly": "rimraf ./examples/**/node_modules"
},
"gypfile": true,
Expand Down
18 changes: 18 additions & 0 deletions scripts/clean.js
@@ -0,0 +1,18 @@
const fs = require('fs-extra');
const path = require('path');
const settings = require('../lib/settings.js')();

const init = async () => {
await fs.remove(settings.TARGET_SDK_DIR);

const appRoot = process.cwd().split('/node_modules')[0];
const { appRootDlls } = settings;
for (const dllName in appRootDlls) {
if (appRootDlls.hasOwnProperty(dllName)) {
const dllTargetPath = path.resolve(appRoot, dllName);
await fs.remove(dllTargetPath);
}
}
};

init();
4 changes: 3 additions & 1 deletion src/kinect_azure.cc
Expand Up @@ -418,7 +418,8 @@ Napi::Value MethodStartListening(const Napi::CallbackInfo& info) {
k4a_wait_result_t queue_capture_result = k4abt_tracker_enqueue_capture(g_tracker, sensor_capture, 0);
if (queue_capture_result == K4A_WAIT_RESULT_FAILED)
{
// printf("[kinect_azure.cc] Error! Add capture to tracker process queue failed!\n");
k4a_capture_release(sensor_capture);
mtx.unlock();
break;
}

Expand Down Expand Up @@ -480,6 +481,7 @@ Napi::Value MethodStartListening(const Napi::CallbackInfo& info) {

if (!is_listening)
{
mtx.unlock();
break;
}
// Perform a blocking call
Expand Down

0 comments on commit 27c6b6b

Please sign in to comment.