pushrax / OpenVR-SpaceCalibrator

Use tracked VR devices from one company with any other.
MIT License
651 stars 109 forks source link

Pitch and Roll calibration should snap to the nearest 45 (or 90) degree increment #40

Open Nagorak opened 3 years ago

Nagorak commented 3 years ago

I have a suggestion that I think may dramatically improve the effectiveness of the calibration system.

Let me start out by telling you my story. For years I have tried on and off to get SpaceCalibrator to work for me between SteamVR and my WMR headsets, but I always suffered from severe tracking drift when moving across my play space. It was basically unplayably bad, with my controllers moving 8 inches out of sync as I moved across my play space. I had basically decided that SpaceCal didn't work in my VR room for whatever reason. Recently, there was another post about this on Reddit, so I decided to try again, with exactly the same dismal results (if anything it was even worse this time).

But this time I spent a little bit more time trying to figure out what was wrong, and I realized that as I walked across my play space, the height of my Vive controller changed relative to my Steam VR headset. At one side of the my space it was higher, and at the other side much lower--almost as if the plane of the two tracking systems were not aligned properly. So, I looked at what the calibrator had detected, and I saw that my Pitch was something like 174.something and my Roll was -175.something, which both looked strangely close to, but not quite, +/-180 degrees. So, I set them both to 180, and -180 respectively, and also changed my Yaw to be -45 from -43.something, and all of a sudden my tracking was almost spot on. (There is still some drift, but I think that may be because 45 degrees is not exactly correct for my Yaw value.)

I would suggest when performing the calibration, we can make the following assumptions: 1) People are playing in a flat room. 2) All tracking systems start by identifying the floor, and they must track the floor plane properly (otherwise as we moved across our play space, we would move up and down in height). 3) Pitch and roll are going to be defined relative to the floor plane. 4) The floor plane is not going to be defined at some odd angle like 23.86432 degrees, it will instead be a round number, and likely an increment of 90 degrees. 5) Therefore, the offset for the Roll and Pitch values between two tracking systems, is also likely to be some increment of 90 degrees. 6) Because the calibration system works to get these values in the right ball park, if you simply round them to the nearest 45 degree increment they should be entirely accurate, and eliminate any error in the calibration.

If I'm right, making that change will improve the experience for a lot of people. I think a lot of the "tracking drift" people are experiencing may be a result of their tracking planes not being oriented entirely correctly. Even 5 degrees off makes a dramatic difference--the difference between nearly perfect and unplayable.

If for some reason you don't want to do this snapping/rounding in the program itself, I'd recommend at least putting it in as a suggestion in your "how to", that anyone who is experiencing bad tracking drift should check their Roll and Pitch values and see if rounding to the nearest 45 improves things. Because it certainly did for me.

(I left out suggesting that Yaw be snapped because I am not sure yaw will necessarily be a round number between tracking systems--although mine was also very close to 45 degrees. However, I think Yaw could be dialed in by having the player hold their two controllers side by side as they walk in a straight line across their play space. That may work better than waving the controllers around. It might be a good additional calibration option to consider adding.)

Nagorak commented 3 years ago

Sorry if this should have been a feature request and not a bug. I can see how it could be defined either way.

Kevin-Lewis commented 3 years ago

I think you're 100% right with this. I've been troubleshooting all day with extreme controller drift after having none yesterday. My pitch/roll values were typically around the +- 150/160 range for most of it. When I finally got a calibration where they were both +- 178/179, my drift is much more minimal (and more importantly playable now).

I guess the main takeaway for others with the same issue is that your calibration might not be very accurate if you're not close to a "45" number on pitch/roll. Once you get there, I think Nagorak's suggestion will help minimize it even more.

pushrax commented 3 years ago

There are some devices that could need arbitrary scalar values here, but this is an interesting idea worth thinking about. Using this assumption should reduce error by removing some degrees of freedom. Adding an option for this would be a reasonable way to go.

tacticalbacon89 commented 3 years ago

i don't know about this i tried this and it doesn't help at all its as if the center is not orientated correctly and the farther you get away from center or where you started the calibration the worse it gets to the point where my controllers are like 5 inches away from my hands i think the algorithm needs to be relooked at for errors or make a different way to calibrate maybe using HMD Virtual orientation as a constant positional updating reference and using some math in tandom with base stations to refresh calbration constantly like a pseudo virtual active calibration tracking instead of a center point or be able to just decode what WMR is doing to the VR space every time steam vr and just reverse the exact numbers it changed to bring it back to its original state as if it orientated correctly instead of rebuild the space or moving it based on a referance just flip it back to its original state with what ever values WMR gives you that you can decode what ever its doing wrong is making it worse as you get farther away from center i was really wanting to use my steam knuckles to play with my g2 because g2 screwed us badly but i didn't realize before i payed almost $600 more for all the gear that this software was not refined enough to make it feel the same all the youtubers where like ooohh it works perfect, yea it does!!!! if your standing in one specific spot not moving much more than a few degrees now im stuck here playing vr standing in one spot not even able to spin around in Pavlov because if i do my relative hand positions change dramatically and what im doing becomes completely inaccurate the only game that's really accurately playable is beat saber that mainly because the hit boxes are huge and heard to miss

Raivr-dev commented 3 years ago

Your experience seems to be a lot worse than average. Out of interest, what happens when you do the calibration standing in a corner? Does that result in an even greater 'dislocation' of the controllers when you walk to the opposite corner, compared to doing the calibration in the center?

tacticalbacon89 commented 3 years ago

I will test this when i get home from work

On Fri, Mar 26, 2021, 7:40 AM Raivr @.***> wrote:

Your experience seems to be a lot worse than average. Out of interest, what happens when you do the calibration standing in a corner? Does that result in an even greater 'dislocation' of the controllers when you walk to the opposite corner, compared to doing the calibration in the center?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pushrax/OpenVR-SpaceCalibrator/issues/40#issuecomment-808149855, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATLTFJQSQSM7IZBHHS6MHZDTFRXEBANCNFSM4UKWEVHQ .

tacticalbacon89 commented 3 years ago

Your experience seems to be a lot worse than average. Out of interest, what happens when you do the calibration standing in a corner? Does that result in an even greater 'dislocation' of the controllers when you walk to the opposite corner, compared to doing the calibration in the center?

(im sorry in advance for grammer its bed time and i was typing fast just pause before you run out of breath lol )ok so i have tested it i tryed to do it in the most scientific way possible to minimize human or hardware error, and for your reference or for the reference of Pushrax or any devolper of this software my room setup is a open floor plan rectangular living room, with my dedicated play space and chaperone that is roughly 9'x13' in the center of the living room, which gives me extra space incase i don't see my chaperone and walk through it. I have 2 base stations ATM that are placed 9' high on a roof joist so they are perfectly lined up and angled down to the center of my play space, and in relation to my play space they are place on the center of the long lines of our play space rectangle about 12' apart. i am 100% certain they are tracking properly i dont get track loss style drifting in the play space and controller movement is fluent not laggy or stuttery, there is no TVs because its lounge room and the only pictures we have are canvas paintings no real reflective surfaces, all windows have darkish curtains and there all closed not letting in too much light in the room, as for the ceiling light its just a standard led bulb facing down right over center of play space so i think my setup is not the problem and i have a beefy computer with good connections and a 3090 gpu and a 5820k cpu so my hardware should be good enough not to cause issues.

so to answer your question. i tried it they way you told me, but the corner i used as a referance was my chaperone corner because my wire wont reach across my living room to the physical corners. i attempted this several times with several different calibration making sure to stand in the same spot (painters tape reference) and not move away my only moving method was my arms for calibration so that should mean that my calibrated center should be in that spot every time or at least very very close. i calibrated with WMR controller to index controller method and using Index controller to HMD method which is my prefered method, all calibrations produce the same general result, some to a lesser extent some to a worse extent. first test i spun in circles slowly in my calibrated spot with my arms locked forward fully extend and the result was that in certain rotational positions the controllers would very slightly pull away from me or push into me or move unilaterally not by alot maybe average of 1/2 inch, sometimes less, sometimes more, but enough to make FPS games very inconsistent trying to aiming down sights and rotate and using a gunstock is impossible because you can never align it because it changes positions during rotation, then i tried the walking test the result was as i walk away from that point the farther i go the worse it gets, but not always only if i walk in the direction that my initial rotation test showed me the mathematical error was but this error some directions i could walk and the calculation was only off by a little bit or darn near spot on now corner to opposing corner was a problem but it wasnt always just that one direction it would be a little off in other directions as well but one direction was always the worse but durring this test i followed the error it in a straight line and the farther i got the worse it got and if i went as far as to go past my chaperone and keep going it was off by ALOT but maybe 5 or 6 inchs it was defiantly progressive and i could leave and return to that position and it would be off the exact same distance and direction and as i went back to my corner they would slowly return to my hands. it seemed to be moving unilaterally and not just away on one axis plane but it was kinda hard to tell because i had no reference other then mentally knowing where my hands where and looking at the weird offset controllers IMO it feels like the algorithm needs more info or its missing info like maybe scale i dont think its a mathematical problem granted trig wasn't my major but to me if it was i i should be able to edit it into the right spot and it would be perfect no matter where i went but i tryed for 12 days so far to edit it and get it right and this problem wont go away i say SCALE because i noticed that when you use OVRAS to force steam chaperone ON the calculation get tighter and though the problem still exists its not as drastic and i might be wrong but i think that what room setup is doing is putting things to scale kinda i might be wrong though

Raivr-dev commented 3 years ago

Great report! Your setup seems perfectly fine. Did you test with all other overlay apps and drivers / add-ons disabled (including OVRAS)? Just to make sure those don't interfere. So, the error is very consistent. It looks like a scaling issue. I read somewhere that the WMR IPD setting could have an effect on scaling. Can you try playing around with the IPD setting? You can find it in Windows Settings somewhere (not in VR, not in the WMR Portal, not in the WMR-for-SteamVR overlay app). One more thing to test: Don't let SpaceCalibrator save and restore the chaperone data.

tacticalbacon89 commented 3 years ago

Ok i will test this too and ill provide a detailed list of overlays, settings and addons that i have which in my case is not much and what happens when there enabled or disabled when i get off work again at 7pm est

On Sat, Mar 27, 2021, 7:01 AM Raivr @.***> wrote:

Great report! Your setup seems perfectly fine. Did you test with all other overlay apps and drivers / add-ons disabled (including OVRAS)? Just to make sure those don't interfere. So, the error is very consistent. It looks like a scaling issue. I read somewhere that the WMR IPD setting could have an effect on scaling. Can you try playing around with the IPD setting? You can find it in Windows Settings somewhere (not in VR, not in the WMR Portal, not in the WMR-for-SteamVR overlay app). One more thing to test: Don't let SpaceCalibrator save and restore the chaperone data.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pushrax/OpenVR-SpaceCalibrator/issues/40#issuecomment-808712203, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATLTFJQ5NU5UXM2FTADRDQ3TFW3HJANCNFSM4UKWEVHQ .

tacticalbacon89 commented 3 years ago

Great report! Your setup seems perfectly fine. Did you test with all other overlay apps and drivers / add-ons disabled (including OVRAS)? Just to make sure those don't interfere. So, the error is very consistent. It looks like a scaling issue. I read somewhere that the WMR IPD setting could have an effect on scaling. Can you try playing around with the IPD setting? You can find it in Windows Settings somewhere (not in VR, not in the WMR Portal, not in the WMR-for-SteamVR overlay app). One more thing to test: Don't let SpaceCalibrator save and restore the chaperone data.

1st off topic question is this software sill even being actively patched and developed, or has pushrax given up on it? it hasnt seen a patch since October of last year! and pushrax's most recent comment on here that i can find is months ago. the perception im getting is this software has been abandoned. got i hope not i just spent 600$ on all this gear thinking this was gonna work? @pushrax

  1. ok so my list of active addons consist of turnsignal, space cal (obviously lol) ,OVRAS, and windows mixed reality for steamVR (obviously again a must have lol),
  2. turnsignal seems to play no factor what so ever when its enabled or disabled ,
  3. OVRAS gave me some weird info today let me explan my results i dont think OVRAS the software is the key to the effects produced by using OVRAS?? i know weird right my reasoning is at first i thought just running it made the calibration tighter yesterday with our prior test but after booting up steamVR today its not as accurate as it was yesterday there not completley out of wack but not as precise and after some head scratching i had a light bulb moment! i ran through the steamVR room setup yesterday because force steamvr chaperone setting was enable which means every time steamvr boots so does steamvr room setup so long as this setting is enabled and even though it DID NOT fix the issue yesterday it made it not as bad i think using OVRAS helps a little it but it seems only if you run through the steamvr room setup every single time you boot or restart steamvr because OVRAS is not altering anything on its own but rather giving you access to a software that does which is steamvr room setup so i can only presume that the reason people use OVRAS in tandom with openvr Space Cal so they gain access to this feature which dont make sense because you can find room setup app in steam library add it to your desktop and launch it on demand i can only assume theres a tool in OVARS to save the results of the room setup or else noone would use it for this situation because room setup wont save i think because your not using a index but even then i dont think i really matter because it didn't truly fix the issue in the first place just made it not as bad but without doing room setup made no factor to the calibration both positive or negitive
  4. as for the last to apps there a must have without WMR for steamvr the headset wont even be detected without it which im sure you know that and as for space cal yea
  5. i also disabled ''automatic paste chaperone bounds after geometry reset'' in space cal this had no affect to the calibration even after restarting steam

my conclusion is that there is 3 possible answers to this issue

  1. the algorithm is not mathematically correct or an important data set to precisely pin point center like scale is missing (easy fix relook at algorithm for error or add an extra data input from data source such as scale prolly needs WMR's scale value then test )
  2. the method to calibrate devices is not precise enough to eliminate minute errors that progressively get worse with distance(easy fix IMO just use a Vive tracker hard fixed to the headset to calibrate because it is mounted it wont move at all not even a stutter then calibrate off that and allow the calibration to calibrate to a finer decimal value
  3. and the best option IMO is where messing with the wrong source making things harder than it needs to be instead of trying to move the steam axis planes to match the always changing ever messed up WMR planes at least i think that what space cal is doing instead move software from steam to WMR side to launch with WMR portal and correct things from the WMR perspective, instead force WMR to align to the already known and stable default orientations of steamVR apon launching steam vr you wouldnt even need to calibrate just change values apon launch as if we where just walking into steamvr from a doorway so to speak so that the headset loads in on the same plane scale and orientation as steamvr thinks the place space is from the start base on its algorithms almost like a axis filter between WMR and steamVR just means you gotta accept the challenge of understanding things from the Microsoft side of things which i assume is very similar theres not but so many common programming languages i assume the required software WMR for SteamVR is the cultrate to this misalignment as they are the link between the 2 and required to even make this thing work in general maybe reach out to them and ask for source code or help as you are a developer and not just a normal dude asking about stuff he dont know or ask if they will fix this misalignment and show them the proof of it and see if they will fix it on there side or just redo what they have done but better with your own software and sell it on Microsoft store or steam

    not gonna lie you could make bank on that concept there is alot of people willing to pay just to have the hp reverb g2 with steam controllers work as if its made to work, as it is basically next gen VR performance, literally the only thing HP got right on the G2 was resolution and screens everything else is trash or not made by HP instead valve we are already paying 600$ for all the gear needed to make it work what's another 10$ for good software that works i would pay and i think most people would to plus it will correlate to other WMR released headsets in the future because for some dumb reason Microsoft doesn't see the value of reliable light house tracking that is tried and true and preferred among VR community's heavily its just expensive and that's what drives people away

Raivr-dev commented 3 years ago

I don't know about active development of this tool. I think Pushrax commented last in February of this year, so not long ago.

OVRAS has a 'workaround' for getting a chaperone boundary for Index controllers when on WMR, but this workaround causes SteamVR to start Room Setup. IMO (but I'm biased) you'd better use the Boundary++ boundary in Stop Sign VR (I'm the dev).

It's not easy to "move software from steam to WMR side". WMR is not so open. With SteamVR more is possible. WMR and WMR-for-SteamVR on their own do a good job, when you use the original WMR controllers. The trouble starts when universes are combined (WMR's and SteamVR's). Maybe Valve will support a mixed VR set natively at some point?

I could make something like SpaceCal and implement a scaling feature, and I would actually like to do that (and some people have asked me to do so). But that would take serious development work. Not sure if I would make bank on it, but it sure sounds attractive. :-) Or PushRax could do a scaling feature in SpaceCal.

To get back to the problem, can you try these two things (it's to extend my knowledge for if I do decide to work on it in the future):

1.

  1. Test whether the software IPD setting changes the scaling issue. You can find it in Windows Settings somewhere.

pushrax commented 3 years ago

There's an issue open to add scaling https://github.com/pushrax/OpenVR-SpaceCalibrator/issues/23 where I describe what tasks are needed to get that implemented in one of the latest comments.

tacticalbacon89 commented 3 years ago

Are you still doing development on this or have you stopped im not trying to be pushy im sorry if it comes out that way but this is our only source to make this setup work and its currently not working and this setup cost alot of money that we are sitting on

On Tue, Mar 30, 2021, 2:35 PM Justin Li @.***> wrote:

There's an issue open to add scaling #23 https://github.com/pushrax/OpenVR-SpaceCalibrator/issues/23 where I describe what tasks are needed to get that implemented in one of the latest comments.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pushrax/OpenVR-SpaceCalibrator/issues/40#issuecomment-810486689, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATLTFJV2GXP4NOPRCLLH7S3TGIKYDANCNFSM4UKWEVHQ .

tacticalbacon89 commented 3 years ago

@Raivr-dev @pushrax im not gonna lie if you or pushrax would remake or fix this to where the calibration is decent through out the entire play space, which im assuming is a scaling issue? then i will personally PayPal you 100$ immediately apon its release, i really want this to work i love my new steam controllers and i have already invested large amounts of money into this setup, because i was told it works perfectly and i had to buy everything because i didn't previously have an INDEX. im aware this is not your fault nor your problem because you created this software for fun, but some of us are trapped now with gear that doesn't work well, please give it a try and if it works just tell me who to send the money to

tacticalbacon89 commented 3 years ago

@pushrax

There's an issue open to add scaling #23 where I describe what tasks are needed to get that implemented in one of the latest comments.

other than developers and a few others, none of us are familiar enough with coding languages to accomplish this task without help we are just humble gamers trying to play games in a better way, can this not just be a patched version of the software you release for us to download?

Raivr-dev commented 3 years ago

@Raivr-dev @pushrax im not gonna lie if you or pushrax would remake or fix this to where the calibration is decent through out the entire play space, which im assuming is a scaling issue? then i will personally PayPal you 100$ immediately apon its release, i really want this to work i love my new steam controllers and i have already invested large amounts of money into this setup, because i was told it works perfectly and i had to buy everything because i didn't previously have an INDEX. im aware this is not your fault nor your problem because you created this software for fun, but some of us are trapped now with gear that doesn't work well, please give it a try and if it works just tell me who to send the money to

@tacticalbacon89 Did you get a chance to test whether the WMR IPD settings have an effect on the scaling issue? See this image for what I mean:

WMR IPD settings

tacticalbacon89 commented 3 years ago

i did try this with the G2 the slider on the headset directly inputs into that value 1 to1 so if you move the slider on headset for ipd so does that bar change its values, it made no difference to the positions of the controller or scale there of, unless the scale changes are made after re booting steam? regardless if i slide the ipd adjustment then my ipd will be out of my range anyways making everything a blurry mess that i cant play and its greyed out for me to try to change it without changing slider on headset

tacticalbacon89 commented 3 years ago

pushrax said how to implement scale into to calibration in #23, but he didn't give is a step by step guide how to do so or tell whether he was just thinking out loud as to what he plans on doing to fix it.

if there was a way we could hook the ever changing scale value that WMR changes when the headset awakes from sleep mode or loads in ext. when it changes it, then it could be actively calibrated to that value

Raivr-dev commented 3 years ago

unless the scale changes are made after re booting steam?

Could be. I don't know. I just read somewhere it could have an effect. Thanks for testing.

ever changing scale value that WMR changes when the headset awakes

It changes during a session as well, when the headset sleeps/awakes? That would make it more difficult to fix.

tacticalbacon89 commented 3 years ago

yes to a degree in example if you take the headset off and lay it down for a while leaving everything running and you comeback to put it on if it went to sleep mode it sometimes will load back in and the calibration will be off not every time but it does happen i have experienced it several frustrating times playing beat saber and taking breather breaks

it will do this as well when the headset looses camera tracking, sometimes it will snap back to the calibration but sometimes it will snap back and be off calibration i have had them snap back and be like 5 feet away from me.

i have also had times where when loading in to steamvr on different occasions the play space drift we are have problems with will be worse or better using the same calibration

i think the positional camera algorithm are part of the problem i think they are inputting conflicts through WMR in terms of relation between calibrated space in where WMR thinks it is in SteamVR

i think it is always changing scale values based on a given situation ex. position loss, launches, ext. to fix this we would need to hook that scale value and auto refresh it to the calibration probably

this concept space calibrator can work but i think in order for it to work well it would need a vive tracker attached to headset as that would provide consistency and accuracy, and a refreshing calibration algorithm with scale factored in tied between the two, that is optimized to not produce lag during gameplay

maybe only auto refreshing after steam boots, game launches.

or just prompt a gesture (like a t-pose) to initialize the calibration between the vive tracker and headset when you need it or it could just auto prompt the user to a t pose calibration after game launches, steam boots, ext..

but before we can do that we must be able to find true center where no matter where you walk everything is aligned then we can retain it

tacticalbacon89 commented 3 years ago

i wish i knew coding languages and programming i could so figure out how to fix this and make it work excellent unfortunately a networking degree only teaches basics of coding and more about how to build network setups, and configure them, for commercial use

tacticalbacon89 commented 3 years ago

any new word on this issue?