DavidEGrayson / ahrs-visualizer

Draws a 3D representation of an IMU's orientation. Developed for Raspberry Pi and OpenGL ES. Works with minimu9-ahrs.
Other
49 stars 11 forks source link

Question : Jetson TX2 #8

Open andrewssobral opened 5 years ago

andrewssobral commented 5 years ago

Hello, thanks for providing this awesome app ! I would like very much to run it on my Jetson TX2, I tried to make some changes, for eg:

//#include <bcm_host.h>

//#include <GLES/gl.h>
#include <GL/gl.h>

but I'm still getting some errors (I see that bcm is from RPi):

ahrs-visualizer.cpp:46:15: error: ‘VC_RECT_T’ does not name a type; did you mean ‘GL_RECT_NV’?
 static inline VC_RECT_T rect_width_height(int width, int height)
               ^~~~~~~~~
               GL_RECT_NV
ahrs-visualizer.cpp: In function ‘void nice_bcm_host_init()’:
ahrs-visualizer.cpp:77:5: error: ‘bcm_host_init’ was not declared in this scope
     bcm_host_init();
     ^~~~~~~~~~~~~
ahrs-visualizer.cpp:77:5: note: suggested alternative: ‘nice_bcm_host_init’
     bcm_host_init();
     ^~~~~~~~~~~~~
     nice_bcm_host_init
ahrs-visualizer.cpp: In function ‘void opengl_init()’:
ahrs-visualizer.cpp:86:12: error: ‘EGL_DISPMANX_WINDOW_T’ does not name a type; did you mean ‘GL_DISPLAY_LIST’?
     static EGL_DISPMANX_WINDOW_T nativewindow;

Some tips?

DavidEGrayson commented 5 years ago

I think that the bcm stuff (and maybe the vc stuff) is specific to Broadcom processors. I suggest that you find an Open GL tutorial that works for the Jetson TX2, compile and run it to make sure it works, and then replace the Broadcom-specific stuff with whatever code is appropriate for that platform.