matzman666 / OpenVR-InputEmulator

An OpenVR driver that allows to create virtual controllers, emulate controller input, manipulate poses of existing controllers and remap buttons. A client-side library that communicates with the driver via shared-memory is also included.
GNU General Public License v3.0
718 stars 138 forks source link

WMR headset + Vive tracker for motion compensation #114

Open dododge opened 6 years ago

dododge commented 6 years ago

I've had a Vive and (v1 base stations) for a couple years, and recently got a Vive Tracker 2.0. Motion compensation works with the tracker if I use the Vive as the headset.

The problem is that I also have an Odyssey WMR headset and the picture quality is noticeably better than the Vive, so what I want to do is use the Odyssey for gameplay and the Vive tracker for motion compensation. This should be possible in theory, but it's turning out to be difficult in practice.

Based on folks who've managed to get Vive wands to work with the Odyssey, I did similar changes to the "steamvr.vrsettings" file:

"steamvr" : {
  "activateMultipleDrivers" : true,
  "requireHmd" : false,
  "forcedDriver" : null,
  ...
}

I think that's supposed to make it possible for SteamVR to see both WMR and Vive equipment at the same time. That's the theory and sometimes it actually works. I assume the input emulator can't do much about all the times when it doesn't, such as when it just fails immediately with a 301 error or ends up with the tracker detected but not tracking.

However sometimes it does see all of the devices, and what generally seems to happen is that I put on the WMR headset while in the SteamVR grid scene, and although the WMR controller shows up right next to me where it should be, I'm positioned far above the Vive base stations, pointed in the wrong direction, and I can see the tracker way below even though physically it's attached to the seat back a few inches to the side of my head. If I go ahead and try to use it for motion compensation in this scenario, the motion is crazy -- for example the faster I accelerate the higher the car body lifts up around me blocking my view.

I've tried repositioning the tracker to the right spot relative to my headset by using its offsets, but when I then turn on motion compensation, those offsets are ignored and it jumps back to the wrong spot far below me.

I've tried repositioning the WMR headset to be down next to the tracker by using the headsets's offsets, but even then the motion compensation doesn't seem right when I wiggle the tracker around on the set back. It almost looks like it might be using the wrong rotational axes or something like that.

Also, when I start repositioning the WMR headset's offsets, the WMR controller doesn't follow along, so after I move a fair distance (and I have to go hundreds of units to correct whatever is going on) it becomes very hard to operate the UI with the distant WMR controller.

Interestingly, SteamVR seems to be putting me in the same wrong spot far above the base stations even when I completely quit Steam between attempts, so perhaps there's a file somewhere that it's using to keep track of how to map the WMR positions to the Steam VR positions, and this data needs to be repaired?

I also created a named profile, checked both checkboxes, and applied it, but it doesn't seem to retain any of the offsets or tracker configuration I'm doing. It may be that I just don't understand how the profile UI works for creating/loading/saving/updating a profile.

I'm not sure where to go from here, or if anyone has even tried combining a WMR headset with Vive trackers (not wands) before.

ilmatematico commented 6 years ago

I've encountered exacly the same problem.

It's like motion-compesation does not take into account offset profiles.

i just add the first option to the steamvr configuration file "steamvr" : { "activateMultipleDrivers" : true, ... }

dododge commented 6 years ago

A potential UI improvement might be to use a Vive-tracked object as a calibration source. For example if I could hold up a Vive controller right in front of my WMR headset and pull the trigger to auto-fill the offsets to bring the headset to that position+yaw in SteamVR, that might at least make it a lot easier to align the Vive and non-Vive tracking and would certainly be much faster than trying to use the +1/-1 arrows or type in values.

ilmatematico commented 6 years ago

this may help for sure, better in my opinion to put the controller layed on the top of WMR-HMD, or on a printed page-like where the position of the two are outlined.

But in my case, after doing manual offset tuning, still have the problem that doing MC with Vive-tracked object as reference (also KF - setpoint ecc) it doesn't work, and seem like do not take into account at all this offset (setted in the worldfromdriver section). Feels like the Coord-system is totally disaligned.

Zavualonn commented 6 years ago

dododge, a weird question if you dont mind - did you try to simply reset roomscale data and set WMR to fixed "seated/standing" option ? If i do that, it "bounds" my head to the shoulders so i can look around, but cannot move in games. Isnt it workin like kinda "built-in" motion cancellation? Dont have motion sim rig to test it yet though.

dododge commented 6 years ago

@Zavualonn From a quick bit of searching, WMR is supposed to have full 6DOF head tracking even in seated/standing mode. There is a known issue where if you don't open the WMR portal before starting a SteamVR application it can end up with only 3DOF angular tracking, but that's not the intended behavior.

In any case locking the head position might help for lateral movements such as heave, but it probably won't completely solve things for a motion simulator with a lot of angular motion. My rig has substantial side-to-side tilting to simulate sway forces, and as it tips me over the horizon in the game should follow the rig so that it seems like gravity has shifted sideways instead of feeling like the seat is tilting inside the car.

wazooda commented 5 years ago

@dododge - I also run a WMR Odyssey and am wondering if you've had success with cancelling out motion on a 6DOF platform.

I currently do not have any external Vive sensors, but if there is a way to get them to work with a WMR solution (I'm also considering the HP Reverb when it is finally released for flight simming), I'd make the investment.

I have a CKAS W3 platform which I love. In fact, they just made a plugin for the newly available motion telemetry output for IL-2.

Any insight would be greatly appreciated.

dododge commented 5 years ago

@wazooda I haven't gone back and done any further experimentation myself.

According to the OPEN VR CODER NEEDED thread at XSimulator: someone tried using a WMR controller as the tracking device for motion cancellation with their Odyssey+, and it did work, but they ran into issues with rig vibrations causing the view to shake too much to be usable (that discussion is mostly about ideas for smoothing the tracking data to deal with abrupt movements and transducer vibrations, but nothing has been implemented).

trueA1M2 commented 5 years ago

I have done a post on simtools on how to remove this noise not sure what xsimtools is sounds awful i will upload this later basically use lots of acoustic foam and elastic

onslope commented 4 years ago

Did you guys solve this issue using the Vive Tracker?

mircobabini commented 4 years ago

Hey guys (looking at you @ilmatematico :D), is it possible to use this feature with WMR headset and trackers? I have a Reverb and I would like to use it's own trakers to do motion compensation, but I'm reading that some issues are present. What I need to do to make this thing work?

ilmatematico commented 4 years ago

Hey guys (looking at you @ilmatematico :D), is it possible to use this feature with WMR headset and trackers? I have a Reverb and I would like to use its own trackers to do motion compensation, but I'm reading that some issues are present. What do I need to do to make this thing work?

@mircobabini as you can read in the previous posts, someone as already tried. The problem is that in WMR the sensor fusion for tracking relies much more on the IMU (and its not possible to force the gyro only). So you will get very shaky and "waving" result by using it. You can try, mount in front of your headset, but of course on the moving platform a controller (try with tape then move to 3d printed support). The instruction for Motion compensation are the same as for the vive (suggested "use reference tracker").

In my case, I was trying for a mixed approach using WMR HMD + VIVE Tracker so it's a different problem w.r.t. what you asked for.