Items with no label
3338 Discussions

queryNumJoints() only returns 0

MMich26
Beginner
7,318 Views

Hi,

I am currently working with the Person Tracking Module using an R200. The personTracking module works successfully, and I can successfully query features like centerMass. However, querying skeleton joints has not been working. To start, I queried the number of joints that my module was currently configured to track.

PXCPersonTrackingData::PersonTracking* personTracking = personData->QueryTracking();

PXCPersonTrackingData::PersonJoints * ptj = personData->QuerySkeletonJoints();int numJoints = ptj->QueryNumJoints();printf("numJoints: %d ", numJoints);

 

The above code outputs 0, no matter which tracking area is selected (AREA_FULL_BODY, AREA_FULL_BODY_ROUGH, AREA_UPPER_BODY, and AREA_UPPER_BODY_ROUGH). Has anyone gotten queryNumJoints to successfully return the number of joints being tracked?

Michael

0 Kudos
24 Replies
MartyG
Honored Contributor III
842 Views

My apologies, I see now from your earlier message that you are using R2.

I would usually expect to see the error messages that you have received if there was a problem with the DLL files in the Plugins and Plugins.Managed folders of the project. For a new project, the folders should look like this, with absolutely nothing in them except those 2 files.

0 Kudos
YLi77
Beginner
842 Views

Hi, MartyG. My Plugins and Plugins.Managed folders are just like yours, using x64 files. Then there are two errors:

Assets/DrawSkeleton.cs(120,67): error CS1061: Type `PXCMPersonTrackingData.Person' does not contain a definition for `QuerySkeletonJoints' and no extension method `QuerySkeletonJoints' of type `PXCMPersonTrackingData.Person' could be found. Are you missing an assembly reference?

Assets/DrawSkeleton.cs(129,25): error CS1061: Type `PXCMPersonTrackingData.PersonJoints' does not contain a definition for `QueryJoints' and no extension method `QueryJoints' of type `PXCMPersonTrackingData.PersonJoints' could be found. Are you missing an assembly reference?

And there is still not "SetTrackingMode" function in PXCMPersonTrackingConfiguration.TrackingConfiguration.

I also tested in Visual Studio. I created a new windows form app project, then added x64 libpxccpp2c.dll and libpxcclr.cs.dll in the project. I found there is still not "SetTrackingMode" function in PXCMPersonTrackingConfiguration.TrackingConfiguration. So, I am very sure that there is not "SetTrackingMode" function for PXCMPersonTrackingConfiguration.TrackingConfiguration in the 2016 R2 SDK for C# .

0 Kudos
MartyG
Honored Contributor III
781 Views

I do not use Unity's implementation of Visual Studio and use the old Monodevelop script editor instead, which you can switch back to at any time in the Unity settings. The reason I do so is because - at the last time I used it in late 2015, at least - the Visual Studio implementation in Unity was very flakey. It complained about the 64-bit architecture and also generated errors that weren't actually errors - it just couldn't understand that Unity uses its own flavor of C# that has instructions that Visual Studio wasn't programmed to understand and so thought they were syntax errors.

I dug up an article I wrote about it at the time that may be useful. It explains how to change Unity's architecture settings to make Visual Studio happier, or switch to Monodevelop as the more stable scripting editor.

https://software.intel.com/en-us/forums/realsense/topic/592461 Unity 5.2 released

0 Kudos
YLi77
Beginner
781 Views

Thanks for your help.

I tried in Visual Studio without Unity. But I still get 0 for queryNumJoints(). And there is not "SetTrackingMode" function for PXCMPersonTrackingConfiguration.TrackingConfiguration class in SDK.

So, the demo codes for Tracking Skeleton Joints on the R2 SDK documentation https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/index.html?doc_pt_tracking_joints.html Intel® RealSense™ SDK 2016 R2 Documentation is not correct for C# . And without "SetTrackingMode" function, I can not fix the problem.

I will try C++ or Java to implementation.

Tracking Skeleton Joints
0 Kudos
Reply