Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
J3X-1's avatar
J3X-1
Honored Guest
10 years ago

Oculus SDK 0.8.0.0 and detecting ovrError_SyncDisconnected

Hello,

I am working in integrating the Oculus SDK into a third party engine and have a question about the Hardware errors. Those in OVR_ErrorCode.h.

I have not been able to receive a ovrError_SyncDisconnected, ovrError_GeneralTrackerFailure, ovrError_ImageSensorCommError or similar. This even if I disconnect the USB cable, or the sync cable. I want to throw a message box to the user, notifying that the cable is disconnected.

I have tried calling ovr_GetLastErrorInfo after ovr_GetTrackingState. This gives nothing. How can I detect them? Which function gives these errors?

System:
Oculus DK2
Oculus Runtime 0.8.0.0
Oculus SDK 0.8.0.0

5 Replies

  • I use:

    1) ovr_Detect(0).IsOculusHMDConnected

    2) ovrTrackingState ts=ovr_GetTrackingState(Session, ovr_GetPredictedDisplayTime(Session, 0), ovrTrue);
    if(ts.StatusFlags&ovrStatus_HmdConnected)

    Check my engine if you're interested: http://www.esenthel.com/
    I'm adding support for latest SDK right now.
  • J3X-1's avatar
    J3X-1
    Honored Guest
    The device in question I want to detect is if the DK2 camera is connected and working.

    ovrTrackingState.StatusFlags seems to contain information about this however. Thanks!

    ovrTrackingState hmdState = ovr_GetTrackingState(od->hmd, ftiming, ovrTrue);
    od->cameraPoseTracked = hmdState.StatusFlags&ovrStatus_CameraPoseTracked;
    od->positionConnected = hmdState.StatusFlags&ovrStatus_PositionConnected;
    od->positionTracked = hmdState.StatusFlags&ovrStatus_PositionTracked;


    From my experiments the following configurations are possible. It seems like it is not possible to differ sync cable not connected to camera and HMD outside of tracking bounds.

    Camera connected and HMD in tracking area
    od->cameraPoseTracked true
    od->positionConnected true
    od->positionTracked true

    Camera connected with USB and sync cable but HMD not inside tracking area
    od->cameraPoseTracked true
    od->positionConnected true
    od->positionTracked false

    Camera only connected with USB, not sync cable
    od->cameraPoseTracked true
    od->positionConnected true
    od->positionTracked false

    Camera not connected at all
    od->cameraPoseTracked false
    od->positionConnected false
    od->positionTracked false

    Also neat engine.

    edit; claritifation
  • No, I don't think this functionality is exposed inside the SDK.

    Can I ask why you would need that information? It doesn't seem like something client apps should be concerned with.
  • J3X-1's avatar
    J3X-1
    Honored Guest
    "cybereality" wrote:
    No, I don't think this functionality is exposed inside the SDK.

    Can I ask why you would need that information? It doesn't seem like something client apps should be concerned with.

    The users of our program is not so technical skilled. So we are wrapping all possible errors with a human readable error dialog, along with suggested solution. Ex. "Wrong Oculus Runtime. Please download latest runtime here..."

    During testing we had the sync cable disconnect, the users did not notice this, their motion sickness score increased however. So the idea is to put up a message box saying "Sync cable disconnected. Please plug in cable or continue without position tracking."

    Do the consumer edition need a sync cable?
  • The Config Util should show errors like this, and should be easy enough to use for anyone that is familiar with Windows.