Forum Replies Created
-
AuthorPosts
-
StephBlocked
Hi Hugo
Unfortunately I can’t give you any updates from my side since I moved on to other challenges and haven’t tried out the newest version yet. If I do I will definitely let you know.
Thanks for your support and best regards
StephStephBlockedDear @younesssss
Verzeichnis von C:\Users\vogts\Downloads\SOFA_v20.12.02_Win64\plugins\STLIB\python\stlib 21.05.2021 15:36 <DIR> . 21.05.2021 15:36 <DIR> .. 30.03.2021 17:27 <DIR> algorithms 30.03.2021 17:27 <DIR> animation 30.03.2021 17:27 <DIR> communication 30.03.2021 17:27 <DIR> components 30.03.2021 17:27 <DIR> debug 30.03.2021 17:27 <DIR> loader 30.03.2021 17:27 <DIR> numerics 30.03.2021 17:27 <DIR> physics 21.05.2021 15:36 <DIR> scene 30.03.2021 17:27 <DIR> solver 30.03.2021 17:27 <DIR> tools 30.03.2021 17:27 <DIR> units 30.03.2021 17:27 <DIR> visuals 30.03.2021 16:04 307 __init__.py 21.05.2021 15:36 512 __init__.pyc
Best
StephStephBlockedHi @younesssss
Thanks for your feedback, I implemented it.
I can open and run SofaPython examples without errors, however STLIB is still causing trouble.
I tried opening the CableConstraint.pyscn example in the\SOFA_v20.12.02_Win64\plugins\SoftRobots\docs\examples\component\constraint\CableConstraint
folder and got the following error:[INFO] [runSofa] PluginRepository paths = C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/plugins;C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin;C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin [INFO] [runSofa] DataRepository paths = C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/share/sofa;C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/share/sofa/examples;C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/share/sofa;C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/share/sofa/examples [INFO] [runSofa] GuiDataRepository paths = C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/share/sofa/gui/runSofa;C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/share/sofa/gui/qt [INFO] [runSofa] Loading automatically plugin list in C:\Users\vogts\Downloads\SOFA_v20.12.02_Win64\bin/plugin_list.conf [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaSimpleFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaRigid.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaDeformable.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaObjectInteraction.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaMeshCollision.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaEngine.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaExplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaImplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaLoader.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralVisual.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGraphComponent.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralMeshCollision.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaBoundaryCondition.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralAnimationLoop.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralDeformable.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralEngine.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralExplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralImplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralLinearSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralRigid.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralObjectInteraction.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralSimpleFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralTopology.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaTopologyMapping.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaUserInteraction.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaConstraint.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaGeneralLoader.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaExporter.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaSparseSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaPreconditioner.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaHaptics.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaValidation.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaDenseSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaNonUniformFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaOpenglVisual.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaMiscTopology.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaMiscExtra.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaMiscForceField.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaMiscEngine.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaMiscSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaMiscFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaMiscMapping.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/CImgPlugin.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaSphFluid.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/bin/SofaMiscCollision.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/plugins/STLIB/bin/STLIB.dll [INFO] [SofaPython] Added 'C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/plugins/SofaPython/lib/python2.7/site-packages' to sys.path [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/plugins/SofaPython/bin/SofaPython.dll Warning: Setting a new default format with a different version or profile after the global shared context is created may cause issues with context sharing. The constructor with a QGLFormat is deprecated, use the regular contructor instead. [INFO] [SceneCheckerVisitor] Validating node "root" with checks: [SceneCheckDuplicatedName, SceneCheckMissingRequiredPlugin, SceneCheckUsingAlias] [INFO] [SceneCheckerVisitor] Finished validating node "root". [ERROR] [PythonScript] ImportError: No module named stlib.scene File "CableConstraint.pyscn", line 7, in <module> from stlib.scene import Scene [ERROR] [SofaPython] Script (file:CableConstraint) import error [ERROR] [SofaPython] scene script load error. [WARNING] [RealGUI] Failed to load C:/Users/vogts/Downloads/SOFA_v20.12.02_Win64/plugins/SoftRobots/docs/examples/component/constraint/CableConstraint/CableConstraint.pyscn
Any further suggestions on how to resolve this?
Thanks!
StephStephBlockedHi @younesssss, thanks for your reply.
So I would like to use python 2.7 since to my understanding many of the softrobotic tutorials are still using python 2.7.
I actually hadn’t manually added the stlib folder to my path yet.
However, in my STLIB folder from the binaries I do have
...\SOFA_v20.12.02_Win64\plugins\STLIB\python
but not the python3/src you mentioned, and on the opposite I have...\SOFA_v20.12.02_Win64\plugins\STLIB\lib\python3\site-packages
, and not the python2 site-packages –> so there seems to be a mismatch here (unless I am looking in the wrong folders).
How would you proceed?Thanks for your help
StephStephBlockedIs anyone able to help me with this issue?
Would be very much appreciated!
Best
StephiStephBlockedHi Hugo, nice to hear from you in writing as well after watching you for some hours on youtube 😀
Thanks for the notification that the screenshots are not viewable, I will paste the error code in the following.
I tried to use the (Python2.7) SofaPython plugin with the following script of the SoftRobots tutorials
from stlib.scene import MainHeader, ContactHeader from stlib.visuals import ShowGrid from stlib.physics.rigid import Floor from stlib.physics.rigid import Cube def createScene(rootNode): """This is my first scene""" MainHeader(rootNode, gravity=[0.0,-981.0,0.0]) ContactHeader(rootNode, alarmDistance=15, contactDistance=10) Floor(rootNode, translation=[0.0,-160.0,0.0], isAStaticObject=True) Cube(rootNode, translation=[0.0,0.0,0.0], uniformScale=20.0) return rootNode
however I get an STLIB(.scene) error. Do I need to manually download/add STLIB into some directory? I read in some other forum posts about out-of-tree and cmake in connection with STLIB but am not sure if I need to do that and if so how. I assumed it came with the latest SOFA version since it’s listed in the plugin manager.
[INFO] [runSofa] PluginRepository paths = C:/Users/vogts/SOFA/v20.12.01/plugins;C:/Users/vogts/SOFA/v20.12.01/bin;C:/Users/vogts/SOFA/v20.12.01/bin [INFO] [runSofa] DataRepository paths = C:/Users/vogts/SOFA/v20.12.01/share/sofa;C:/Users/vogts/SOFA/v20.12.01/share/sofa/examples;C:/Users/vogts/SOFA/v20.12.01/share/sofa;C:/Users/vogts/SOFA/v20.12.01/share/sofa/examples [INFO] [runSofa] GuiDataRepository paths = C:/Users/vogts/SOFA/v20.12.01/share/sofa/gui/runSofa;C:/Users/vogts/SOFA/v20.12.01/share/sofa/gui/qt [INFO] [runSofa] Loading automatically plugin list in C:/Users/vogts/SOFA/v20.12.01/bin/plugin_list.conf [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaSimpleFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaRigid.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaDeformable.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaObjectInteraction.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaMeshCollision.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaEngine.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaExplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaImplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaLoader.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralVisual.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGraphComponent.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralMeshCollision.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaBoundaryCondition.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralAnimationLoop.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralDeformable.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralEngine.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralExplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralImplicitOdeSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralLinearSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralRigid.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralObjectInteraction.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralSimpleFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralTopology.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaTopologyMapping.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaUserInteraction.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaConstraint.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaGeneralLoader.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaExporter.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaSparseSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaPreconditioner.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaHaptics.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaValidation.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaDenseSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaNonUniformFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaOpenglVisual.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaMiscTopology.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaMiscExtra.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaMiscForceField.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaMiscEngine.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaMiscSolver.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaMiscFem.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaMiscMapping.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/CImgPlugin.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaSphFluid.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/SofaMiscCollision.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/bin/STLIB.dll [INFO] [SofaPython] Added 'C:/Users/vogts/SOFA/v20.12.01/plugins/SofaPython/lib/python2.7/site-packages' to sys.path [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/plugins/SofaPython/bin/SofaPython.dll [INFO] [PluginManager] Loaded plugin: C:/Users/vogts/SOFA/v20.12.01/plugins/SoftRobots/bin/SoftRobots.dll [INFO] [SofaPython] Added 'C:/Users/vogts/SOFA/v20.12.01/plugins/SoftRobots/lib/python2.7/site-packages' to sys.path Warning: Setting a new default format with a different version or profile after the global shared context is created may cause issues with context sharing. The constructor with a QGLFormat is deprecated, use the regular contructor instead. [INFO] [SceneCheckerVisitor] Validating node "root" with checks: [SceneCheckDuplicatedName, SceneCheckMissingRequiredPlugin, SceneCheckUsingAlias] [INFO] [SceneCheckerVisitor] Finished validating node "root". [ERROR] [PythonScript] ImportError: No module named stlib.scene File "firststeps-tuto.pyscn", line 1, in <module> from stlib.scene import MainHeader, ContactHeader [ERROR] [SofaPython] Script (file:firststeps-tuto) import error [ERROR] [SofaPython] scene script load error. [WARNING] [RealGUI] Failed to load C:/Users/vogts/SOFA/v20.12.01/share/sofa/examples/Stephi_tryout/firststeps-tuto.pyscn
Nevertheless, the minimal python script example you presented in the youtube tutorial:
import Sofa def createScene(node): node.gravity="0 0 0" node.name = "root" childNode = node.createChild("Particle") childNode.createObject('EulerImplicitSolver') childNode.createObject('CGLinearSolver',iterations="200",tolerance="1e-09") childNode.createObject('MechanicalObject', template="Rigid3d", name="myParticle",position="0 0 0 0 0 0 1", showObject="1") childNode.createObject('UniformMass',totalMass="1") childNode.createObject('ConstantForceField', name ="CFF", totalForce="1 0 0 0 0 0")
works now (except a “scene radius must be positive – ignoring value” message)!
I assume we have to get above to run before potentially moving to Python3?
Thanks for your reply/help and best regards
Stephi -
AuthorPosts