I’ve been really loving the VR in android mode, its really easy to use! However, I’m developing a little app and I noticed that when the phone is completely still, everything slowly moves/rotates to the left.
Initially I thought it was my code, but upon rotating the phone, the movement/rotation was inverted and started going to the right (the app kept upright since it was in VR mode). This led me to think that perhaps the gyro/accelerometer readings are somewhat noisy and hence are causing this movement.
Could this be the reason? Does anyone know how I could add some sort of filter so it doesn’t affect my app? I’m currently using a Nexus 5 phone, I don’t know if that changes anything.
I thought about this at first but the drift is so fast that I doubt that could be the cause.
This might be the easiest approach, since I believe filtering the gyro/accelerometer data coming into the app would not be easy at all. Do you have any idea on how I could figure out the rate of the rotation in order to apply it to a counter rotation?
Hello @Andres, just wanted to tag you in this topic since I believe you might be able to give a more definitive answer to this problem? Please answer if you have the time, thanks in advance!
You could record your acc data and analyze it offline to see if there is any bias in your sensors. I can imagine if the bias is an actual offset, then you could compensate that in software. However, if the effect is dependent on force history that the sensor has experienced, it might be trickier.
You can find recording sensor sw online in the store, if you don’t feel like writing your own code.
It seems it is a very common problem with VR on smartphones. Newer Android phones use a method to filter out this noise by combining the data of various sensors. Some people recommend installing this third party module on rooted phones, which pre-processes all gyro data before sending it to any app. Since my phone is a Nexus, rooting is allowed and seems to be simple so that is something I’m willing to try.
I downloaded this app called “Sensor multitool” which allowed me to see the sensor readings in real time when my phone is lying on the floor. The gyro reports: y = 0.00 rad/sz = 0.00 rad/s while x seems to erratically change between 0.01 and 0.00 rad/s, this erratic movement seems to settle on 0.01 rad/s when the phone is still on landscape mode, which means perhaps that is what is causing the gyro drift?
With regards to the accelerometer, all values move erratically in the decimal places, but in general it seems to report: x = -0.10 m/sˆ2 y = -0.10 m/sˆ2 z = 10.50 m/sˆ2 which seems odd as I think the only acceleration that should be acting on it should be gravity (granted my physics knowledge is not much so I wouldn’t know for sure)
Thanks for your response! I have and the results are the same, the demo cardboard apps also drift slightly when the phone is still.