The command is TRACKING_MODE_INTERACTIVE. A comment linked to below has a script showing how the instruction is used.
Also note in the script that Skeleton mode is Enabled. Enabling Skeleton mode is, according to other Skeleton mode users, the other thing you have to do to get Skeleton Tracking working, as it is apparently disabled by default.
But I can't find SetTrackingMode function in C# library, but in C++ Library, it exist. The sample code in the link is use C++ library.
This is my enable Skeleton code, I think it's ok.
personModule = senseManager.QueryPersonTracking();
personConfig = personModule.QueryConfiguration();
But when i get numbers of skeleton, it returns 0.
This discussion features a user who was trying to get skeleton tracking working in C# and was getting 0 returned. They provide a C# script (in the C# version of the code, PXCM is used instead of PXC, like you did in your own script.)
I believe that if the code is fine then skeleton tracking works once it has been Enabled.
I edited Realsense library as this blog tutorial, but nothing changed.
Numbers of skeleton always return 0.
I tried to contact Mtaulty but failed.
Can you give me any other solution?
I have carefully researched both this forum and the old RealSense forum that was used before this one. In all the cases of people who were trying skeleton and tracking and getting '0' returned, I could find only one person who got it working. They posted a script that seems to be C++ (I know you need C#).
People found that whilst the C++ Person Tracking sample for the R200 provided with the SDK worked, they could not adapt the code for their own projects and just got '0' returned.
There is unfortunately no further information on this subject to research to try to find a solution. The best chance of a resolution may be if an Intel member picks up the case and researches it, as they have access to internal expertise that I do not. Good luck!
I have found a solution for this problem.
The most important thing you have to do is SetTrackingMode to TRACKING_MODE_INTERACTIVE, but the C # SDK does not have a function to do that.
So I tried to edit the pxcclr.cs library, but there is no function named SetTrackingMode.
I go deeper, I try to edit the cpp2c library, there is a function called SetTrackingMode, set the default value to TRACKING_MODE_INTERACTIVE, build a DLL file, import to project, and I succeeded.
Awesome news! People have struggled with the skeleton tracking 'returns 0' problem for a very long time, so it's great that they have a new possibility to try. Many thanks!