Open Rom1deTroyes opened 7 years ago
Oh it's great that you are trying it on Raspberry Pi, I have always wanted to try but never had time to get a RPi and actually do it. The thing I am worried is the GPU of the Raspberry. Magic-Sand really need to use OpenGL and shaders to run. Maybe you should try some OpenGL examples from openframework first and check if they work fine ?
Do you need the UI ? Addons ofxDatGui, ofxModal & ofxParagraph are only required for the UI. If you don't have a second screen on the Raspeberry you can cut down these (and use default value or add some keyboard shortcuts which is rather easy).
I am setting up a sandbox and just did some tests today. I would LOVE to run this from a PI3. I don't know how to code but let me know if I can help in any way.
Your version of ofxCv is too recent. Go to the root of the ofxCv project and enter the following command:
git checkout stable
Normally, the compilation should be better ...
Reviving this for an RPI4, I have OF 0.11.0 installed, trying to compile Magic-Sand and I get the following error:
/home/pi/openFrameworks/apps/myApps/Magic-Sand/src/main.cpp: In function ‘bool setWindowDimensions(ofGLFWWindowSettings&, int)’:
/home/pi/openFrameworks/apps/myApps/Magic-Sand/src/main.cpp:30:2: error: ‘GLFWmonitor’ was not declared in this scope
GLFWmonitor monitors = glfwGetMonitors(&count);
^~~
/home/pi/openFrameworks/apps/myApps/Magic-Sand/src/main.cpp:30:2: note: suggested alternative: ‘GLFWwindow’
GLFWmonitor monitors = glfwGetMonitors(&count);
^~~
GLFWwindow
/home/pi/openFrameworks/apps/myApps/Magic-Sand/src/main.cpp:30:16: error: ‘monitors’ was not declared in this scope
GLFWmonitor monitors = glfwGetMonitors(&count);
^~~~
/home/pi/openFrameworks/apps/myApps/Magic-Sand/src/main.cpp:30:16: note: suggested alternative: ‘g_ntohs’
GLFWmonitor monitors = glfwGetMonitors(&count);
^~~~
g_ntohs
/home/pi/openFrameworks/apps/myApps/Magic-Sand/src/main.cpp:30:27: error: ‘glfwGetMonitors’ was not declared in this scope
GLFWmonitor monitors = glfwGetMonitors(&count);
^~~~~~~
/home/pi/openFrameworks/apps/myApps/Magic-Sand/src/main.cpp:30:27: note: suggested alternative: ‘ofGetMonth’
GLFWmonitor monitors = glfwGetMonitors(&count);
^~~~~~~
ofGetMonth
/home/pi/openFrameworks/apps/myApps/Magic-Sand/src/main.cpp:34:3: error: ‘glfwGetMonitorPos’ was not declared in this scope
glfwGetMonitorPos(monitors[windowsNum], &xM, &yM); // We take the first monitor
^~~~~
/home/pi/openFrameworks/apps/myApps/Magic-Sand/src/main.cpp:34:3: note: suggested alternative: ‘glGetUniformiv’
glfwGetMonitorPos(monitors[windowsNum], &xM, &yM); // We take the first monitor
^~~~~
glGetUniformiv
/home/pi/openFrameworks/apps/myApps/Magic-Sand/src/main.cpp:35:9: error: ‘GLFWvidmode’ does not name a type; did you mean ‘GLFWwindow’?
const GLFWvidmode desktopMode = glfwGetVideoMode(monitors[windowsNum]);
^~~
GLFWwindow
/home/pi/openFrameworks/apps/myApps/Magic-Sand/src/main.cpp:37:58: error: ‘desktopMode’ was not declared in this scope
cout << "Monitor " << windowsNum << " size: " << desktopMode->width << "x" << desktopMode->height << endl;
^~~
/home/pi/openFrameworks/apps/myApps/Magic-Sand/src/main.cpp:42:13: error: ‘int ofWindowSettings::width’ is protected within this context
settings.width = desktopMode->width 4.0 / 5.0;
Any ideas?
Hello !
I try to install Magic-Sand on a Raspberry Pi 3, and got some trouble...
In parallel, I've installed the same way on a pc and it worked, so I'm a little confused !
I've start the project on a new Raspbian litle SD card and follow all Readme files without problem :
As there is a MakeFile, I run make...
pi@sandbox:~/openFrameworks/apps/myApps/Magic-Sand $ make HOST_OS=Linux checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl gtk+-3.0 Compiling OF library for Release make[1]: Entering directory '/home/pi/openFrameworks/libs/openFrameworksCompiled/project' HOST_OS=Linux checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl gtk+-3.0 HOST_OS=Linux checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl gtk+-3.0 HOST_OS=Linux checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl gtk+-3.0 Done! make[1]: Leaving directory '/home/pi/openFrameworks/libs/openFrameworksCompiled/project'
Compiling Magic-Sand for Release make[1]: Entering directory '/home/pi/openFrameworks/apps/myApps/Magic-Sand' HOST_OS=Linux checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl gtk+-3.0 cat: obj/linuxarmv6l/Release/.compiler_flags: Aucun fichier ou dossier de ce type Compiling /home/pi/openFrameworks/apps/myApps/Magic-Sand/src/vehicle.cpp g++ -c -O3 -DNDEBUG -Wall -std=c++14 -DGCC_HAS_REGEX -march=armv6 -mfpu=vfp -mfloat-abi=hard -fPIC -ftree-vectorize -Wno-psabi -pipe -DOF_USING_GTK -DOF_USING_GTK -DTARGET_RASPBERRY_PI -DSTANDALONE -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE -DSTDC_CONSTANT_MACROS -DSTDC_LIMIT_MACROS -DTARGET_POSIX -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -I/opt/vc/include -I/opt/vc/include/IL -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/AL -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/arm-linux-gnueabihf/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/usr/include/libusb-1.0 -I/usr/include/opencv -I/home/pi/openFrameworks/libs/fmodex/include -I/home/pi/openFrameworks/libs/glfw/include -I/home/pi/openFrameworks/libs/glfw/include/GLFW -I/home/pi/openFrameworks/libs/kiss/include -I/home/pi/openFrameworks/libs/poco/include -I/home/pi/openFrameworks/libs/tess2/include -I/home/pi/openFrameworks/libs/utf8cpp/include -I/home/pi/openFrameworks/libs/utf8cpp/include/utf8 -I/home/pi/openFrameworks/libs/openFrameworks -I/home/pi/openFrameworks/libs/openFrameworks/communication -I/home/pi/openFrameworks/libs/openFrameworks/video -I/home/pi/openFrameworks/libs/openFrameworks/graphics -I/home/pi/openFrameworks/libs/openFrameworks/events -I/home/pi/openFrameworks/libs/openFrameworks/app -I/home/pi/openFrameworks/libs/openFrameworks/math -I/home/pi/openFrameworks/libs/openFrameworks/utils -I/home/pi/openFrameworks/libs/openFrameworks/3d -I/home/pi/openFrameworks/libs/openFrameworks/sound -I/home/pi/openFrameworks/libs/openFrameworks/gl -I/home/pi/openFrameworks/libs/openFrameworks/types -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/AL -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/arm-linux-gnueabihf/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/usr/include/libusb-1.0 -I/usr/include/opencv -I/home/pi/openFrameworks/apps/myApps/Magic-Sand/Magic-Sand.xcodeproj/xcshareddata -I/home/pi/openFrameworks/apps/myApps/Magic-Sand/Magic-Sand.xcodeproj/xcshareddata/xcschemes -I/home/pi/openFrameworks/apps/myApps/Magic-Sand/Magic-Sand.xcodeproj/xcuserdata -I/home/pi/openFrameworks/apps/myApps/Magic-Sand/Magic-Sand.xcodeproj/xcuserdata/thomaswolf.xcuserdatad -I/home/pi/openFrameworks/apps/myApps/Magic-Sand/Magic-Sand.xcodeproj/xcuserdata/thomaswolf.xcuserdatad/xcschemes -I/home/pi/openFrameworks/apps/myApps/Magic-Sand/Magic-Sand.xcodeproj/xcuserdata/thomaswolf.xcuserdatad/xcdebugger -I/home/pi/openFrameworks/apps/myApps/Magic-Sand/Magic-Sand.xcodeproj/project.xcworkspace -I/home/pi/openFrameworks/apps/myApps/Magic-Sand/Magic-Sand.xcodeproj/project.xcworkspace/xcshareddata -I/home/pi/openFrameworks/apps/myApps/Magic-Sand/Magic-Sand.xcodeproj/project.xcworkspace/xcuserdata -I/home/pi/openFrameworks/apps/myApps/Magic-Sand/Magic-Sand.xcodeproj/project.xcworkspace/xcuserdata/thomaswolf.xcuserdatad -I/home/pi/openFrameworks/apps/myApps/Magic-Sand/icon.iconset -I/home/pi/openFrameworks/apps/myApps/Magic-Sand/src -I/home/pi/openFrameworks/apps/myApps/Magic-Sand/src/KinectProjector -I/home/pi/openFrameworks/apps/myApps/Magic-Sand/src/KinectProjector/libs -I/home/pi/openFrameworks/apps/myApps/Magic-Sand/src/KinectProjector/libs/dlib -I/home/pi/openFrameworks/apps/myApps/Magic-Sand/src/KinectProjector/libs/dlib/geometry -I/home/pi/openFrameworks/apps/myApps/Magic-Sand/src/KinectProjector/libs/dlib/unicode -I/home/pi/openFrameworks/apps/myApps/Magic-Sand/src/KinectProjector/libs/dlib/memory_manager_stateless -I/home/pi/openFrameworks/apps/myApps/Magic-Sand/src/KinectProjector/libs/dlib/interfaces -I/home/pi/openFrameworks/apps/myApps/Magic-Sand/src/KinectProjector/libs/dlib/matrix -I/home/pi/openFrameworks/apps/myApps/Magic-Sand/src/KinectProjector/libs/dlib/matrix/lapack -I/home/pi/openFrameworks/apps/myApps/Magic-Sand/src/SandSurfaceRenderer -I/home/pi/openFrameworks/addons/ofxKinect/src -I/home/pi/openFrameworks/addons/ofxKinect/src/extra -I/home/pi/openFrameworks/addons/ofxKinect/libs -I/home/pi/openFrameworks/addons/ofxKinect/libs/libusb-win32 -I/home/pi/openFrameworks/addons/ofxKinect/libs/libusb-1.0 -I/home/pi/openFrameworks/addons/ofxKinect/libs/libfreenect -I/home/pi/openFrameworks/addons/ofxKinect/libs/libfreenect/include -I/home/pi/openFrameworks/addons/ofxKinect/libs/libfreenect/src -I/home/pi/openFrameworks/addons/ofxKinect/libs/libfreenect/platform -I/home/pi/openFrameworks/addons/ofxKinect/libs/libfreenect/include -I/home/pi/openFrameworks/addons/ofxOpenCv/src -I/home/pi/openFrameworks/addons/ofxOpenCv/libs -I/home/pi/openFrameworks/addons/ofxXmlSettings/src -I/home/pi/openFrameworks/addons/ofxXmlSettings/libs -I/home/pi/openFrameworks/addons/ofxCv/libs/ofxCv/include -I/home/pi/openFrameworks/addons/ofxCv/libs/CLD/include/CLD -I/home/pi/openFrameworks/addons/ofxCv/src -Isrc -I/home/pi/openFrameworks/addons/ofxDatGui/src -I/home/pi/openFrameworks/addons/ofxDatGui/src/themes -I/home/pi/openFrameworks/addons/ofxDatGui/src/libs -I/home/pi/openFrameworks/addons/ofxDatGui/src/libs/ofxSmartFont -I/home/pi/openFrameworks/addons/ofxDatGui/src/components -I/home/pi/openFrameworks/addons/ofxDatGui/src/core -I/home/pi/openFrameworks/addons/ofxModal/src -I/home/pi/openFrameworks/addons/ofxParagraph/src -MMD -MP -MF obj/linuxarmv6l/Release/src/vehicle.d -MT obj/linuxarmv6l/Release/src/vehicle.o -o obj/linuxarmv6l/Release/src/vehicle.o -c /home/pi/openFrameworks/apps/myApps/Magic-Sand/src/vehicle.cpp In file included from /home/pi/openFrameworks/addons/ofxCv/src/ofxCv.h:9:0, from /home/pi/openFrameworks/apps/myApps/Magic-Sand/src/vehicle.h:25, from /home/pi/openFrameworks/apps/myApps/Magic-Sand/src/vehicle.cpp:22: /home/pi/openFrameworks/addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h:260:19: error: ‘cv::Point2f ofxCv::toCv’ redeclared as different kind of symbol cv::Point2f toCv(glm::vec2 vec); ^ /home/pi/openFrameworks/addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h:259:10: note: previous declaration ‘cv::Mat ofxCv::toCv(ofMesh&)’ cv::Mat toCv(ofMesh& mesh); ^ /home/pi/openFrameworks/addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h:260:19: error: ‘glm’ has not been declared cv::Point2f toCv(glm::vec2 vec); ^ /home/pi/openFrameworks/addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h:261:19: error: ‘cv::Point3f ofxCv::toCv’ redeclared as different kind of symbol cv::Point3f toCv(glm::vec3 vec); ^ /home/pi/openFrameworks/addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h:259:10: note: previous declaration ‘cv::Mat ofxCv::toCv(ofMesh&)’ cv::Mat toCv(ofMesh& mesh); ^ /home/pi/openFrameworks/addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h:261:19: error: ‘glm’ has not been declared cv::Point3f toCv(glm::vec3 vec); ^ /home/pi/openFrameworks/addons/ofxCv/libs/ofxCv/include/ofxCv/Utilities.h:264:50: error: ‘glm’ was not declared in this scope std::vector toCv(const std::vector& points);
... --- I've cut the hundred of errors and warning line that follows ... In file included from /home/pi/openFrameworks/apps/myApps/Magic-Sand/src/KinectProjector/KinectGrabber.h:28:0, from /home/pi/openFrameworks/apps/myApps/Magic-Sand/src/KinectProjector/KinectProjector.h:31, from /home/pi/openFrameworks/apps/myApps/Magic-Sand/src/vehicle.h:27, from /home/pi/openFrameworks/apps/myApps/Magic-Sand/src/vehicle.cpp:22: /home/pi/openFrameworks/apps/myApps/Magic-Sand/src/KinectProjector/Utils.h:317:14: warning: ‘bool ofxCSG::isPointOnPlane(ofVec3f, ofVec3f, float, float)’ defined but not used [-Wunused-function] static bool isPointOnPlane( ofVec3f p, ofVec3f planeNormal, float w, float epsilon = EPSILON) ^ /home/pi/openFrameworks/apps/myApps/Magic-Sand/src/KinectProjector/Utils.h:323:14: warning: ‘bool ofxCSG::isPointInTriangle(ofVec3f, ofVec3f, ofVec3f, ofVec3f, ofVec3f, float)’ defined but not used [-Wunused-function] static bool isPointInTriangle(ofVec3f p, ofVec3f a, ofVec3f b, ofVec3f c, ofVec3f normal, float epsilon ) ^ /home/pi/openFrameworks/apps/myApps/Magic-Sand/src/KinectProjector/Utils.h:344:14: warning: ‘bool ofxCSG::intersectRayTriangle(ofVec3f, ofVec3f, ofVec3f, ofVec3f, ofVec3f, ofVec3f)’ defined but not used [-Wunused-function] static bool intersectRayTriangle(ofVec3f rayOrigin, ofVec3f rayDir, ofVec3f t0, ofVec3f t1, ofVec3f t2, ofVec3f intersection=NULL) ^ /home/pi/openFrameworks/apps/myApps/Magic-Sand/src/KinectProjector/Utils.h:372:20: warning: ‘ofVec4f ofxCSG::plane_from_points(ofVec3f, int)’ defined but not used [-Wunused-function] static ofVec4f plane_from_points(ofVec3f points, int n) { ^ /home/pi/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:200: recipe for target 'obj/linuxarmv6l/Release/src/vehicle.o' failed make[1]: [obj/linuxarmv6l/Release/src/vehicle.o] Error 1 make[1]: Leaving directory '/home/pi/openFrameworks/apps/myApps/Magic-Sand' /home/pi/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:125: recipe for target 'Release' failed make: [Release] Error 2
I double check the ofxCV installation, and the libglm-dev and everything seems ok...
Any idea ?