Comments (6)
I implemented a solution using the new deviceorientationabsolute event, so it currently works only in Chrome for android (>50). For other devices, behavior will not change.
The basic idea is to have a second complementary filter step which fuses the calculated rotation quaternion with the rotation given by deviceorientationabsolute.
This takes care of the drift, but because the magnetometer is laggy, the user may see the scene moving even when her head is not moving. So to prevent this, I used an adaptive fusion factor which is equal to 0 below some radial velocity threshold.
This means that in the short term the user may experience yaw drift, but it should cancel out over time (assuming there will be some head movement)
I'm not sure that it's good enough for a PR, but in case someone finds it useful - it's available in my fork.
from webvr-polyfill.
This is not surprising. The problem complimentary orientation filter is
solving is not drift in general, but the visible drift caused by using the
magnetometer indiscriminately. In this case, you hold your cardboard still
and the world moves anyway. See my blog post about it.
On Sun, Jan 24, 2016, 6:06 AM iRomano [email protected] wrote:
Hi
I'm using ComplementaryOrientation, from your sample (
https://githubcom/borismus/webvr-polyfill/tree/master/fusion)
But i have an error with iPhone 5/5S, gyro is driftIf you were to place your phone flat and capture it's gyro-based position,
then pick it up, rotate it a bunch, and place it flat again, its integrated
gyro position might be quite different from what it was before—
Reply to this email directly or view it on GitHub
#30.
from webvr-polyfill.
Hi
I read your article: http://smus.com/sensor-fusion-prediction-webvr/
And i used fusion - ComplementaryOrientation, prediction.
Maybe I poorly explained my problem.
If you pick up the phone and rotate it, then put in the original value, the value of event.alpha is another.
I found the event: event.webkitCompassHeading
Maybe it used to calibrate?
Is ComplementaryOrientation support this event?
from webvr-polyfill.
We do not currently have a fix for long term drift. It might be possible to
use the compass to help solve the problem, but it has to be done very
carefully since the magnetometer is notoriously noisy and unreliable. Even
in native cardboard sdk the problem is unresolved.
If you have ideas for solving the problem, please experiment with them and
send a PR to the polyfill :)
On Sun, Jan 24, 2016 at 9:05 PM iRomano [email protected] wrote:
Hi
I read your article: http://smus.com/sensor-fusion-prediction-webvr/
And i used fusion - ComplementaryOrientation, prediction.
Maybe I poorly explained my problem.
If you pick up the phone and rotate it, then put in the original value,
the value of event.alpha is another.
I found the event: event.webkitCompassHeading
Maybe it used to calibrate?
Is ComplementaryOrientation support this event?—
Reply to this email directly or view it on GitHub
#30 (comment)
.
from webvr-polyfill.
Sorry to bring up an old issue, but unfortunately it's still relevant.
I too am trying to solve the absolute drift issue (which is not only related to iPhones BTW).
In my research, I found that there are several available algorithms intended for 9DOF sensor fusion (EG Mahony, Madgwick).
I'm still trying to wrap my head around the math in these algorithms, but I had to wonder whether my efforts are futile.
Meaning - what was the reason that none of the available algorithms were chosen in implementing the polyfill?
Were they tested and found to be unsuitable? Too time-consuming to implement? Too processor intensive?
I believe that the answers might save some time in attempts to solve this problem.
from webvr-polyfill.
Absolute drift is a hard problem. My experience with magnetometers in many phones is that they aren't reliable at all. The fusion in this project is pretty basic, but engineers on my team have spent a lot of time, and native implementations are more sophisticated.
They haven't quite cracked the absolute problem though. If you can improve on the sensor fusion in this project by fusing with magnetometer, very open to accepting PRs. But whatever you want to land would have to go through testing on a bunch of hardware.
from webvr-polyfill.
Related Issues (20)
- Customize controls design + autohide function HOT 2
- mimeType is not defined HOT 5
- Customizing visor profile? HOT 5
- is webvr-polyfill compatible with the newest versions of THREE.js? HOT 5
- black screen is rendered when VREffects script is not used with webvr-polyfill HOT 3
- Markerless AR for web using WebVR HOT 2
- Stopped working on IOS version 12.2 HOT 2
- On Chrome 74, Enter VR Mode on mobile stops working with http:// protocol.
- devicemotion event support is removed from chrome 74 on using http:// protocol. works fine with https:// HOT 1
- "View in VR" does not remove the address bar on iOS HOT 5
- Does this still work and maybe I'm using it wrong? HOT 1
- screen.orientation.lock() failed
- Pose sensor on Android 9 in webview stopped to work HOT 2
- Is wake lock base64 video required ? HOT 3
- [QUESTION] Doesn't work with Angular in production mode HOT 1
- Remove Cardboard middle white line
- Touch doesn't work HOT 1
- The polyfill broke down on iOS? HOT 1
- host-provided navigator.getVRDIsplays returns an empty list. how does one force the polyfill to populate the list?
- Polifyll wont work on iOS - Reproducible example inside HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webvr-polyfill.