Forum Replies Created
-
AuthorPosts
-
GuillaumeKeymaster
Hi,
I never tried to create a circular dependency between plugins and I don’t think it is a good idea actually.
Are you sure your design is OK?Guillaume.
GuillaumeKeymasterHi,
Could you check you did set
BOOST_ROOT=D:/boost_1_66_0
?
It seems there is aD:/boost/boost_1_66_0
value somewhere missing the configuration.Please copy/paste your CMakeCache.txt here π
Guillaume.
GuillaumeKeymasterHi @rTorres
For auto-detection, the folders lib, include and licenses from Windows dependency pack have to be in SOFA source dir. See this doc page: “Next, unzip in your sources folder (sofa/src/) the SOFA dependencies for Windows you downloaded before”.
Otherwise, you have to locate each lib manually in CMake configuration.
Cheers,
Guillaume.GuillaumeKeymasterAs I said in my previous reply, to use SerialCommunication from ZMQCommunication you have to make SerialCommunication findable by creating a SerialCommunicationConfig.cmake.in (you did it) AND by calling
sofa_create_package
in SerialCommunication’s CMakeLists.
To understand what sofa_create_package does, check SofaMacros.cmakeHere is a corrected version of SerialCommunication’s CMakeLists:
cmake_minimum_required(VERSION 2.8.12) project(SerialComunication) set(${PROJECT_NAME}_VERSION 1.0) set(HEADER_FILES SerialDriver.h ) set(SOURCE_FILES SerialDriver.cpp initSerial.cpp ) find_package(SofaFramework REQUIRED) find_package(SofaBase REQUIRED) find_package(SofaGeneral REQUIRED) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}") include_directories("${CMAKE_CURRENT_SOURCE_DIR}/..") add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES}) set_target_properties(${PORJECT_NAME} PROPERTIES COMPILE_FLAGS "-DSOFA_BUILD_SERIALPLUGIN") target_link_libraries(${PROJECT_NAME} SofaCore SofaComponentGeneral) ## Install rules for the library; CMake package configurations files sofa_create_package(${PROJECT_NAME} ${${PROJECT_NAME}_VERSION} ${PROJECT_NAME} ${PROJECT_NAME}) install(DIRECTORY examples/ DESTINATION share/sofa/plugins/${PROJECT_NAME})
GuillaumeKeymasterHi,
Sorry I didn’t mean FindSerialCommunication but SerialCommunication. I just updated my previous post.
Could you show me the CMakeLists.txt of SerialCommunication and the CMakeLists.txt of ZeroMQCommunication please?
We are close to the solution π
Guillaume.GuillaumeKeymasterHi,
Every SOFA plugin has to generate a MyPluginConfig.cmake file to permit others to find it with
find_package
.
In SerialCommunication, to generate this file, you have to create a SerialCommunicationConfig.cmake.in that will be handled bysofa_create_package
.See how it is done for example in the LeapMotion plugin π
Guillaume.
GuillaumeKeymasterHi bgarcial,
Using components from another plugin is very similar to using components from a SOFA module. I think you missed the CMake part.
Here are the main steps :
1. Create your plugin’s CMake variables:find_package(SerialCommunication)
2. Get access to your plugin files:target_include_directories(${PROJECT_NAME} PUBLIC "$<BUILD_INTERFACE:${SerialCommunication_INCLUDE_DIRS}>")
3. Link with your plugin:target_link_libraries(${PROJECT_NAME} SerialCommunication)
An example is available in
applications/plugins/image
. See how it includes CImgPlugin.Hope that helps,
Guillaume.GuillaumeKeymasterBonjour,
Utilisez-vous SOFA dans votre application ?
Guillaume.
27 February 2018 at 11:14 in reply to: [SOLVED] Unable to make Sofa 17.06: No target specified #10580GuillaumeKeymasterGreat, glad to hear that!
Don’t be shy, any contribution is welcome in SOFA πCheers,
Guillaume.27 February 2018 at 10:28 in reply to: [SOLVED] Unable to make Sofa 17.06: No target specified #10578GuillaumeKeymasterHi Abhishek,
Generating with “Codeblocks – Ninja” will generate a
build.ninja
file. The mechanism is the same as a Makefile but it is used by another program named ninja. Ninja is not Make. If you want to use ninja build system (better for SOFA build), you shall first install it:sudo apt install ninja-build
. You will then be able to use it like you use make by executingninja
in the build dir.Anyway, even with Ninja you will get the boost error because it seems that you don’t have boost::program_options on your system. Try installing it with
sudo apt install libboost-program-options-dev
. I update the Linux documentation right away πCheers,
Guillaume.GuillaumeKeymasterAccording to nhlomann/json readme, minimal version is 19.0.24215.1
Actually even mine shouldn’t pass ^^’
How did you update? Your version should be higher…GuillaumeKeymasterWhat exact version of MSVC are you running?
Open “Visual C++ 2015 x64 Native Command Prompt” (or “Visual C++ 2015 x86 Native Command Prompt” if you are building a 32-bit version of SOFA) and runcl
to display version details.Mine is
19.00.24210
and working fine with nlohmann_json.GuillaumeKeymasterHi Binesh,
This is a MSVC version problem. Your Visual Studio 2015 needs to be updated to Update 3.
See https://github.com/sofa-framework/sofa/issues/420 πCheers,
Guillaume.GuillaumeKeymasterHi Binesh,
Did you configure/generate with “Visual Studio 2015” CMake generator before opening the project in Qt Creator?
If yes, I’m afraid your previous build configuration (Visual Studio 2015) conflicts with Qt Creator toolchain.
Try to clear your CMake configuration from previous build because in order to build with Qt Creator you must select one of the “Codeblocks” generators (by default choose “Codeblocks – Unix Makefile”).
Qt Creator will do it for you if you directly open the project in the IDE with CMakeCache cleared and no CMakeLists.user.txt in source dir.
Do not forget to check your Qt Creator Kits are OK (Tools > Options > Build & Run > Kits).Hope that helps,
Guillaume.GuillaumeKeymasterWhat happens is that
sofa::simulation::getSimulation()->animate
needs an AnimationLoop as you can see here.
Usually with XML scenes, a DefaultAnimationLoop (and other components) is added to the simulation if none found. This is not the case when usingSceneLoaderXML::loadFromMemory
.Guillaume.
GuillaumeKeymasterOk I searched for all
sofa::simulation::getSimulation()->animate
calls in tests and it seems thatSceneLoaderXML::loadFromMemory
does not have any default component creation behavior.Solution 1: simply add a
<DefaultAnimationLoop/>
in your graph.
Solution 2: use another scene loading method to profit from default component creation. Using a file and loading it withsofa::simulation::getSimulation()->load
does the trick.
Solution 3: implement default component creation inSceneLoaderXML::loadFromMemory
.Hope that helps,
Guillaume.GuillaumeKeymasterWoaw this has been pending for a way too long time!
I’m on it!Did you try to reproduce the problem with latest SOFA?
Cheers,
Guillaume.GuillaumeKeymasterOk I regenerated the release. The problem should be fixed now.
Could you try to download and install again?Thanks,
Guillaume.GuillaumeKeymasterHi Nolwenn,
Thank you for your report, there is indeed a problem with SofaSphFluid.dll. I will patch this right away and keep you updated.
Guillaume.
GuillaumeKeymasterHi,
I can’t find any trace of this error message in SOFA.
Could you provide your CMakeCache.txt please? I suspect a problem with OpenHaptics SDK.Cheers,
Guillaume.GuillaumeKeymasterHi rubab,
Welcome in the community π
Basically if you want to use sofa/gui/*.h you have to include it with
find_package(SofaGui)
and link it withtarget_link_libraries(${PROJECT_NAME} SofaGuiMain)
ortarget_link_libraries(${PROJECT_NAME} SofaGuiCommon)
ortarget_link_libraries(${PROJECT_NAME} SofaGuiQt)
depending on what you are interested in.
Have a look at applications/plugins/image/image_gui or applications/projects/SofaPhysicsAPI for examples.All that said, I can’t find any GraspFunction.h in my SOFA. Where is yours?
Hope that helps,
Guillaume.26 September 2017 at 12:01 in reply to: [SOLVED] Error with test scene, Required plugins error #9995GuillaumeKeymasterHi Erwan,
I just tried the exact same test but with
SofaPython
andimage
plugins and it worked well.
Can you confirm that?Guillaume.
GuillaumeKeymasterHi ruiliang,
Do you have more output to show us?
I will try to build SofaCUDA with SOFA v16.12.Guillaume.
GuillaumeKeymasterHi Sohaiba,
This warning appears because SOFA relies on an OLD policy for
link_directories
commands. More details about the CMP0015 policy here.
It should be fixed before the next release.In the meantime, it will not interfere with your compilation so you can ignore it.
πCheers,
Guillaume -
AuthorPosts