psmoveservice / PSMoveService

A background service that communicates with the psmove and stores pose and button data.
Apache License 2.0
593 stars 148 forks source link

Is there a way to turn off accelerometer? #694

Open ZedVR opened 4 years ago

ZedVR commented 4 years ago

So I've seen several people having the same issue, mainly in Beat Saber: if you swing your controller too fast, the accelerometer's reading will mess up your orientation, because it will only slowly find itself in the right direction (even 1-2 secs lag). But in the config tool if you test orientation, this problem is not present (I assume it only reads from gyroscope?!...), but in the accel test, ohh boy there it is.

Beautiful example is Riftcat's new option, which let's your phone be used as a controller. It is only 3-DOF, but is it tracking orientation perfectly! There is no lagging and slow catch up, it is turning the right way instantly, even after minutes of swinging it like crazy. You once recenter it to the right direction, and you won't have to do it again in your whole gaming session. Only problem is it lacks tracking, so not the best option afterall.

1.) So my first question is: why is that the phone can perfectly keep orientation, without any lagging, while a MOVE controller, which is designed for it, cannot? 2.) If the only problem is that it lets accelmeter mess up orientation, is there a way to turn it off, if needed along with the magnetometer? I can set the center myself, and it is perfectly fine if it keeps this as a reference, and only uses gyroscope (assuming that the phone is doing the same). Tracking is solely done by the PS Eye cameras, these sensors don't have to interfere.

3.) As a wild fantasy: if it is not manageable, would there be someone crazy enough to write the programming, like the Riftcat's controller program, which uses an android as a controller (only using phone's sensor for orientation), attached with a ping pong ball giving the tracking position?

I'm sorry it became too long, but I am struggling with it for days, and I can't get it work properly.

monsterjj00 commented 4 years ago

I seem to have fixed this myself since I was having the same issue as you. I went into the appdata folder where PSmove stores its data and found both the controllers .json files. should look something like this 00_06_f5_91_9a_4a.json when you enter each file in a text editor youll see the "Accel" parameters, I set them all to zero even the variance. it should look like this. "Accel": { "X": { "k": "0", "b": "0" }, "Y": { "k": "0", "b": "0" }, "Z": { "k": "0", "b": "0" }, "Variance": "0", "NoiseRadius": "0" Ill test it out and see if it is any better though.

EDIT: Update, this doesnt seem to work, the controller gets very confused for some reason and im not sure why.

ZedVR commented 4 years ago

@monsterjj00 Thanks for the tip! I have tried it, and it indeed disables the reading from the accelmeter, according to the accel test in config tool. In Beat saber it is much more playable, so it is closer to a good experience with it! But now another, smaller problem occurs: there is a slow drifting on the controller to one direction. I assume reading from accelerometer was responsible remembering the initial direction. Magnetometer is still reading, so I'm a bit confused, shouldn't it keep the orientation?!...

Anyway, I will try further!

Eerovil commented 4 years ago

@ZedVR Did you get anywhere with this? I'm having the same problem.

Edit: I've been crawling through the source code, and to me it seems that the accelerometer is never used in the orientation filtering. So there should be no effect whatsoever regarding that.

ZedVR commented 4 years ago

@Eerovil Unfortunately not, but I have learned that it is simply because the PS move controllers (and probably the newer one too, but the old types definitely) are quite obsolete, the sensors are just simply like that. There seems to be no way of getting rid of this drifting, best way is to avoid games where you have to swing your controller too fast, unfortunately especially Beatsaber, which would be my main target...

But with accelerometer's calibrations set to 0, there is no drifting whatsoever. I guess with some programming it would be possible to let it periodically check the general orientation, let's say every 5-10 secs, and let it recenter itself, but I'm not guru in this, so it just remains a dream.