Skip to main content
New Participant
December 21, 2018

How can I get Yaw Pitch Roll value, using dll?


I am a student who recently became interested in Oculus rift. 

I want to use the SDK to get the Roll Pitch yaw, make it a dll file, and use it in LabVIEW. I am having a hard time learning cpp.
How can I get Yaw Pitch Roll value, using dll?

Can you tell me the code and how to use it?
Thanks

    5 replies

    kojack
    Honored Contributor
    December 27, 2018
    Are you trying to get pitch/yaw/roll of the headset or touch controllers?
    Both work almost the same way.

    For controllers, you can take a look at my https://github.com/rajetic/auto_oculus_touch library. It's a C++ DLL that can read pitch/yaw and roll of touch controllers (plus buttons and stuff).

    I've never used LabVIEW. I'd guess it needs a C interface (it's more compatible). My library does that, it's written in C++ but exposes the functions as C.


    Author: Oculus Monitor , Auto Oculus Touch , Forum Dark Mode , Phantom Touch Remover , X-Plane Fixer Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich Headsets: Wrap 1200VR, DK1, DK2, CV1, Rift-S, GearVR, Go, Quest, Quest 2, Reverb G2, Quest 3
    Participant
    January 29, 2022

    kojack thats really interesting. I guess the dll has to be deployed onto the quest hardware, alongside an exe file? I suppose you could read the sensor data and stream that back over a network to a pc to control a pc game maybe. I got the source code for open lara, the tombraider game it runs on a pc. I was thinking on modding it so that it could work with the quest2

    kojack
    Honored Contributor
    January 30, 2022

    It's slightly different in the case of the Quest, since it's Android based, so no dlls or exes (well, it has equivalents, but with different names). But yep, if you just wanted controls and not VR rendering, you could network the controller data back from the Quest to a PC. Although in that case, if you use Link or Airlink, you can just use the PC SDK like my app and Oculus will handle the sending to PC.

     

    Open Lara has android builds as an option, so if you did that and used the Oculus native mobile SDK, it should be possible to make a native Quest version of it (so no PC needed). Probably not easy, but possible (I think).

    https://developer.oculus.com/documentation/native/android/mobile-intro/

     

    Author: Oculus Monitor , Auto Oculus Touch , Forum Dark Mode , Phantom Touch Remover , X-Plane Fixer Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich Headsets: Wrap 1200VR, DK1, DK2, CV1, Rift-S, GearVR, Go, Quest, Quest 2, Reverb G2, Quest 3
    Participant
    January 30, 2022
    Hi,
    Thanks, I was thinking of doing something really simple specifically using airlink. I dont really want to change the code in open lara much except to default it to first person view, and either use the the pc mouse (controlled by uers head in oculus) or the acual roll, pitch yaw data from the oculus to control the user view (possibly joypad controls from oculus controller as a final step?). 
    that would probably be it as a proof of princple. 
     
    so is the sdk you are talking about the same as the one mentioned here: https://developer.oculus.com/downloads/package/oculus-sdk-for-windows/ 
     
    This is great, I have plans to learn unity also, but tombraider was one of my favourites as a kid, and I'd love to run the original more or less as is in VR, especially now I have access to the code for it! Thanks again
    kojack
    Honored Contributor
    January 30, 2022

    Yep, that's the windows Rift SDK. It will work with Airlink, which makes the Quest emulate a Rift. That's the one I used. It doesn't let you make things that run stand alone on the Quest though, you always need a PC connected.

     

    Author: Oculus Monitor , Auto Oculus Touch , Forum Dark Mode , Phantom Touch Remover , X-Plane Fixer Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich Headsets: Wrap 1200VR, DK1, DK2, CV1, Rift-S, GearVR, Go, Quest, Quest 2, Reverb G2, Quest 3