Forum Discussion
ColdEquation
12 years agoHonored Guest
Solutions for yaw drift
The gradual accumulation of error in rotation around the y-axis (yaw) has been one of the main issues I've struggled with while developing for the Rift. There are a number of possible solutions, but each has drawbacks. I'd be curious to hear what the community has come up with, and what I've left out or overlooked. Here are the approaches I'm aware of:
Magnetometers: The Rift SDK has functions to take advantage of the magnetometers in the hardware and stabilize the yaw to the magnetic field around the player. This requires frequent calibration, as the field can shift over time and changes over short distances. Automatic calibration is less intrusive to the play experience, but does not give good results if the player turns only slightly during the calibration period.
Manual yaw control: In many shooters, it's possible to just ignore drift by merging the native yaw turning controls and head tracking. This has the side effect of having the player always move in the direction his head is pointing. It isn't practical for situations where head tracking must be independent of player orientation, like in vehicles.
Reset button: Most Rift demos have a key to reset the yaw to the current orientation. Though not ideal, it's often a good idea to include a reset binding in games, especially to correct for the large yaw offset if the player was looking to the side when the game started.
Contextual actions: Specifically, one could assume the the player is facing mostly forward when firing the weapon in a shooter, or performing any other kind of attack. Re-centering during these actions can keep yaw drift to a minimum, but might introduce some confusion. This is my preferred solution currently, though it's difficult to tell if it would hold up in wider testing, especially for players that don't understand that the correction is happening.
Just wait: It's possible that yaw drift will be a solved problem in hardware in the consumer version if the Rift. Most solutions for positional tracking could determine absolute yaw, much how pitch drift is currently solved by measuring gravity with the accelerometers.
Magnetometers: The Rift SDK has functions to take advantage of the magnetometers in the hardware and stabilize the yaw to the magnetic field around the player. This requires frequent calibration, as the field can shift over time and changes over short distances. Automatic calibration is less intrusive to the play experience, but does not give good results if the player turns only slightly during the calibration period.
Manual yaw control: In many shooters, it's possible to just ignore drift by merging the native yaw turning controls and head tracking. This has the side effect of having the player always move in the direction his head is pointing. It isn't practical for situations where head tracking must be independent of player orientation, like in vehicles.
Reset button: Most Rift demos have a key to reset the yaw to the current orientation. Though not ideal, it's often a good idea to include a reset binding in games, especially to correct for the large yaw offset if the player was looking to the side when the game started.
Contextual actions: Specifically, one could assume the the player is facing mostly forward when firing the weapon in a shooter, or performing any other kind of attack. Re-centering during these actions can keep yaw drift to a minimum, but might introduce some confusion. This is my preferred solution currently, though it's difficult to tell if it would hold up in wider testing, especially for players that don't understand that the correction is happening.
Just wait: It's possible that yaw drift will be a solved problem in hardware in the consumer version if the Rift. Most solutions for positional tracking could determine absolute yaw, much how pitch drift is currently solved by measuring gravity with the accelerometers.
6 Replies
- ColdEquationHonored GuestIt's worth including my testing method for drift. Though the error accumulates over time, it isn't very effective to just wait for the yaw to have a noticeable offset, especially when testing a correction method.
I start by holding the Rift in front of me in both hands, simulating looking forward. I then quickly and gently dip the left side down, while also bringing it close to me. The result is a position where the unit is facing down and to the left, tilted 90 degrees in both pitch and yaw. I then bring it strait up until it's facing directly to the left. Finally, I bring it forward again. By doing this several times, I can produce a significant offset. It feels a bit like a "scooping" action, and doesn't require much space to perform. Let me know if you have another method of causing drift, as testing would benefit from some variety. - tomfExplorerThe code in the SDK corrects the drift using the magnetometer. It is still a work in progress, and there's more to be done, but this is probably your best bet for the near future.
- zaloExplorerIf you don't mind a ceiling mounted PSEye and a couple LEDs at the corners of the rift, then this yaw measurement solution might be helpful:
Plus, it has the added side-benefit of positional tracking. - BlackFangHonored GuestI'm thinking about doing a reset anytime the user opens his inventory in my game, with reminders of this on loading screens and on the menu.
- Matt1UpHonored GuestUse a Kinect. Get the depth data from the heads skeletal position. Analyze the depth data to figure the orientation of the front face of the Oculus which should not be very difficult considering that it is big, flat, and non-reflective.
Even if you move around a little it should remain pretty accurate considering the fact that you only need to keep track of the Y Axis.
The other idea that comes to mind is to get a webcam. Take it apart, remove the IR filter and mount the little PCB with the CMOS on it to the front of the Oculus Rift and just place a single IR Led somewhere in front of it...like on the wall or on top of your computer monitor. Then just do some kind of blob tracking. Sort of like the PSEye I think (have never messed with it) but I'm guessing it is a little simpler to wear the camera and track one led instead of triangulating and whatnot.
The other thing about using a webcam is that you could use a POS and it would still work fine because you don't need a constant flow of data coming in....just a reference point to check up on every now and then
EDIT: moving around a lot might mess up the webcam idea but then again maybe not if you mount the single LED at a decent distance since the correction doesn't need to be exact really (either way it's gonna be more accurate than when it drifts off into space)
I bet you lasers would work as well.........hmmmmm - Matt1UpHonored GuestMount a decently bright laser to the oculus and position a webcam in the back of the room which tracks the laser dot as you rotate your head..laser would shine forward and hit a wall in front of you and the webcam would be positioned above and behind you
You don't have to run any extra cords because you could just get a little battery powered laser or else tap into the Oculus power.
K...I'm done coming up with ideas :mrgreen:
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device