Comments (2)
Thanks for catching the broken URL, here are some comments on your observations. Hopefully they help.
a) Yes, when the device is not calibrated it will act strangely. Ideally before calibration you would use the sensor fusion with only the accelerometer and gyroscope. Then add the magnetometer after the user calibrates. Before calibration, my demo still used the uncalibrated values caused the odd behavior.
b) I was playing around with various parameters while I was testing the device before figuring out the offset magnetometer issue. I never went back and tuned the parameters so they are likely not great.
c) The lines of code you referenced are equivalent to applying a rotation matrix to the magnetometer in order to rotate around the x-axis. I also found I needed to negate the x-axis. All of those are static operations so I'm not sure those would cause anything to increase over time. That could be a result of an incomplete calibration. If magnetometer started getting readings larger than the largest values seen during calibration that might cause issues. You could take a look at https://github.com/cwig/gearvr-exploration/blob/main/calibrate.html which is the code I used to visualize the readings of the sensors. It was a little while ago that I used it so I'm not sure it is 100% working.
d) The adjustments I made to the controller model were to put the center of rotation in the center of the main handle and to align the main handle to the x/y/z axes of the sensors (In the original obj file, the touchpad part of the controller is aligned to the axes, you can see this by opening both files in https://threejs.org/editor). This change makes the virtual controller correctly represent the real controller. You can test this by setting the controller upside down on a flat surface. Then when you rotate it, the main handle of the virtual controller should rotate on a flat plane. With the original obj model this is not the case, the touchpad part rotates on a flat plane. Hopefully that makes sense. If the nose is pointing too far down, you can change where you point it before hitting the home "reset position" button to correctly offset it.
from gearvr-exploration.
Hey, thanks for replying. Unfortunately, I have not been able to make any use out of your project so far. Therefore, I have created a sort of calibration of my own that calculates the drift in two steps within the first 20 seconds and then counters it. This does also not use the Magnetometer as it just makes the controller behave more irratically.
Regarding the controller model, I understand what you were trying to accomplish; however, it just looks "better" and more natural the old way. This is especially true because when you hold the controller the touchpad area ist in fact where the axes should be. The touchpad area is the tip and when you want to point somewhere with the controller, the pointing is done with the tip of the controller, not the handle.
from gearvr-exploration.
Related Issues (1)
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 gearvr-exploration.