3rl-io / spidgets-3dof

Example app for spatial widgets with 3DoF
MIT License
24 stars 1 forks source link

Massive drifting with xreal air glasses #3

Closed mnjm97 closed 1 day ago

mnjm97 commented 2 weeks ago

it is common knowledge at this point that these glasses have a drift issue. however, this spidgets-3dof project is the only one that I visibly notice while I watch the screen moving steadily to the right.

kkota1 commented 2 weeks ago

The drift is currently hardcoded here for my rokid glasses, so it might be making yours worse if the gyroscopes go in opposite directions or something

TODO: create an auto-calibrate process

kkota1 commented 2 weeks ago

I’m planning to get this done by Saturday 6/15

kkota1 commented 2 weeks ago

If you pull the latest, there's now an automatic process for yaw drift correction

Code: https://github.com/3rl-io/spidgets-3dof/commit/b12f179eced25c8a7bd6a792845b1094d5df29aa Readme: https://github.com/3rl-io/spidgets-3dof?tab=readme-ov-file#calibration

mnjm97 commented 1 week ago

that seems like that maybe helped with yaw. however, I am at least also having issue with roll drift as well. darn thing turned almost 90° to the right after a while of use.

kkota1 commented 1 week ago

I’ll be adding a re-center button/basic menu soon but for now you can run headset.center() in the browser console to recenter the yaw axis or headset.sphere() to re-center all three axes

I guess the yaw drifts the opposite way if the glasses are upside down, and we don’t account for that so if you take a break they’ll be messed up when you get back. Will likely add a feature to detect upside down and re-center automatically when the user returns

mnjm97 commented 1 week ago

a reset button is a good idea. however, I would need to be spamming the button almost non stop to be useful. I am seeing about a 1° per second roll. i hardly even noticed any roll drift before you added the yaw calibration.

kkota1 commented 1 week ago

Hmm, thanks for reporting this. I’ll need to get some Xreals to test and report back later. My Rokids don’t drift at all for roll and pitch, not even a degree over several hours. If xreal or other brands drift then we’ll probably need to add roll correction exclusively for those

On Sun, Jun 16, 2024 at 3:46 AM mnjm97 @.***> wrote:

a reset button is a good idea. however, I would need to be spamming the button almost non stop to be useful. I am seeing about a 1° per second roll. i hardly even noticed any roll drift before you added the yaw calibration.

— Reply to this email directly, view it on GitHub https://github.com/3rl-io/spidgets-3dof/issues/3#issuecomment-2171428768, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ3FPG4V4QVE4WJDWRSGX6LZHVUIHAVCNFSM6AAAAABJIYI5DOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZRGQZDQNZWHA . You are receiving this because you were assigned.Message ID: @.***>

kkota1 commented 1 week ago

None of the changes here affects the Z axis so I’m not sure how roll would be affected unless it was broken before. @tribbloid do you know if Xreal has roll drift on the hardware side?

kkota1 commented 1 week ago

@mnjm97 sorry for the spam but when you have a chance can you confirm whether your pitch is steady, and paste the contents of the drift file that was created during calibration? It should be a 12 digit decimal

mnjm97 commented 1 week ago

nothing seems steady. there is drift in pitch, yaw and roll. I think these glasses may be hopeless. on last calibration the drift file is 0.00000360491 but that is very different each time I calibrate.

kkota1 commented 1 week ago

Thanks for providing that. Agree it could be a damaged IMU. Do you also have a beam/nebula where the 3DoF is working fine with this particular pair of glasses?

Currently the drift file only applies to yaw but we could easily add two more calibration numbers for pitch and roll. However, if the number changes frequently like you said, it won’t help.

I’m going to AWE this week and will see if I can test various xreal models with my Linux laptop

On Mon, Jun 17, 2024 at 7:40 AM mnjm97 @.***> wrote:

nothing seems steady. there is drift in pitch, yaw and roll. I think these glasses may be hopeless. on last calibration the drift file is 0.00000360491 but that is very different each time I calibrate.

— Reply to this email directly, view it on GitHub https://github.com/3rl-io/spidgets-3dof/issues/3#issuecomment-2173603415, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ3FPG4R6BVWQUIPUW5YCOLZH3YPPAVCNFSM6AAAAABJIYI5DOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZTGYYDGNBRGU . You are receiving this because you were assigned.Message ID: @.***>

mnjm97 commented 1 week ago

I don't have beem but I have tried nebula as well as breezy-desktop, monado and steamvr. they all have some drift but not this bad.

ok so maybe the roll isn't as bad as I previously thought. I was trying to do viewing in reclined position and in doing so I had to move the widget location to s-group rotation="60 0 0" so I think that it was actually turning yaw but because the position was more overhead it appeared to be rolling. I would like to try and see if adding calibration for pitch and roll would help.

kkota1 commented 1 week ago

I‘ll do some research and get back to you later this week. The two new cal numbers would be harmless to add, but I want to see if the driver in headset-utils is messed up for Xreal in general. So as to not complicate this code if there’s a better fix somewhere else. Thanks for your patience

kkota1 commented 1 week ago

That makes sense that yaw drift would look like roll when reclined. This wont help with the amount of drift but if you use headset.sphere() in browser console that will re-center all three axes so that default rotation (0 0 0) will pin directly ahead of your current orientation. This is super useful when reclined

mnjm97 commented 1 week ago

OK that works better now. I had to reset my changes to the group rotation because if I used "headset.sphere()" it was obviously pushing the adjusted group rotation even further "UP" LOL

however, even using headset.sphere() with everything centered, if I am reclined, it still is rolling. is there a way to toggle this behavior based on position?

kkota1 commented 1 week ago

That sounds like a smart feature to add some time in the near future. We want to switch modes intuitively based on motion data, low battery, etc so probably will end up calling it "reclined" mode instead of sphere

If you're open to learning alpinejs it's super useful for making your own interactions with bindings inline with html. There's an example in the "compat" folder where I toggle widgets and motion with buttons. Ctrl-f "stress test"

On Mon, Jun 17, 2024 at 11:30 AM mnjm97 @.***> wrote:

OK that works better now. I had to reset my changes to the group rotation because if I used "headset.sphere()" it was obviously pushing the adjusted group rotation even further "UP" LOL

however, even using headset.sphere() with everything centered, if I am reclined, it still is rolling. is there a way to toggle this behavior based on position?

— Reply to this email directly, view it on GitHub https://github.com/3rl-io/spidgets-3dof/issues/3#issuecomment-2174117363, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ3FPG5PBEQZZFIBWO2IQT3ZH4TNBAVCNFSM6AAAAABJIYI5DOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZUGEYTOMZWGM . You are receiving this because you were assigned.Message ID: @.***>

mnjm97 commented 5 days ago

I am always open to learning new things.👍 however, i must be a bit dimmer than I used to be as I can't get the other two calibrations to work correctly.

kkota1 commented 4 days ago

Hi sorry for the delays. This week I will be adding an option in the UI to toggle and change sensitivity for each axis independently, so one option will be to turn off roll altogether

At this time we won’t be adding correction for it because IMUs should only have yaw problems. This project is still early and we need to keep complexity down wherever possible

On Sun, Jun 23, 2024 at 1:25 PM mnjm97 @.***> wrote:

I am always open to learning new things.👍 however, i must be a bit dimmer than I used to be as I can't get the other two calibrations to work correctly.

— Reply to this email directly, view it on GitHub https://github.com/3rl-io/spidgets-3dof/issues/3#issuecomment-2185314400, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ3FPG4IODPNWOVK6AMFBNDZI4VNDAVCNFSM6AAAAABJIYI5DOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBVGMYTINBQGA . You are receiving this because you were assigned.Message ID: @.***>

kkota1 commented 4 days ago

Added re-center and roll toggle buttons for now

https://github.com/3rl-io/spidgets-3dof/commit/fce5e5eef94c56f752f8cf3cbb1982feee73b5ec#diff-2b58c6f03c86bed2bdac45dcdf7e44fd7f94aa665b294c580ddd75c0c26ea805R1

kkota1 commented 1 day ago

Closing this for now as a hardware defect. Today, I made some changes to centering that makes it more intuitive in a recliner, and that might reduce the effect of roll drift