-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rotation and Direciton drifts #13
Comments
I would be surprised there is no drift. Joycon likely does no have space grade gyros. |
Did you manage to make sens of the accelerometer and gyro values returned by the library? |
Hello,
Sorry i have not looked into it in a while. I'll get back to it in a bit,
but when I measured it, the gyro values seemed to change at a constant
rate, like every 4 times I printed the value, it changed by the same
amount. Maybe the readings are off for a lot of the values, but might need
a class that handles reading transformations for joy-cons. I haven't looked
at any other documentation on this
…On Thu, Sep 17, 2020 at 6:28 PM Tetsujinfr ***@***.***> wrote:
Did you manage to make sens of the accelerometer and gyro values returned
by the library?
I got some pretty high accel values even at rest, accel does not look like
accel values. Not sure I read those properties properly, they might be
already transformed and not raw sensor values.
Do you know any documentation on this?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#13 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHXLPDUCVSQNS4EEDS6GVQ3SGKZTVANCNFSM4N7JEYGA>
.
|
Thanks for your reply. I think I am good with gyro values, my main difficulty is with accelerometer values. What do you think ? Did you use those calibration functions with offsetcall for accelerometer or even gyro, from the library? |
I think it includes gravity |
Thanks, that is super helpful, I will give a try at removing gravity from the accel vector. Do you know if there is a function to do that? Usually it is useful to have the orientation to do it better. |
So I am looking at this again and I cannot figure out how to interpret the accel and gyro values from the joycon api, here are some examples: scenario 1, left joycon is standing still on a table, pointing to the front wall
scenario 2: from case 1, the joycon is rotated -90° on the yaw so now standing still on the edge without buttons (so the one opposite of the edge with sr and sl buttons):
scenario 3, from case 2, rotating 90° so that ZL points up at the ceiling:
Anyone who can help who has been using the accel and gyro values to do something meaningful? |
ok so not sure how but I did not see the gyro helper class section in the readme... which does quite well what I was looking for. in the code of the helper class GyroTrackingJoyCon, it is mentioned that a calibration is necessary
that may be a cause for the drift, i.e. the need to calibrate a drift offset and feed it to the class. |
ok so by calling the |
While the IMU in the Joy Cons are way better than in the one in the Wiimote+, it still has its shortcomings. Both in terms of noise and sample rate. It could be possible to play around with different sensitivities and filtering techniques to combat this noise, but finding other sources to combat the drift (like gravity ;) ) is still neccesary. I believe the Oculus Quest controllers use a IMU to measure the faster micro scale changes, and use its camera tracking to combat drift on the macro scale. The callibration code i wrote is naive and it does not account for factors such as the rotation of the earth, or different sensitivities for the 3 rotational axes. The sensor may also be non-linear, which is not accounted for. |
It would be nice if it could work like it does in Super Mario 3D All Stars |
I have yet to try that game, but if a pointer is all you need then I'm guessing it works much like how the LG smart TVs do it: It disallows the pointer to move outside of the edges of the screen, effectively turning the corners into calibration spots. Finally it could use direction of gravity to keep the roll from drifting. Implementing this should be relatively simple and a fun exercise. I'm busy writing a masters thesis, but perhaps my outlined description inspires someone. ;) |
From what I remember you can move the pointer off the edge, but I'll have to play it again to see |
the rotation and direction values seem to change over time without moving the joycon
The text was updated successfully, but these errors were encountered: