Skip to content
David Grayson edited this page Apr 16, 2017 · 5 revisions

ahrs-visualizer reads orientation data on its standard input and uses that to display a 3D representation of the orientation. The ahrs-visualizer source code is on github.

To see what the visualization looks like, check out this video showing the MinIMU-9 v2 with a Raspberry Pi.

Currently, the presence of GPU-specific code means that it only works on the Raspberry Pi but it can probably be ported to other boards. It uses OpenGL ES 2.0.

Getting started for experts

If you are an embedded Linux expert, the only getting-started instructions you will need for ahrs-visualizer are:

  • Get minimu9-ahrs working.
  • Compile ahrs-visualizer from source by following the README.
  • Run minimu9-ahrs | ahrs-visualizer.

Getting Started

Get minimu9-ahrs working

This program is meant to be used with minimu9-ahrs, a separate utility that reads data from the Pololu MinIMU-9 and computes its orientation. To get that working, please follow the instructions in the minimu9-ahrs tutorial.

Compile ahrs-visualizer from source

Run these commands to download ahrs-visualizer from GitHub, compile it, and install it:

sudo apt-get install libpng-dev libboost-program-options-dev
make
sudo make install

Invoking

To pipe direction cosine matrix (DCM) data from minimu9-ahrs to ahrs-visualizer, simply run the following command:

minimu9-ahrs | ahrs-visualizer

The visualizer runs fine from the console; you do not need to run X.

Understanding the visualization

  • The 3D model is a Pololu MinIMU-9 v2.
  • The X axis is drawn as a red line.
  • The Y axis is drawn as a green line.
  • The Z axis is drawn as a blue line.
  • The acceleration vector is drawn as a cyan line.
  • The magnetic field vector is drawn as a yellow line.

More information

For more information, see the project's README file and its man page.

Error about opening a vchiq instance

If the program cannot open /dev/vchiq because of a permissions problem, you will see the following error:

Warning: Could not open /dev/vchiq: Permission denied.
* failed to open vchiq instance

On the Raspberry Pi, the right way to fix this error is to add your user to the video group. Just runL

sudo usermod -a -G video $(whoami)
Clone this wiki locally