Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
end7791's avatar
end7791
Explorer
1 year ago
Solved

How to sample IOBT with native openxr and without Unity?

Hello. I am new to Quest and XR development.

I have the OpenXR mobile sdk v 64 on my Windows machine, and I can run a sample such as XrBodyFaceEyeSocial as a way to see the body tracking. However, it does not seem to be using IOBT. The only other discussions and samples I can find are using Unity, and I am not planning on using Unity for my intended purpose.

Is there a way to sample this feature (and therefore build my own app) without relying on the Unity engine?

I checked the troubleshooting and it looks like iobt is not active when I run this sample:

adb shell dumpsys activity service com.oculus.bodyapiservice.BodyAPIService\\
SERVICE com.oculus.bodyapiservice/.BodyApiService 83a0fac pid=3858 user=0
  Client:

    <Begin_BodyApiService>
    {
    	"averageHz" : 72.10499841030007,
    	"clients" : 
    	{
    		"com.oculus.xrsamples.xrbodyfaceeyesocial" : null
    	},
    	"expectedHz" : 72.005460382112958,
    	"fbs" : false,
    	"iobt" : false,
    	"num_updates_counter" : 35389,
    	"usingEngineV1" : false
    }

    <End_BodyApiService>
  • I figured it out. I followed the following steps by adding this code into main.cpp in XrBodyFaceEyeSocial.

    In the includes -

     

    #include <meta_openxr_preview/meta_body_tracking_fidelity.h>

     

     

    In `GetExtenstions()` - 

     

    extensions.push_back(XR_META_BODY_TRACKING_FIDELITY_EXTENSION_NAME);

     

     

    In the else statement of the coniditional `if (!bodyTrackingSystemProperties.supportsBodyTracking) {` -

     

    OXR(xrGetInstanceProcAddr(GetInstance(),"xrRequestBodyTrackingFidelityMETA", (PFN_xrVoidFunction*)(&xrRequestBodyTrackingFidelityMETA_)));

     

     

    In `AppShutdown()` -

     

    xrRequestBodyTrackingFidelityMETA_ = nullptr;

     

     

    In `if (xrCreateBodyTrackerFB_) {` after `OXR(xrCreateBodyTrackerFB_()` -

     

    OXR(xrRequestBodyTrackingFidelityMETA_(bodyTracker_, XR_BODY_TRACKING_FIDELITY_HIGH_META));

     

     

    This is where the request is made to set the fidelity to high.

    Finally, in the `public:` section with the other Body - extension functions -

     

    PFN_xrRequestBodyTrackingFidelityMETA xrRequestBodyTrackingFidelityMETA_ = nullptr;

     

     

    After this you should be able to type:

     

    adb shell dumpsys activity service com.oculus.bodyapiservice.BodyAPIService

     

    into a computer connected to the Quest 3 unit to confirm that iobt is set to true when running the sample.

     

1 Reply

  • I figured it out. I followed the following steps by adding this code into main.cpp in XrBodyFaceEyeSocial.

    In the includes -

     

    #include <meta_openxr_preview/meta_body_tracking_fidelity.h>

     

     

    In `GetExtenstions()` - 

     

    extensions.push_back(XR_META_BODY_TRACKING_FIDELITY_EXTENSION_NAME);

     

     

    In the else statement of the coniditional `if (!bodyTrackingSystemProperties.supportsBodyTracking) {` -

     

    OXR(xrGetInstanceProcAddr(GetInstance(),"xrRequestBodyTrackingFidelityMETA", (PFN_xrVoidFunction*)(&xrRequestBodyTrackingFidelityMETA_)));

     

     

    In `AppShutdown()` -

     

    xrRequestBodyTrackingFidelityMETA_ = nullptr;

     

     

    In `if (xrCreateBodyTrackerFB_) {` after `OXR(xrCreateBodyTrackerFB_()` -

     

    OXR(xrRequestBodyTrackingFidelityMETA_(bodyTracker_, XR_BODY_TRACKING_FIDELITY_HIGH_META));

     

     

    This is where the request is made to set the fidelity to high.

    Finally, in the `public:` section with the other Body - extension functions -

     

    PFN_xrRequestBodyTrackingFidelityMETA xrRequestBodyTrackingFidelityMETA_ = nullptr;

     

     

    After this you should be able to type:

     

    adb shell dumpsys activity service com.oculus.bodyapiservice.BodyAPIService

     

    into a computer connected to the Quest 3 unit to confirm that iobt is set to true when running the sample.