Running 3Dimu.py

Hey guys,

I’m trying to run the IMU visualization script but I’m getting:

Traceback (most recent call last):
      File "3Dimu.py", line 10, in <module>
        from OpenGL.GL import *
    ImportError: No module named OpenGL.GL

This is in the Navio RT kernel. Is OpenGL really not installed? That’s what this seems to indicate but I’m not familiar with how to check. Still getting my feet wet in Linux.

Thanks!

Hey,

We made this example to be run on a PC not on the Pi itself, we should update it for Pi also… Can you try it on your computer first?

Ahhh, right, my mistake. Still not working on my PC but that might be because I don’t have it setup correctly. I’ll keep toying with it and see if I can get it working. I have pyOpenGL installed, so that error is gone, but now I get this in the Python 2.7.9 shell:

Traceback (most recent call last):
  File "D:\Navio+\Navio-master\Navio-master\Utilities\3DIMU\3Dimu.py", line 107, in <module>
    glutInit(sys.argv)
  File "C:\Python27\lib\site-packages\pyopengl-3.1.1a1-py2.7.egg\OpenGL\GLUT\special.py", line 333, in glutInit
    _base_glutInit( ctypes.byref(count), holder )
  File "C:\Python27\lib\site-packages\pyopengl-3.1.1a1-py2.7.egg\OpenGL\platform\baseplatform.py", line 407, in __call__
    self.__name__, self.__name__,
NullFunctionError: Attempt to call an undefined function glutInit, check for bool(glutInit) before calling

I do receive good data using the GPS examples in C++ and Python, so nothing to worry about there.

This can be a problem with OpenGL.GLUT downloaded as pip from the official source ( http://stackoverflow.com/questions/26700719/pyopengl-glutinit-nullfunctionerror )

You could try to reinstall OpenGL from binaries ( http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyopengl )

python -m pip uninstall PyOpenGL PyOpenGL_accelerate pip install c:\Downloads\PyOpenGL_accelerate-3.1.1a1-cp35-none-win_amd64.whl pip install c:\Downloads\PyOpenGL-3.1.1b1-cp35-none-win_amd64.whl python c:\Navio\Navio-master\Utilities\3DIMU\3Dimu.py