IMU 3D visualizer with Python, OpenGL and NPX 9-DOF Breakout Board - FXOS8700 + FXAS21002 (originally MPU6050)
Note: In the original version the "Yaw" mode was not implemented yet. It has now been modified to include Yaw in the visualizer and receive the data string (yaw, pitch, roll) from the serial already filtered out.
In this example the 9-DOF- FXOS8700 + FXAS21002 Breakout Board is used, but as long as you send a serial string with the following format this program should always work:
"Orientation: 347.66, 1.26, 1.38 (YAW, PITCH, ROLL)"
Simulador 3D para acelerometro/gyroscopio MPU6050
-
Python 3
-
Tkinter
-
pySerial
-
pyOpenGL
-
IMU unit (NPX 9-DOF Breakout Board - FXOS8700 + FXAS21002 used in this example, similar should work)
-
Microcontroller (ESP32 used in my case, similar should work)
-
USB-Serial Converter (in case the microcontroller doesn't have one on-board included)
Tutorials followed for the setup of the
"calibrated_orientation" sketch from Adafruit_AHRS library
Original article: https://learn.adafruit.com/how-to-fuse-motion-sensor-data-into-ahrs-orientation-euler-quaternions/overview
Original Visualizer: https://learn.adafruit.com/how-to-fuse-motion-sensor-data-into-ahrs-orientation-euler-quaternions/webserial-visualizer
Magnetic calibration performed with https://github.com/PaulStoffregen/MotionCal -> https://www.pjrc.com/store/prop_shield.html
Deprecated (original wiki):
Puedes ver mรกs acerca del proyecto en el video demo
Para comenzar es necesario contar con el microcontrolador encargado adquirir los datos del MPU6050 y enviarlos de forma serial.
Aqui hay algunos ejemplos de como hacerlo utilizando:
En la siguiente imagen se muestra el formato de la trama de datos necesarios.
Original author:
- Mario A. Lugo MA-Lugo
Contributors:
- Marco Farias marcofariasmx