Welcome to the forum!
Problems with getting a null value from Person Tracking are very common. It was a Preview level feature of the RealSense SDK, meaning that it had limited functionality. Since its release, the RealSense SDK no longer supports the R200 camera after version '2016 R2', so it is unlikely to be developed further.
In the years that this issue has been occurring to numerous people, I have seen hardly any possible solutions. However, I remembered that there was one person who believed that the issue could be fixed "when tracking mode is set to Interactive (It is not mentioned in the documentation ) and also you must enable skeleton tracking (by default skeleton tracking is disabled)."
Here is the documentation page for the SetTrackingMode instruction.
Thanks for the quick reply.
I saw the issue you referred me to. It seems that the SetTrackingMode() line is coming after initiating an instance of PXCPersonTrackingModule *tracker.
In my problem, the PXCPersonTrackingModule *tracker will be null and I wont be able to work with it like Kamalra did in his example:
PXCSenseManager *sm = PXCSenseManager::CreateInstance();
PXCPersonTrackingModule *tracker = sm->QueryPersonTracking();
PXCPersonTrackingConfiguration *config = tracker->QueryConfiguration();
PXCPersonTrackingData *PersonData = tracker->QueryOutput();
You mentioned that R200 camera person tracking module isn't supported in SDK R3 version.
My SDK version is R3 11.0, maybe if I install the R2 10.0 version it will solve it? (even though common sense tells me that R3 should support the basic function of QueryPersonTracking())
Also note the following:
I had some trouble configuring the references files into my solution so I did the follow:
1) Copied the following x32 files (I'm using a 64bit OS) directly to my bin/debug project folder:
2) For the first 2 .dll files, I added for them references in the right-click "Add reference..." context menu in Visual Studio solution.
For the third one (libpxccpp2c.dll) I couldn't add a reference from the Visual studio in that way.
The most reliable way to download the '2016 R2' SDK at present is to use this direct link that starts the download immediately.
Person Tracking is listed in the release notes for R3 as being a feature only available for the R200 camera in R2, so it makes sense that Person Tracking would not function in R3.
Managed to get it work
I uninstalled R3 version and installed R2.
But now I'm facing the same issue slsuperrabbit had: I can't find ptc.QueryTracking().SetTrackingMode() function.
I saw that you said to use the UWP ordinary version instead of the C# but I didn't understand what exactly did you by that.
I searched the API doc but with no luck finding a solution.
How can I set the tracking mode to INTERACTIVE?
I think it was slsuperrabbit who was trying to use C# UWP, and my advice was to use ordinary C# if they did not need to write a Universal Windows Platform (UWP) application.
After an epic search, I managed to track down the official documentation page that references the Interactive status.
Experience says though that just because something is in the documentation, it does not mean it is actually implemented in the official RealSense SDK. This table seems to bear that out:
'Not supported' tends to mean that the camera is capable of this feature but it has not been programmed into the SDK.
Meanwhile I continued to work with the camera and managed to detect myself
This discussion can be closed.
You're very welcome. Glad you found a solution! Please come back to the forum any time you need help. Good luck!