Home › Forum › SOFA › Building SOFA › [SOLVED] Error:Building Sofa 20.06 version to add SoftRobot plugin
Tagged: 64_bits, Complie SoftRobots, GCC, Linux_ubuntu, Plugin_SoftRobots, SOFA_2006
- This topic has 9 replies, 4 voices, and was last updated 4 years, 3 months ago by Cai.
-
AuthorPosts
-
11 August 2020 at 08:34 #17016CaiBlocked
I’m new to SOFA and I’m trying to install it. My current setting is the followin
-Ubuntu 18.04
– CMake version : 3.15.0
– C/C++ compiler : clang version 6.0.0-1ubuntu2I followed the guide in Sofa website but I have a problem while building it.
If I install sotfrobots plugin, should I install unstable version of SOFA instead of 20.06?
11 August 2020 at 08:45 #17017CaiBlockedHere are some errors about build Softrobots using ninja, please give me some help, thanks.
I add Softrobots plugin andS TLIB plugin in the direction:/home/cmx/sofa/src/applications/plugins/
and in the CMakelists:
sofa_add_plugin(applications/plugins/STLIB STLIB)
sofa_add_plugin(applications/plugins/SoftRobots SoftRobots)
ERRORS:
/home/cmx/sofa/src/applications/plugins/SoftRobots/src/SoftRobots/component/controller/AnimationEditor.inl:129:5: error: use of undeclared identifier ‘d_componentState’; did you mean ‘d_componentstate’?
d_componentState = ComponentState::Invalid;
^~~~~~~~~~~~~~~~
d_componentstate
/home/cmx/sofa/src/SofaKernel/modules/SofaCore/src/sofa/core/objectmodel/Base.h:533:29: note: ‘d_componentstate’ declared here
Data< ComponentState > d_componentstate; ///< the object state
^
In file included from /home/cmx/sofa/src/applications/plugins/SoftRobots/src/SoftRobots/component/controller/AnimationEditor.cpp:36:
/home/cmx/sofa/src/applications/plugins/SoftRobots/src/SoftRobots/component/controller/AnimationEditor.inl:149:5: error: use of undeclared identifier ‘d_componentState’; did you mean ‘d_componentstate’?
d_componentState = ComponentState::Valid;
^~~~~~~~~~~~~~~~
d_componentstate
/home/cmx/sofa/src/SofaKernel/modules/SofaCore/src/sofa/core/objectmodel/Base.h:533:29: note: ‘d_componentstate’ declared here
Data< ComponentState > d_componentstate; ///< the object state
^
In file included from /home/cmx/sofa/src/applications/plugins/SoftRobots/src/SoftRobots/component/controller/AnimationEditor.cpp:36:
/home/cmx/sofa/src/applications/plugins/SoftRobots/src/SoftRobots/component/controller/AnimationEditor.inl:156:8: error: unknown type name ‘d_componentState’; did you mean ‘ComponentState’?
if(d_componentState != ComponentState::Valid)
^~~~~~~~~~~~~~~~
ComponentState
/home/cmx/sofa/src/applications/plugins/SoftRobots/src/SoftRobots/component/controller/AnimationEditor.inl:69:32: note: ‘ComponentState’ declared here
using sofa::core::objectmodel::ComponentState;
^
/home/cmx/sofa/src/applications/plugins/SoftRobots/src/SoftRobots/component/controller/AnimationEditor.inl:156:25: error: expected unqualified-id
if(d_componentState != ComponentState::Valid)
^
/home/cmx/sofa/src/applications/plugins/SoftRobots/src/SoftRobots/component/controller/AnimationEditor.inl:183:8: error: unknown type name ‘d_componentState’; did you mean ‘ComponentState’?
if(d_componentState != ComponentState::Valid)
^~~~~~~~~~~~~~~~
ComponentState
/home/cmx/sofa/src/applications/plugins/SoftRobots/src/SoftRobots/component/controller/AnimationEditor.inl:69:32: note: ‘ComponentState’ declared here
using sofa::core::objectmodel::ComponentState;
^
/home/cmx/sofa/src/applications/plugins/SoftRobots/src/SoftRobots/component/controller/AnimationEditor.inl:183:25: error: expected unqualified-id
if(d_componentState != ComponentState::Valid)
^
/home/cmx/sofa/src/applications/plugins/SoftRobots/src/SoftRobots/component/controller/AnimationEditor.inl:316:8: error: unknown type name ‘d_componentState’; did you mean ‘ComponentState’?
if(d_componentState != ComponentState::Valid)
^~~~~~~~~~~~~~~~
ComponentState
/home/cmx/sofa/src/applications/plugins/SoftRobots/src/SoftRobots/component/controller/AnimationEditor.inl:69:32: note: ‘ComponentState’ declared here
using sofa::core::objectmodel::ComponentState;
^
/home/cmx/sofa/src/applications/plugins/SoftRobots/src/SoftRobots/component/controller/AnimationEditor.inl:316:25: error: expected unqualified-id
if(d_componentState != ComponentState::Valid)
^
/home/cmx/sofa/src/applications/plugins/SoftRobots/src/SoftRobots/component/controller/AnimationEditor.inl:363:8: error: unknown type name ‘d_componentState’; did you mean ‘ComponentState’?
if(d_componentState != ComponentState::Valid)
^~~~~~~~~~~~~~~~
ComponentState
/home/cmx/sofa/src/applications/plugins/SoftRobots/src/SoftRobots/component/controller/AnimationEditor.inl:69:32: note: ‘ComponentState’ declared here
using sofa::core::objectmodel::ComponentState;
^
/home/cmx/sofa/src/applications/plugins/SoftRobots/src/SoftRobots/component/controller/AnimationEditor.inl:363:25: error: expected unqualified-id
if(d_componentState != ComponentState::Valid)
^
/home/cmx/sofa/src/applications/plugins/SoftRobots/src/SoftRobots/component/controller/AnimationEditor.inl:759:8: error: unknown type name ‘d_componentState’; did you mean ‘ComponentState’?
if(d_componentState != ComponentState::Valid)
^~~~~~~~~~~~~~~~
ComponentState
/home/cmx/sofa/src/applications/plugins/SoftRobots/src/SoftRobots/component/controller/AnimationEditor.inl:69:32: note: ‘ComponentState’ declared here
using sofa::core::objectmodel::ComponentState;
^
/home/cmx/sofa/src/applications/plugins/SoftRobots/src/SoftRobots/component/controller/AnimationEditor.inl:759:25: error: expected unqualified-id
if(d_componentState != ComponentState::Valid)
^
12 errors generated.
ninja: build stopped: subcommand failed.11 August 2020 at 09:38 #17018epernodBlockedHi,
d_componentState has been recently changed into a Data for future works on Data flow.
You have to change:
d_componentState != ComponentState::Valid
into
d_componentState.getValue() != ComponentState::Valid
and
d_componentState = ComponentState::Valid;
into
d_componentState.setValue(ComponentState::Valid);
We will propagate the change in the softRobot plugin asap. But I’m surprised, this change was done after the 20.06 release. Which version are you using of SOFA and SoftRobot?
best regards,
11 August 2020 at 12:41 #17022sescaidaBlockedHello Cai,
as @epernod points out, there could be an issue with deprecation between SOFA and the SoftRobots plugin, I will keep an eye open. However, if you just want to test SOFA with SoftRobots, you can directly download the binaries:
Then you can run the executable:
../SOFA_v19.06.99_custom_Linux_v5.1/bin/runSofa
to launch some tutorials, for instance:
../SOFA_v19.06.99_custom_Linux_v5.1/plugins/SoftRobots/docs/tutorials/CableGripper/cablegripper-tuto.pyscn
However, this binary release still uses SofaPython with Python2.7. If you need Python3, there’s currently no way around compiling from source for now.
Best
Stefan
11 August 2020 at 14:23 #17023epernodBlockedHi,
I started fixing it but in fact it has already been done 2 weeks ago:
https://github.com/SofaDefrost/SoftRobots/pull/56
best,
11 August 2020 at 16:48 #17024CaiBlockedDear Sescaida, I want to learn more about the modelling and control for soft robots, so i use softrobots plugin. Now, i use the unstable version of SOFA (git clone -b master https://github.com/sofa-framework/sofa.git sofa/src), and i have complied all documents successfully. When I run ./runsofa in the terminal(cmx@cmx-Lenovo-IdeaPad-Y510P:~/sofa/build$ ./bin/runSof). The QT window shows nothing, and it is black. Some errors are as follows:
cmx@cmx-Lenovo-IdeaPad-Y510P:~/sofa/build$ ./bin/runSofa [INFO] [runSofa] PluginRepository paths = /home/cmx/sofa/build/plugins:/home/cmx/sofa/build/lib [INFO] [runSofa] DataRepository paths = /home/cmx/sofa/src/share:/home/cmx/sofa/src/examples [INFO] [runSofa] GuiDataRepository paths = /home/cmx/sofa/src/applications/projects/runSofa/resources:/home/cmx/sofa/src/modules/SofaGuiQt/src/sofa/gui/qt/resources [INFO] [runSofa] Loading automatically plugin list in /home/cmx/sofa/build/lib/plugin_list.conf.default [INFO] [PluginManager] Loaded plugin: /home/cmx/sofa/build/lib/libSofaSparseSolver.so [INFO] [PluginManager] Loaded plugin: /home/cmx/sofa/build/lib/libSofaPreconditioner.so [INFO] [PluginManager] Loaded plugin: /home/cmx/sofa/build/lib/libSofaHaptics.so [INFO] [PluginManager] Loaded plugin: /home/cmx/sofa/build/lib/libSofaValidation.so [INFO] [PluginManager] Loaded plugin: /home/cmx/sofa/build/lib/libSofaDenseSolver.so [INFO] [PluginManager] Loaded plugin: /home/cmx/sofa/build/lib/libSofaNonUniformFem.so [INFO] [PluginManager] Loaded plugin: /home/cmx/sofa/build/lib/libSofaOpenglVisual.so [INFO] [SofaPython] Added '/home/cmx/STLIB/python' to sys.path [INFO] [SofaPython] Added '/home/cmx/sofa/src/applications/plugins/SofaPython/python' to sys.path [INFO] [SofaPython] Added '/home/cmx/SoftRobots/python' to sys.path [INFO] [SofaPython] Added '/home/cmx/sofa/src/applications/plugins/SofaTest/python' to sys.path [WARNING] [PythonEnvironment] No python dir found in /home/cmx/sofa/build [INFO] [PluginManager] Loaded plugin: /home/cmx/sofa/build/lib/libSofaPython.so [INFO] [PluginManager] Loaded plugin: /home/cmx/sofa/build/lib/libSofaExporter.so [INFO] [PluginManager] Loaded plugin: /home/cmx/sofa/build/lib/libCImgPlugin.so [INFO] [PluginManager] Loaded plugin: /home/cmx/sofa/build/lib/libSofaMiscCollision.so The constructor with a QGLFormat is deprecated, use the regular contructor instead. libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast QOpenGLWidget: Failed to create context QOpenGLWidget: Failed to create context QOpenGLWidget: Failed to create context [INFO] [SceneCheckerVisitor] Validating node "root" with checks: [SceneCheckDuplicatedName, SceneCheckMissingRequiredPlugin, SceneCheckUsingAlias] [INFO] [SceneCheckerVisitor] Finished validating node "root". QOpenGLWidget: Failed to create context composeAndFlush: makeCurrent() failed composeAndFlush: makeCurrent() failed composeAndFlush: makeCurrent() failed composeAndFlush: makeCurrent() failed composeAndFlush: makeCurrent() failed composeAndFlush: makeCurrent() failed
11 August 2020 at 16:51 #17025younesssssBlockedYes @hugo did it two weeks ago.
Two solve your problem @Cai, you have two options.First: Switch SOFA v.20.06 with the SOFA master then don’t need to change SoftRobots.
Second: Keep SOFA v.20.06, but for SoftRobots go back to the version before “https://github.com/SofaDefrost/SoftRobots/pull/56” pull request witch is (a4370a7aee4d445b5435d2a14cf35d209087be56).
best,
11 August 2020 at 17:23 #17026CaiBlockedHi,@younesssss,I use the first method: Switch SOFA v.20.06 with the SOFA master then don’t need to change SoftRobots. Some errors are shown on the #17024. If you have any good ideas, please let me know. Thanks
11 August 2020 at 21:17 #17027younesssssBlockedYou can have a look on this page page
12 August 2020 at 15:50 #17028CaiBlockedHi, @younesssss,the problem has been solved under your valuable archives. I pay more attention to the modelling and control of soft robot, and how I can get more information to learn it well, for example, detailed tutorials. Thanks!
-
AuthorPosts
- You must be logged in to reply to this topic.