In my own Unity project I use multiple types of tracking script simultaneously without conflict (hand, face, gesture). So it is unusual that using hand and segmentation together would cause a problem. Admittedly though I have never used segmentation, so have not had the opportunity to experience if the two can conflict.
I remember the fun I had editing this file (SenseToolkitManager) in 2014 to add an 'if camera not present' status. You have to be very careful in modding it, as one small change can make the whole house of cards fall down!
I suspect I may have had the same problem as you back then, though I cannot recall it, as I have apparently edited the troublesome lines out of my version of SenseToolkitManager with no ill effects.
/* Initialize the execution */
_sts = SenseManager.Init();
if (_sts < pxcmStatus.PXCM_STATUS_NO_ERROR)
In other words, the four lines I edited out were:
if (numberOfEnabledModalities > 0)
Debug.LogError("Unable to initialize all modalities");
I edited out those exact lines just before posting which resulted in it not longer popping up but the whole thing just remains blank and the camera isnt initialized, the hand gestures work but not the camera segmentation in this case. ODdly enough though the backgrond removal and sphere grabbing transform work in perfect unison together.
I've attached the code of my SenseToolkitManager in a Word doc, with my camera-present check removed. Since I can't recall all the edits I did. If you select-all and copy on the doc contents and then select-all and paste on your SenseToolkitManager script, you may have better luck. If it doesn't work, you can always ctrl-Z to undo and restore your own script.
SenseToolkitManager.doc 85.0 K
Thanks for that, unfortunately it kicks out even more errors, one of which is the same error that I believe was causing the segmentation to fail:
NullReferenceException: Object reference not set to an instance of an object Draw3DSegmentation.SetSenseOptions () (at Assets/RSUnityToolkit/Internals/Actions Utils/Draw3DSegmentation.cs:39) Draw3DSegmentation.Start () (at Assets/RSUnityToolkit/Internals/Actions Utils/Draw3DSegmentation.cs:107)
It's no longer assignign the texture to the texture slow in the Segmentation script (which was working fine before) so I assume theres some check failing.
Other lines are:
NullReferenceException: Object reference not set to an instance of an object Draw3DSegmentation.UnsetSenseOptions () (at Assets/RSUnityToolkit/Internals/Actions Utils/Draw3DSegmentation.cs:47) Draw3DSegmentation.OnDisable () (at Assets/RSUnityToolkit/Internals/Actions Utils/Draw3DSegmentation.cs:148)
Oops! Although I removed my camera-present checker, I forgot to remove the references to its related objects (which are only in my project) at the top of the script on lines 29 and 30, and 144 and 145. My bad! That is surely what is causing the object reference errors. I'm very sorry!
Here's the code again (attached) with those lines edited out.
SenseManager-v2.doc 84.5 K
No problems at all! The issue is still persisting, the hand works but the camera 3D segmentation doesn't with that script. (And the modalities error doesn't come up as its been removed from the code). I'm wondering if its a USB 3.0 power issue again (I'll try a powered usb 3.0 hub tomorrow) or the order in which they're been initialed (Ie Hand then camera or camera then hand).
Very confusing error!
This message was posted on behalf of Intel Corporation
Do you still need assistance with this thread? Does the issue persist after using a powered USB 3.0 hub and changing the initialization order?