[bouLED] Visualizing an orientation

The first thing I did for our project bouLED was to write a python script to visualise the orientation of our test card.

bouLED will need to know its orientation, which will be computed from a MARG (Magnetic, Angular Rate, and Gravity) sensor using Madgwick’s algorithm. In order to easily check the results of this computation, we want to draw and rotate a 3D shape as we rotate the card with the MARG sensor. The orientation of the card is represented as a quaternion, and will be sent to my python script via a serial port.

We haven’t implemented Madgwick’s algorithm yet, so I just sent arbitrary quaternions to test the visualization. Its latency was at first unacceptable (~0.5s) when I used PySerial to read the serial port.  Sending the serial port to the script standard input made the latency imperceptible.

5 Replies to “[bouLED] Visualizing an orientation”

  1. Hi,
    Good luck with your projects!

    FYI I don’t see this project in the “About” section, could you add this page so that we can get an overview of all projects please ?

  2. Hello,
    I ‘am working at the moment on pyqtgraph , to make simulation of a pararglider in the air based on sensor data.

    I’am very interested to see your python script , doing , the visualise the orientation of the cube.
    It will help a lot , could you share it ?


    1. Hello Fred,
      Here’s the PyQtGraph simulator, it receives quaternions on standard input and rotates the model accordingly.

      I hope you’ll find it useful. Good luck with your project, it sounds very interesting !

Leave a Reply

Your email address will not be published. Required fields are marked *