thecountoftuscany / pyteapot-quaternion-euler-cube-rotation Goto Github PK
View Code? Open in Web Editor NEWVisualization of IMU orientation from quaternion or Euler angles with a rotating cube
License: GNU General Public License v3.0
Visualization of IMU orientation from quaternion or Euler angles with a rotating cube
License: GNU General Public License v3.0
Raising issue for the TODO
Add a nice [[https://docs.python.org/3/library/argparse.html][ argparse ]] interface instead of requiring the user to change variables in the script. Include example usage in docstring (a la [[https://tldr.sh/][tldr]] or [[http://bropages.org][bro]])
Raising PR with implementation
#7
Hi,
I tried to run the application on my Windows, but the window is black and is not responding. I believe it is same issue as mentioned in #5
Below you can find the screenshots describing the issue and my prerequisites installation:
I guess I have some dependency missing, but I don't get any kind of error. If someone has done Windows installation could you please guide what to do regarding other pre-requisites?
From issue #11, it seems like the program just hangs if the sockets are not configured properly (issue was reproduced on my Windows computer). The program should raise an error and exit instead of getting stuck. This works fine for misconfigured serial port.
Hi,
Thanks for the nice repo. I would like to ask about the Euler angle ranges obtained from MPU9250. Do you get the orientation values between -180 to +180 degrees on each Euler axes (yaw, roll, pitch)?
I am running on Linux (Ubuntu). The window shows for a brief moment before it closes and this error appears:
pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "pyteapot.py", line 188, in
main()
File "pyteapot.py", line 21, in main
resizewin(640, 480)
File "pyteapot.py", line 52, in resizewin
gluPerspective(45, 1.0*width/height, 0.1, 100.0)
File "/usr/local/lib/python2.7/dist-packages/OpenGL/platform/baseplatform.py", line 407, in call
self.name, self.name,
OpenGL.error.NullFunctionError: Attempt to call an undefined function gluPerspective, check for bool(gluPerspective) before calling
besides, configuring serial quaternion mode, does anything else need to be done to initialize the application?
I have also installed PyOpenGL and pygame. When i run the app a white window comes up, it never gets to draw the real application
Currently the perspective of the displayed object is flipped 180 degrees and I don't see any support for modifying the direction. Do you know how to implement this? I've tried flipping certain signs withitn glRotatef
, but haven't gotten it to change correctly.
Raising issue as per TODO.
Would like to submit PR for the same
Where can I get find the code that generates the quaternion for the MPU9250 raw data ? Your sensor performance looks really good.
Hey!
I have a dataset of IMU recordings with video and I want to verify that the quaternion outputs match the orientation I see on the video itself but I see no correlation between the video and the visualization for some reason.
I am trying to see if the sensor is outputting the wrong quaternion information (could be, using pretty low MAG, GYRO and ACCEL sample rate) but to be sure I need to know that the visualization is not wrong.
I am passing QuatW QuatX QuatY and QuatZ. Is this the correct order?
Thanks
is the calculation correct?
On your code:
yaw = math.atan2(2.0 * (q[1] * q[2] + q[0] * q[3]), q[0] * q[0] + q[1] * q[1] - q[2] * q[2] - q[3] * q[3])
pitch = -math.sin(2.0 * (q[1] * q[3] - q[0] * q[2]))
roll = math.atan2(2.0 * (q[0] * q[1] + q[2] * q[3]), q[0] * q[0] - q[1] * q[1] - q[2] * q[2] + q[3] * q[3])
And on wikipedia for example:
yaw = atan2(2 * (q0 * q3 + q1 * q2), 1 - 2 * (q2 * q2 + q3 * q3));
pitch = asin( 2 * (q0 * q2 - q3 * q1));
roll = atan2(2 * (q0 * q1 + q2 * q3),1 - 2 * (q1 * q1 + q2 * q2));
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.