cwig / gearvr-exploration Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
I have tested your project and it kind of seems to work in your web demo, but I have made some observations.
a) When not using the calibration mode the controller sometimes randomly points in a direction. Also, the rotations of the controller are not fully executed by the model in the demo.
b) When using the calibration mode the controller model "overshoots" when moving in a direction. Meaning, if you rotate the controller by 45° on the Y-axis, the model will actually "bounce" further, to like 55°, for example. I believe this happens because you chose a very high Beta of 0.8 when initializing the Madgwick sensor fusion algorithm.
c) When I use the calibration code in my C# project (it can basically be copied over from JS with minimal adjustments for the C# notation) the behavior is very weird. It does calibrate the magnetometer and I can see the values changing (X is going nuts as usual, Y and Z seem to be increasing over time until you calibrate again), but when you move the controller in one direction around the Y-axis or Z-axis (coordinate system in Unity: https://miro.medium.com/max/2800/1*NmzBmBk5SMUULxk8hcOsdw.png ) the controller starts to move back in the opposite direction again, trying to center its rotation around that axis to point where it wants to go initially when drift was still there. It's kind of hard to explain and grasp without showing it. But this might have something to do with your calculations in https://github.com/cwig/gearvr-exploration/blob/main/ControllerBluetoothInterface.js#L169 (and the line below).
d) The adjustments you have made to the controller model rotation are not accurate, the nose of the controller is pointing too low. The old variant of jsyang seems to be better.
btw, the link in your Readme.md below the code snippet points to a 404 (wrong URL) :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.