Skip to content
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

WebGL Example - Incorrect rotation on screen #91

Open
alapsansky opened this issue Jan 25, 2022 · 2 comments
Open

WebGL Example - Incorrect rotation on screen #91

alapsansky opened this issue Jan 25, 2022 · 2 comments

Comments

@alapsansky
Copy link

The motion of the 3D model in the WebGL example does not reflect the motion of the BNO055 sensor. Specifically, with the sensor on a flat surface with the VIN to RST pin holes facing away, a change in pitch of the sensor (which accurately changes the values next to "Pitch =") causes the model to roll. A change in roll causes the model to yaw. And a change in yaw causes the model to pitch.

The system shows a complete calibration. Because the Euler output seems correct, I am guessing that there is some issue with the order of the quaternions in the code, but I have not been successful with identifying the exact issue.

I have tested this with two sensors, using both a direct soldered connection and a QWIIC connector.

Any guidance would be greatly appreciated!

@alapsansky
Copy link
Author

I just wanted to check in to see if anyone has experienced this same issue recently. Thank you!

@hazemy
Copy link

hazemy commented Jul 25, 2023

Hello,
I can confirm that the same issue still exists. The yaw angle motion of the sensor is reflected on the screen as pitch and vice versa. I think this is related to the BNO_AXIS_REMAP (sec. 3.4 of the datasheet). This was already part of the WebGL example of the older library (https://github.com/adafruit/Adafruit_Python_BNO055/blob/master/examples/webgl_demo/server.py#L61). Axis remaps are already added to the CircuitPython library as per #78. I could only get this fixed by using the same axis remaps used in the older library example, combined with inverting the quaternion order (W,X,Y,Z). This is a hacky fix and further digging into the mentioned section of the datasheet is necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants