Home › Forum › SOFA › Building SOFA › [SOLVED] Compiling SOFA v15.12 + LeapMotion Plugin
Tagged: LeapMotion
- This topic has 7 replies, 4 voices, and was last updated 7 years, 6 months ago by Wendy María Arango.
-
AuthorPosts
-
3 March 2017 at 01:59 #8748jpsilvajBlocked
Hello,
i’m trying compile Sofa v15.12.0 + Leap Motion Plugin on Linux Mint 18.1, but the following error is ocurring:
Scanning dependencies of target LeapMotion [ 75%] Building CXX object applications/plugins/LeapMotion/CMakeFiles/LeapMotion.dir/initLeapMotion.cpp.o [ 75%] Building CXX object applications/plugins/LeapMotion/CMakeFiles/LeapMotion.dir/src/LeapMotionDriver.cpp.o In file included from /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/applications/plugins/LeapMotion/src/LeapMotionDriver.h:44:0, from /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/applications/plugins/LeapMotion/src/LeapMotionDriver.cpp:26: /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/applications/plugins/LeapMotion/src/MyListener.h:88:5: error: ‘InteractionBox’ does not name a type InteractionBox getInteractionBox() { return interactionBox; } ^ /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/applications/plugins/LeapMotion/src/MyListener.h:95:5: error: ‘InteractionBox’ does not name a type InteractionBox interactionBox; ^ /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/applications/plugins/LeapMotion/src/LeapMotionDriver.cpp: In member function ‘virtual void sofa::component::controller::LeapMotionDriver::draw(const sofa::core::visual::VisualParams*)’: /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/applications/plugins/LeapMotion/src/LeapMotionDriver.cpp:224:67: error: ‘class MyListener’ has no member named ‘getInteractionBox’ Vec3d leapInteractionBoxCenter = Vec3d(myListener.getInteractionBox().center().toFloatPointer()); ^ /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/applications/plugins/LeapMotion/src/LeapMotionDriver.cpp:225:47: error: ‘class MyListener’ has no member named ‘getInteractionBox’ double halfWidth = myListener.getInteractionBox().width()/2.0; ^ /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/applications/plugins/LeapMotion/src/LeapMotionDriver.cpp:226:48: error: ‘class MyListener’ has no member named ‘getInteractionBox’ double halfHeight = myListener.getInteractionBox().height()/2.0; ^ /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/applications/plugins/LeapMotion/src/LeapMotionDriver.cpp:227:47: error: ‘class MyListener’ has no member named ‘getInteractionBox’ double halfDepth = myListener.getInteractionBox().depth()/2.0; ^ /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/applications/plugins/LeapMotion/src/LeapMotionDriver.cpp: In member function ‘virtual void sofa::component::controller::LeapMotionDriver::handleEvent(sofa::core::objectmodel::Event*)’: /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/applications/plugins/LeapMotion/src/LeapMotionDriver.cpp:417:69: error: ‘class Leap::Finger’ has no member named ‘stabilizedTipPosition’ Vec3d fingerPosition = Vec3d(myListener.getFingers()[i].stabilizedTipPosition().toFloatPointer()); ^ In member function ‘virtual void sofa::core::objectmodel::DDGNode::doDelOutput(sofa::core::objectmodel::DDGNode*)’: cc1plus: warning: iteration 9223372036854775808u invokes undefined behavior [-Waggressive-loop-optimizations] In file included from /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/framework/sofa/core/../../sofa/helper/stable_vector.h:18:0, from /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/framework/sofa/core/../../sofa/core/objectmodel/Link.h:34, from /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/framework/sofa/core/../../sofa/core/objectmodel/DDGNode.h:35, from /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/framework/sofa/core/../../sofa/core/objectmodel/BaseData.h:37, from /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/framework/sofa/core/../../sofa/core/objectmodel/Data.h:33, from /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/framework/sofa/core/../../sofa/core/objectmodel/Base.h:36, from /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/framework/sofa/core/../../sofa/core/objectmodel/BaseObject.h:28, from /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/framework/sofa/core/../../sofa/core/behavior/ConstraintSolver.h:28, from /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/SofaGeneral/../modules/SofaConstraint/LMConstraintSolver.h:29, from /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/SofaGeneral/../modules/SofaConstraint/LMConstraintDirectSolver.h:29, from /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/modules/SofaConstraint/LMConstraintDirectSolver.cpp:26: /usr/include/boost/container/stable_vector.hpp:1558:13: note: containing loop while(first != last){ ^ applications/plugins/LeapMotion/CMakeFiles/LeapMotion.dir/build.make:86: recipe for target 'applications/plugins/LeapMotion/CMakeFiles/LeapMotion.dir/src/LeapMotionDriver.cpp.o' failed make[2]: *** [applications/plugins/LeapMotion/CMakeFiles/LeapMotion.dir/src/LeapMotionDriver.cpp.o] Error 1 CMakeFiles/Makefile2:7151: recipe for target 'applications/plugins/LeapMotion/CMakeFiles/LeapMotion.dir/all' failed make[1]: *** [applications/plugins/LeapMotion/CMakeFiles/LeapMotion.dir/all] Error 2
CMake Log:
Install prefix: /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/build/install
Boost version: 1.58.0
SofaSparseSolver: metis was not found, SparseLDLSolver won’t be built
SofaSparseSolver: csparse was found, SparseLUSolver and SparseCholeskySolver will be built
QGLViewer: Using Qt5
SofaGUIQt: Using Qt5
SofaTest: optional dependency SofaPython NOT found, Python_test won’t be built
Adding Plugin LeapMotion
Found Leap: /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/applications/plugins/LeapMotion/LeapMotion/Leap.h
Adding Application Modeler
Modeler: Using Qt5
Modeler: Using Qt5
Adding Application runSofa
Configuring done
Generating doneVariables
LEAP_INCLUDE_DIR = /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/applications/plugins/LeapMotion/LeapMotion
LEAP_LIBRARY = /home/jpsilvaj/mestrado/VR/sofa-src/sofa/v15.12.0/src/applications/plugins/LeapMotion/LeapMotion/Leap.h
And check PLUGIN_LEAPMOTIONDoes anyone know how to fix or have the plugin already compiled?
3 March 2017 at 10:06 #8750GuillaumeKeymasterHi @jpsilvaj,
I just moved your reply to its own topic.
I’m not sure that your
LEAP_INCLUDE_DIR
andLEAP_LIBRARY
are set correctly.
Did you install the LeapMotion SDK on your computer?Cheers,
Guillaume.3 March 2017 at 12:55 #8754jpsilvajBlockedI’m not sure that your LEAP_INCLUDE_DIR and LEAP_LIBRARY are set correctly.
Did you install the LeapMotion SDK on your computer?Yes, and it’s working in
Visualizer
10 March 2017 at 10:59 #8768GuillaumeKeymasterHi,
Here is what I have for a Windows build:
LEAP_INCLUDE_DIR=path/to/LeapSDK/include LEAP_LIBRARY=path/to/LeapSDK/lib/x64/Leap.lib
These two variables are used to find the Leap Motion SDK so they shouldn’t be pointing to SOFA plugin.
Hope this helps,
Guillaume.10 March 2017 at 15:31 #8772jpsilvajBlockedHi, Guillaume,
Thank you for your help.
5 June 2017 at 21:16 #9277Wendy María ArangoBlockedHi.
I’d like to know where I can get this
-
LEAP_INCLUDE_DIR=path/to/LeapSDK/include
LEAP_LIBRARY=path/to/LeapSDK/lib/x64/Leap.libI’m trying to add two Plugins: LeapMotion and Sensable.
Sensable’s done, but Leap’s still giving me some troubles.
Install prefix: C:/Users/LabRV/Documents/GitHub/sofa/v16.12/anotherOne/install
Boost version: 1.60.0
Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE)
Boost version: 1.60.0
Found the following Boost libraries:
system
filesystem
locale
thread
date_time
chrono
atomic
SofaSparseSolver: metis was not found, SparseLDLSolver won’t be built
SofaSparseSolver: csparse was found, SparseLUSolver and SparseCholeskySolver will be built
QGLViewer: Using Qt5
SofaGUIQt: Using Qt5
SofaTest: optional dependency SofaPython NOT found, Python_test won’t be built
Adding Plugin Haption
Adding Plugin Sensable
Adding Plugin SensableEmulation
Adding Plugin LeapMotion
Checking for Leap
CMake Error at SofaKernel/cmake/Modules/FindPackageHandleStandardArgs.cmake:97 (message):
Could NOT find Leap (missing: LEAP_LIBRARY LEAP_INCLUDE_DIR)
Call Stack (most recent call first):
SofaKernel/cmake/Modules/FindPackageHandleStandardArgs.cmake:291 (_FPHSA_FAILURE_MESSAGE)
applications/plugins/LeapMotion/cmake/FindLeap.cmake:78 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
applications/plugins/LeapMotion/CMakeLists.txt:14 (find_package)Configuring incomplete, errors occurred!
See also “C:/Users/LabRV/Documents/GitHub/sofa/v16.12/anotherOne/CMakeFiles/CMakeOutput.log”.
See also “C:/Users/LabRV/Documents/GitHub/sofa/v16.12/anotherOne/CMakeFiles/CMakeError.log”.8 June 2017 at 19:01 #9299HugoKeymasterHi Wendy,
For the LeapMotion plugin in SOFA, everything is explained in the README.txt in applications/plugins/LeapMotion :
–> install the driver LeapMotion: https://www.leapmotion.com/setup (SDK)Cheers,
Hugo
8 June 2017 at 19:07 #9302Wendy María ArangoBlockedI already did it, but it doesn’t seem to work.
Error C1083 Cannot open include file: 'SofaBaseVisual/VisualTransform.h': No such file or directory LeapMotion C:\Users\LabRV\Documents\GitHub\sofa\v16.12\src\applications\plugins\LeapMotion\src\LeapMotionDriver.cpp 27
Error C2065 'M_PI': undeclared identifier (compiling source file C:\Users\LabRV\Documents\GitHub\sofa\v16.12\src\applications\plugins\Sensable\NewOmniDriver.cpp) Sensable C:\Users\LabRV\Documents\GitHub\sofa\v16.12\src\SofaKernel\modules\SofaBaseVisual\BaseCamera.h 172
These are the errors it throws.
I’ve already installed Leap Motion SDK and all Sensable stuff https://www.sofa-framework.org/community/doc/using-sofa/optional-features/haptics/sensable/
I still don’t know what’s going on. And I think I don’t have to change the source code at all. Maybe it’s a problem when I build the project with CMake, but I don’t get which one it is.
-
AuthorPosts
- You must be logged in to reply to this topic.