Items with no label
3338 Discussions

QueryPersonTracking() returns null every time I call it

Yaniv_S_Intel
Employee
3,291 Views

Hi all,

I'm new here and searched for an answer to my problem I'm having and didn't found, hopefully somebody can help me with it.

I'm trying to connect my RS200 RealSense cam to preform person tracking.

I followed the API guide but every time I try to initiate an instance of PXCMPersonTrackingModule using QueryPersonTracking() function I get a null value.

I'm using Intel.RealSense version 11.0 and using the 32bit .dll versions.

Here is my code snippet:

...

...

...

// Create the SenseManager instance

PXCMSenseManager sm = PXCMSenseManager.CreateInstance();

// Enable person tracking

sm.EnablePersonTracking();

// Get a module instance here (or inside the AcquireFrame/ReleaseFrame loop) for configuration

PXCMPersonTrackingModule ptm = sm.QueryPersonTracking();

// ptm is a PXCMPersonTrackingModule instance

PXCMPersonTrackingConfiguration ptc = ptm.QueryConfiguration();

...

...

...

ptm is null after the QueryConfiguration() func every time I ran it.

I read that this may happen if the module is busy.

How can I tell if it's busy?

Can I do anything else to set it to maybe an idle state and then call the QueryConfiguration() function?

0 Kudos
8 Replies
MartyG
Honored Contributor III
1,193 Views

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.

https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/settrackingmode_pxchandconfiguration.html SetTrackingMode

0 Kudos
Yaniv_S_Intel
Employee
1,193 Views

Hi Marty,

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();

PXCPersonTrackingData::PersonJoints::SkeletonPoint* joints;

sm->EnablePersonTracking();

PXCPersonTrackingModule *tracker = sm->QueryPersonTracking();

sm->Init();

PXCPersonTrackingConfiguration *config = tracker->QueryConfiguration();

PXCPersonTrackingData *PersonData = tracker->QueryOutput();

config->QuerySkeletonJoints()->Enable();

config->QueryTracking()->SetTrackingMode(PXCPersonTrackingConfiguration::TrackingConfiguration::TRACKING_MODE_INTERACTIVE);

...

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())

0 Kudos
Yaniv_S_Intel
Employee
1,193 Views

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:

- Intel.RealSense.cs.dll

- libpxcclr.cs.dll

- libpxccpp2c.dll

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.

Regards,

Yaniv

0 Kudos
MartyG
Honored Contributor III
1,193 Views

The most reliable way to download the '2016 R2' SDK at present is to use this direct link that starts the download immediately.

http://registrationcenter-download.intel.com/akdlm/irc_nas/vcp/9078/intel_rs_sdk_offline_package_10.0.26.0396.exe

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.

0 Kudos
Yaniv_S_Intel
Employee
1,193 Views

Hi Marty,

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?

0 Kudos
MartyG
Honored Contributor III
1,193 Views

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.

https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/index.html?trackingmode_trackingconfiguration_pxcpersontrackingconfiguration.html Intel® RealSense™ SDK 2016 R2 Documentation

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.

0 Kudos
Yaniv_S_Intel
Employee
1,193 Views

OK

Meanwhile I continued to work with the camera and managed to detect myself

This discussion can be closed.

Thanks

0 Kudos
MartyG
Honored Contributor III
1,193 Views

You're very welcome. Glad you found a solution! Please come back to the forum any time you need help. Good luck!

0 Kudos
Reply