ChristophHaag / SteamVR-OpenHMD

SteamVR plugin for using OpenHMD drivers in SteamVR
Boost Software License 1.0
195 stars 34 forks source link

Getting gaze cursor working #21

Closed interfect closed 5 years ago

interfect commented 5 years ago

I'm trying to use SteamVR-OpenHMD with just an Oculus DK1 headset and a gamepad, on Ubuntu.

I want to be able to operate the menus in SteamVR Home.

I am able to get everything hooked up, and look around in SteamVR home, and even jump around by hitting one of the right shoulder buttons and looking at where I want to go. Head rotation tracking is fine, and the rendering/distortion seems fine as well.

My problem is that I can't hit any of the buttons. When I load in, the wall in front of me says to press Y to open the menu. When I do that, a floating menu comes up in front of me, with a button on it that it says I am supposed to activate with "Trigger". I can't do anything to get the button to click.

I've also tried SteamVR-OSVR with the same hardware. When I do that, I seem to have some sort of gaze control/pointer that I don't have with SteamVR-OpenHMD. When I get the same menu, I can look at the button it wants me to click and hit the A-button-equivalent on my controller to click the button. I also get little extra menus coming up when I hover my gaze at the side of that floating menu, and when I bring up the teleport/jump overlay with that shoulder button, I have a green cursor that moves wherever I look on the floor, to show me where I am going to teleport to. Unfortunately, SteamVR-OSVR can't handle rendering correctly; the images for the two eyes that I get don't come to a coherent 3D view, and everything weirdly changes size in the vertical and horizontal dimensions as I tilt my head. Plus, the whole OSVR ecosystem is both much more complex than OpenHMD and also apparently abandoned, so I would much rather use this project.

Does anyone have any insight into what SteamVR-OSVR might be sending in to SteamVR to make its gaze cursor work? And how SteamVR-OpenHMD could be modified to do the same thing?

My config file looks like this:

hmddisplay 0
hmdtracker 0
leftcontroller -1
rightcontroller -1

I haven't tried telling it that my head is one of the controllers. Perhaps that would work?

ChristophHaag commented 5 years ago

Interesting. I tried with SteamVR's Vive driver, Vive Controllers powered off, XBox 360 gamepad connected and do not see gaze controls like you describe.

Perhaps the plugin needs to tell SteamVR that it does not support controllers at all for it to be activated or some other special code is needed.

interfect commented 5 years ago

Here's a bunch of stuff that doesn't help:

Copying all the properties that OSVR sets over seems like it may have gotten it working. I'm currently trying to prune that down to just whatever is actually required.

ChristophHaag commented 5 years ago

Thanks for looking into this, this will be quite useful.

And yes, SteamVR-OpenHMD is not very complete, I didn't do a lot of work on it after it started working, partly because it's quite painful to work with such little documentation...

ChristophHaag commented 5 years ago

Thanks for investigating, I added an environment variable to override the manufacturer string and tried with my Vive and OpenHMD and SteamVR Home kind of works.