You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used SOFA_v24.06.00_Win64.exe to install SOFA on Win10, and I think I have all the plugins for the CableGripper tutorial:
When I open the finger.py from location "...\SofaInstallation\v24.06.00\plugins\SoftRobots\share\sofa\examples\SoftRobots\tutorials\CableGripper\details\finger.py", it only shows a red box, without any finger there:
and it gives warnings as shown below:
[WARNING] [MeshVTKLoader(loader)] Could not read value for data field rotation: np.float64(0.0) np.float64(0.0) np.float64(0.0)
[WARNING] [MeshVTKLoader(loader)] Could not read value for data field scale3d: np.float64(1.0) np.float64(1.0) np.float64(1.0)
[WARNING] [MeshVTKLoader(loader)] Could not read value for data field translation: np.float64(1.0) np.float64(0.0) np.float64(0.0)
[WARNING] [OglModel(OglModel)] Could not read value for data field rotation: np.float64(0.0) np.float64(0.0) np.float64(0.0)
[WARNING] [OglModel(OglModel)] Could not read value for data field scale3d: np.float64(1.0) np.float64(1.0) np.float64(1.0)
[WARNING] [OglModel(OglModel)] Could not read value for data field translation: np.float64(1.0) np.float64(0.0) np.float64(0.0)
[INFO] [SceneCheckerVisitor] Validating node "root" with checks: [SceneCheckCollisionResponse, SceneCheckDeprecatedComponents, SceneCheckDuplicatedName, SceneCheckMissingRequiredPlugin, SceneCheckUsingAlias, SceneCheckMultithreading]
[WARNING] [SceneCheckMissingRequiredPlugin] This scene is using component defined in plugins but is not importing the required plugins.
Your scene may not work on a sofa environment with different pre-loaded plugins.
To fix your scene and remove this warning you just need to cut & paste the following lines at the beginning of your scene:
root.addObject('RequiredPlugin', name='Sofa.Component.AnimationLoop') # Needed to use components [FreeMotionAnimationLoop]
root.addObject('RequiredPlugin', name='Sofa.Component.Collision.Detection.Algorithm') # Needed to use components [BVHNarrowPhase,BruteForceBroadPhase,CollisionPipeline]
root.addObject('RequiredPlugin', name='Sofa.Component.Collision.Detection.Intersection') # Needed to use components [LocalMinDistance]
root.addObject('RequiredPlugin', name='Sofa.Component.Collision.Geometry') # Needed to use components [LineCollisionModel,PointCollisionModel,TriangleCollisionModel]
root.addObject('RequiredPlugin', name='Sofa.Component.Collision.Response.Contact') # Needed to use components [RuleBasedContactManager]
root.addObject('RequiredPlugin', name='Sofa.Component.Constraint.Lagrangian.Correction') # Needed to use components [LinearSolverConstraintCorrection]
root.addObject('RequiredPlugin', name='Sofa.Component.Constraint.Lagrangian.Solver') # Needed to use components [GenericConstraintSolver]
root.addObject('RequiredPlugin', name='Sofa.Component.Engine.Select') # Needed to use components [BoxROI]
root.addObject('RequiredPlugin', name='Sofa.Component.LinearSolver.Direct') # Needed to use components [SparseLDLSolver]
root.addObject('RequiredPlugin', name='Sofa.Component.Mapping.Linear') # Needed to use components [BarycentricMapping]
root.addObject('RequiredPlugin', name='Sofa.Component.Mass') # Needed to use components [UniformMass]
root.addObject('RequiredPlugin', name='Sofa.Component.ODESolver.Backward') # Needed to use components [EulerImplicitSolver]
root.addObject('RequiredPlugin', name='Sofa.Component.SolidMechanics.FEM.Elastic') # Needed to use components [TetrahedronFEMForceField]
root.addObject('RequiredPlugin', name='Sofa.Component.SolidMechanics.Spring') # Needed to use components [RestShapeSpringsForceField]
root.addObject('RequiredPlugin', name='Sofa.Component.StateContainer') # Needed to use components [MechanicalObject]
root.addObject('RequiredPlugin', name='Sofa.Component.Topology.Container.Constant') # Needed to use components [MeshTopology]
root.addObject('RequiredPlugin', name='Sofa.Component.Topology.Container.Dynamic') # Needed to use components [TetrahedronSetTopologyContainer]
root.addObject('RequiredPlugin', name='Sofa.Component.Visual') # Needed to use components [VisualStyle]
[SUGGESTION] [SceneCheckMultithreading] This scene is using components implemented sequentially while a parallel implementation is available. Using the parallel implementation may improve the performances. Here is the list of sequential components in your scene and their parallel equivalent:
BVHNarrowPhase -> ParallelBVHNarrowPhase
BruteForceBroadPhase -> ParallelBruteForceBroadPhase
TetrahedronFEMForceField[Vec3d] -> ParallelTetrahedronFEMForceField[Vec3d]
[INFO] [SceneCheckerVisitor] Finished validating node "root".
Then I add these suggested code from the warning to a copy of finger.py, named finger2.py at same location:
import Sofa.Core
import Sofa.constants.Key as Key
from stlib3.physics.deformable import ElasticMaterialObject
from stlib3.physics.constraints import FixedBox
from softrobots.actuators import PullingCable
from stlib3.physics.collision import CollisionMesh
from splib3.loaders import loadPointListFromFile
class FingerController(Sofa.Core.Controller):
def __init__(self, *args, **kwargs):
Sofa.Core.Controller.__init__(self, args, kwargs)
self.cable = args[0]
self.name = "FingerController"
def onKeypressedEvent(self, e):
displacement = self.cable.CableConstraint.value[0]
if e["key"] == Key.plus:
displacement += 1.
elif e["key"] == Key.minus:
displacement -= 1.
if displacement < 0:
displacement = 0
self.cable.CableConstraint.value = [displacement]
def Finger(parentNode=None, name="Finger",
rotation=[0.0, 0.0, 0.0], translation=[0.0, 0.0, 0.0],
fixingBox=[-5.0, 0.0, 0.0, 10.0, 15.0, 20.0], pullPointLocation=[0.0, 0.0, 0.0]):
finger = parentNode.addChild(name)
eobject = ElasticMaterialObject(finger,
volumeMeshFileName="data/mesh/finger.vtk",
poissonRatio=0.3,
youngModulus=18000,
totalMass=0.5,
surfaceColor=[0.0, 0.8, 0.7, 1.0],
surfaceMeshFileName="data/mesh/finger.stl",
rotation=rotation,
translation=translation)
finger.addChild(eobject)
FixedBox(eobject, atPositions=fixingBox, doVisualization=True)
cable = PullingCable(eobject,
"PullingCable",
pullPointLocation=pullPointLocation,
rotation=rotation,
translation=translation,
cableGeometry=loadPointListFromFile("data/mesh/cable.json"));
eobject.addObject(FingerController(cable))
CollisionMesh(eobject, name="CollisionMesh",
surfaceMeshFileName="data/mesh/finger.stl",
rotation=rotation, translation=translation,
collisionGroup=[1, 2])
CollisionMesh(eobject, name="CollisionMeshAuto1",
surfaceMeshFileName="data/mesh/fingerCollision_part1.stl",
rotation=rotation, translation=translation,
collisionGroup=[1])
CollisionMesh(eobject, name="CollisionMeshAuto2",
surfaceMeshFileName="data/mesh/fingerCollision_part2.stl",
rotation=rotation, translation=translation,
collisionGroup=[2])
return finger
def createScene(rootNode):
from stlib3.scene import MainHeader, ContactHeader
rootNode.addObject('RequiredPlugin', name='Sofa.Component.AnimationLoop') # Needed to use components [FreeMotionAnimationLoop]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Collision.Detection.Algorithm') # Needed to use components [BVHNarrowPhase,BruteForceBroadPhase,CollisionPipeline]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Collision.Detection.Intersection') # Needed to use components [LocalMinDistance]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Collision.Geometry') # Needed to use components [LineCollisionModel,PointCollisionModel,TriangleCollisionModel]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Collision.Response.Contact') # Needed to use components [RuleBasedContactManager]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Constraint.Lagrangian.Correction') # Needed to use components [LinearSolverConstraintCorrection]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Constraint.Lagrangian.Solver') # Needed to use components [GenericConstraintSolver]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Engine.Select') # Needed to use components [BoxROI]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.LinearSolver.Direct') # Needed to use components [SparseLDLSolver]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Mapping.Linear') # Needed to use components [BarycentricMapping]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Mass') # Needed to use components [UniformMass]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.ODESolver.Backward') # Needed to use components [EulerImplicitSolver]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.SolidMechanics.FEM.Elastic') # Needed to use components [TetrahedronFEMForceField]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.SolidMechanics.Spring') # Needed to use components [RestShapeSpringsForceField]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.StateContainer') # Needed to use components [MechanicalObject]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Topology.Container.Constant') # Needed to use components [MeshTopology]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Topology.Container.Dynamic') # Needed to use components [TetrahedronSetTopologyContainer]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Visual') # Needed to use components [VisualStyle]
MainHeader(rootNode, gravity=[0.0, -981.0, 0.0], plugins=["SoftRobots"])
ContactHeader(rootNode, alarmDistance=4, contactDistance=3, frictionCoef=0.08)
rootNode.VisualStyle.displayFlags = "showBehavior showCollisionModels"
Finger(rootNode, translation=[1.0, 0.0, 0.0])
return rootNode
where Bold codes are added by me. But it still showed the same scene in the window (only red box without any finger) and gave warnings:
[WARNING] [MeshVTKLoader(loader)] Could not read value for data field rotation: np.float64(0.0) np.float64(0.0) np.float64(0.0)
[WARNING] [MeshVTKLoader(loader)] Could not read value for data field scale3d: np.float64(1.0) np.float64(1.0) np.float64(1.0)
[WARNING] [MeshVTKLoader(loader)] Could not read value for data field translation: np.float64(1.0) np.float64(0.0) np.float64(0.0)
[WARNING] [OglModel(OglModel)] Could not read value for data field rotation: np.float64(0.0) np.float64(0.0) np.float64(0.0)
[WARNING] [OglModel(OglModel)] Could not read value for data field scale3d: np.float64(1.0) np.float64(1.0) np.float64(1.0)
[WARNING] [OglModel(OglModel)] Could not read value for data field translation: np.float64(1.0) np.float64(0.0) np.float64(0.0)
[INFO] [SceneCheckerVisitor] Validating node "root" with checks: [SceneCheckCollisionResponse, SceneCheckDeprecatedComponents, SceneCheckDuplicatedName, SceneCheckMissingRequiredPlugin, SceneCheckUsingAlias, SceneCheckMultithreading]
[SUGGESTION] [SceneCheckMultithreading] This scene is using components implemented sequentially while a parallel implementation is available. Using the parallel implementation may improve the performances. Here is the list of sequential components in your scene and their parallel equivalent:
BVHNarrowPhase -> ParallelBVHNarrowPhase
BruteForceBroadPhase -> ParallelBruteForceBroadPhase
TetrahedronFEMForceField[Vec3d] -> ParallelTetrahedronFEMForceField[Vec3d]
[INFO] [SceneCheckerVisitor] Finished validating node "root".
And for sure the "gripper.py" also can not display any finger.
I'm new in SOFA, and everything modeled in the SoftRobots/FirstSteps tutorial runs fine.
Is [WARNING] [MeshVTKLoader(loader)] Could not read value for data field rotation: np.float64(0.0) np.float64(0.0) np.float64(0.0) the first message you get from the console? do you have any prior error/warning?
Thanks for your reply. There is indeed still warnings, it comes when SOFA is initialized. But with these warnings, the SoftRobots/FirstSteps tutorial runs fine. The warnings are shown below
[WARNING] [Qt] QObject::connect: No such slot sofa::gui::qt::RealGUI::fileSaveAs(sofa::simulation::Node*)
[WARNING] [Qt] QObject::connect: (sender name: 'SimuGraph')
[WARNING] [Qt] QObject::connect: (receiver name: 'GUI')
To make it more clear, I've copied all the messges from the console window, including the initialization process and the message prompted when opening finger.py, below. Thanks
[INFO] [runSofa] PluginRepository paths = E:/Sofa/Installation/v24.06.00/bin;E:/Sofa/Installation/v24.06.00/plugins;E:/Sofa/Installation/v24.06.00/collections;E:/Sofa/Installation/v24.06.00/bin
[INFO] [runSofa] DataRepository paths = E:/Sofa/Installation/v24.06.00/share/sofa;E:/Sofa/Installation/v24.06.00/share/sofa/examples;E:/Sofa/Installation/v24.06.00/share/sofa;E:/Sofa/Installation/v24.06.00/share/sofa/examples
[INFO] [runSofa] GuiDataRepository paths = E:/Sofa/Installation/v24.06.00/share/sofa/gui/runSofa;E:/Sofa/Installation/v24.06.00/share/sofa/gui/qt;E:/Sofa/Installation/v24.06.00/share/sofa/gui/qt
[INFO] [GUIManager] Registered batch as a GUI.
[INFO] [runSofa] Loading automatically plugin list in E:/Sofa/Installation/v24.06.00/bin/plugin_list.conf
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.ODESolver.Forward.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.ODESolver.Backward.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.ODESolver.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.IO.Mesh.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.IO.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Playback.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.SceneUtility.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Topology.Container.Constant.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Topology.Container.Dynamic.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Topology.Container.Grid.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Topology.Container.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Topology.Mapping.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Topology.Utility.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Topology.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Visual.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.LinearSystem.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.LinearSolver.Iterative.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.LinearSolver.Ordering.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.LinearSolver.Direct.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.LinearSolver.Preconditioner.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.LinearSolver.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Mass.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Diffusion.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Mapping.Linear.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Mapping.NonLinear.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Mapping.MappedMatrix.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Mapping.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.StateContainer.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.SolidMechanics.Spring.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.SolidMechanics.FEM.Elastic.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.SolidMechanics.FEM.HyperElastic.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.SolidMechanics.FEM.NonUniform.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.SolidMechanics.FEM.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.SolidMechanics.TensorMass.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.SolidMechanics.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Constraint.Lagrangian.Model.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Constraint.Lagrangian.Correction.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Constraint.Lagrangian.Solver.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Constraint.Lagrangian.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Constraint.Projective.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Constraint.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.AnimationLoop.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.MechanicalLoad.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Collision.Geometry.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Collision.Detection.Algorithm.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Collision.Detection.Intersection.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Collision.Detection.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Collision.Response.Mapper.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Collision.Response.Contact.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Collision.Response.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Collision.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Setting.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Controller.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Engine.Analyze.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Engine.Generate.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Engine.Select.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Engine.Transform.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Engine.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.Haptics.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Component.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.GL.Component.Rendering2D.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.GL.Component.Rendering3D.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.GL.Component.Engine.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.GL.Component.Shader.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.GL.Component.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.GUI.Component.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.GUI.Batch.dll
[INFO] [GUIManager] Registered qglviewer as a GUI.
[INFO] [GUIManager] Registered qt as a GUI.
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.GUI.Qt.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/MultiThreading.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/Sofa.Metis.dll
[INFO] [SofaPython3] Initializing with python version 3.10.15 | packaged by Anaconda, Inc. | (main, Oct 3 2024, 07:22:19) [MSC v.1929 64 bit (AMD64)]
[INFO] [SofaPython3] Registering a scene loader for [.py, .py3, .pyscn, .py3scn] files.
[INFO] [SofaPython3] Initializing python
[INFO] [SofaPython3] Added 'E:/Sofa/Installation/v24.06.00/plugins/SofaPython3/lib/python3/site-packages' to sys.path
---------------------------------------
Checking SOFA_ROOT and SOFAPYTHON3_ROOT
Using environment variable SOFA_ROOT: E:\Sofa\Installation\v24.06.00
Warning: environment variable SOFAPYTHON3_ROOT is empty. Trying to guess it.
Guessed SOFAPYTHON3_ROOT: E:\Sofa\Installation\v24.06.00\plugins\SofaPython3
Found Sofa.Helper.dll in E:\Sofa\Installation\v24.06.00\bin
Found SofaPython3.dll in E:\Sofa\Installation\v24.06.00\plugins\SofaPython3\bin
---------------------------------------
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/SofaPython3.dll
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/STLIB.dll
[INFO] [SofaPython3] Added 'E:/Sofa/Installation/v24.06.00/plugins/STLIB/lib/python3/site-packages' to sys.path
[INFO] [PluginManager] Loaded plugin: E:/Sofa/Installation/v24.06.00/bin/SoftRobots.dll
[INFO] [SofaPython3] Added 'E:/Sofa/Installation/v24.06.00/plugins/SoftRobots/lib/python3/site-packages' to sys.path
[INFO] [PluginManager] 72 plugins have been loaded from E:/Sofa/Installation/v24.06.00/bin/plugin_list.conf
[INFO] [SofaPluginManager] Loading automatically plugin list in E:/Sofa/Installation/v24.06.00/config/loadedPlugins.ini
[INFO] [PluginManager] 0 plugins have been loaded from E:/Sofa/Installation/v24.06.00/config/loadedPlugins.ini
[WARNING] [Qt] QObject::connect: No such slot sofa::gui::qt::RealGUI::fileSaveAs(sofa::simulation::Node*)
[WARNING] [Qt] QObject::connect: (sender name: 'SimuGraph')
[WARNING] [Qt] QObject::connect: (receiver name: 'GUI')
[INFO] [SceneCheckerVisitor] Validating node "root" with checks: [SceneCheckCollisionResponse, SceneCheckDeprecatedComponents, SceneCheckDuplicatedName, SceneCheckMissingRequiredPlugin, SceneCheckUsingAlias, SceneCheckMultithreading]
[SUGGESTION] [SceneCheckMultithreading] This scene is using components implemented sequentially while a parallel implementation is available. Using the parallel implementation may improve the performances. Here is the list of sequential components in your scene and their parallel equivalent:
BVHNarrowPhase -> ParallelBVHNarrowPhase
BruteForceBroadPhase -> ParallelBruteForceBroadPhase
HexahedronFEMForceField[Vec3d] -> ParallelHexahedronFEMForceField[Vec3d]
[INFO] [SceneCheckerVisitor] Finished validating node "root".
[WARNING] [MeshVTKLoader(loader)] Could not read value for data field rotation: np.float64(0.0) np.float64(0.0) np.float64(0.0)
[WARNING] [MeshVTKLoader(loader)] Could not read value for data field scale3d: np.float64(1.0) np.float64(1.0) np.float64(1.0)
[WARNING] [MeshVTKLoader(loader)] Could not read value for data field translation: np.float64(1.0) np.float64(0.0) np.float64(0.0)
[WARNING] [OglModel(OglModel)] Could not read value for data field rotation: np.float64(0.0) np.float64(0.0) np.float64(0.0)
[WARNING] [OglModel(OglModel)] Could not read value for data field scale3d: np.float64(1.0) np.float64(1.0) np.float64(1.0)
[WARNING] [OglModel(OglModel)] Could not read value for data field translation: np.float64(1.0) np.float64(0.0) np.float64(0.0)
[INFO] [SceneCheckerVisitor] Validating node "root" with checks: [SceneCheckCollisionResponse, SceneCheckDeprecatedComponents, SceneCheckDuplicatedName, SceneCheckMissingRequiredPlugin, SceneCheckUsingAlias, SceneCheckMultithreading]
[WARNING] [SceneCheckMissingRequiredPlugin] This scene is using component defined in plugins but is not importing the required plugins.
Your scene may not work on a sofa environment with different pre-loaded plugins.
To fix your scene and remove this warning you just need to cut & paste the following lines at the beginning of your scene:
root.addObject('RequiredPlugin', name='Sofa.Component.AnimationLoop') # Needed to use components [FreeMotionAnimationLoop]
root.addObject('RequiredPlugin', name='Sofa.Component.Collision.Detection.Algorithm') # Needed to use components [BVHNarrowPhase,BruteForceBroadPhase,CollisionPipeline]
root.addObject('RequiredPlugin', name='Sofa.Component.Collision.Detection.Intersection') # Needed to use components [LocalMinDistance]
root.addObject('RequiredPlugin', name='Sofa.Component.Collision.Geometry') # Needed to use components [LineCollisionModel,PointCollisionModel,TriangleCollisionModel]
root.addObject('RequiredPlugin', name='Sofa.Component.Collision.Response.Contact') # Needed to use components [RuleBasedContactManager]
root.addObject('RequiredPlugin', name='Sofa.Component.Constraint.Lagrangian.Correction') # Needed to use components [LinearSolverConstraintCorrection]
root.addObject('RequiredPlugin', name='Sofa.Component.Constraint.Lagrangian.Solver') # Needed to use components [GenericConstraintSolver]
root.addObject('RequiredPlugin', name='Sofa.Component.Engine.Select') # Needed to use components [BoxROI]
root.addObject('RequiredPlugin', name='Sofa.Component.LinearSolver.Direct') # Needed to use components [SparseLDLSolver]
root.addObject('RequiredPlugin', name='Sofa.Component.Mapping.Linear') # Needed to use components [BarycentricMapping]
root.addObject('RequiredPlugin', name='Sofa.Component.Mass') # Needed to use components [UniformMass]
root.addObject('RequiredPlugin', name='Sofa.Component.ODESolver.Backward') # Needed to use components [EulerImplicitSolver]
root.addObject('RequiredPlugin', name='Sofa.Component.SolidMechanics.FEM.Elastic') # Needed to use components [TetrahedronFEMForceField]
root.addObject('RequiredPlugin', name='Sofa.Component.SolidMechanics.Spring') # Needed to use components [RestShapeSpringsForceField]
root.addObject('RequiredPlugin', name='Sofa.Component.StateContainer') # Needed to use components [MechanicalObject]
root.addObject('RequiredPlugin', name='Sofa.Component.Topology.Container.Constant') # Needed to use components [MeshTopology]
root.addObject('RequiredPlugin', name='Sofa.Component.Topology.Container.Dynamic') # Needed to use components [TetrahedronSetTopologyContainer]
root.addObject('RequiredPlugin', name='Sofa.Component.Visual') # Needed to use components [VisualStyle]
[SUGGESTION] [SceneCheckMultithreading] This scene is using components implemented sequentially while a parallel implementation is available. Using the parallel implementation may improve the performances. Here is the list of sequential components in your scene and their parallel equivalent:
BVHNarrowPhase -> ParallelBVHNarrowPhase
BruteForceBroadPhase -> ParallelBruteForceBroadPhase
TetrahedronFEMForceField[Vec3d] -> ParallelTetrahedronFEMForceField[Vec3d]
[INFO] [SceneCheckerVisitor] Finished validating node "root".
Hi there. Is this problem solved? I have the same issue here. In the section "def Finger(parentNode=None, name="Finger",
rotation=[0.0, 0.0, 0.0], translation=[0.0, 0.0, 0.0],
fixingBox=[-5.0, 0.0, 0.0, 10.0, 15.0, 20.0], pullPointLocation=[0.0, 0.0, 0.0]):", the arrays are already regular reals aren't they? Is this problem caused because there may be numpy arrays in data/mesh/finger.vtk?
Hi @ZacharyZhou12138
it appears that several tutorials are not up-to-date
The SoftRobots team will work on it since a summer school is planned next June 29 – July 3 based on these
⚠️⚠️⚠️ @JiangkunY Feedback has been given to you by the project reviewers, however we have not received a response from you. Without further news in the coming weeks, this discussion will be automatically closed in order to keep this forum clean and fresh 🌱 Thank you for your understanding
⚠️⚠️⚠️ @JiangkunY In accordance with our forum management policy, the last reply is more than 4 months old and is therefore closed. Our objective is to keep the forum up to date and offer the best support experience.
Please feel free to reopen it if the topic is still active by providing us with an update. Please feel free to open a new thread at any time - we'll be happy to help where and when we can.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
I used SOFA_v24.06.00_Win64.exe to install SOFA on Win10, and I think I have all the plugins for the CableGripper tutorial:
When I open the finger.py from location "...\SofaInstallation\v24.06.00\plugins\SoftRobots\share\sofa\examples\SoftRobots\tutorials\CableGripper\details\finger.py", it only shows a red box, without any finger there:

and it gives warnings as shown below:
Then I add these suggested code from the warning to a copy of finger.py, named finger2.py at same location:
import Sofa.Core import Sofa.constants.Key as Key from stlib3.physics.deformable import ElasticMaterialObject from stlib3.physics.constraints import FixedBox from softrobots.actuators import PullingCable from stlib3.physics.collision import CollisionMesh from splib3.loaders import loadPointListFromFile class FingerController(Sofa.Core.Controller): def __init__(self, *args, **kwargs): Sofa.Core.Controller.__init__(self, args, kwargs) self.cable = args[0] self.name = "FingerController" def onKeypressedEvent(self, e): displacement = self.cable.CableConstraint.value[0] if e["key"] == Key.plus: displacement += 1. elif e["key"] == Key.minus: displacement -= 1. if displacement < 0: displacement = 0 self.cable.CableConstraint.value = [displacement] def Finger(parentNode=None, name="Finger", rotation=[0.0, 0.0, 0.0], translation=[0.0, 0.0, 0.0], fixingBox=[-5.0, 0.0, 0.0, 10.0, 15.0, 20.0], pullPointLocation=[0.0, 0.0, 0.0]): finger = parentNode.addChild(name) eobject = ElasticMaterialObject(finger, volumeMeshFileName="data/mesh/finger.vtk", poissonRatio=0.3, youngModulus=18000, totalMass=0.5, surfaceColor=[0.0, 0.8, 0.7, 1.0], surfaceMeshFileName="data/mesh/finger.stl", rotation=rotation, translation=translation) finger.addChild(eobject) FixedBox(eobject, atPositions=fixingBox, doVisualization=True) cable = PullingCable(eobject, "PullingCable", pullPointLocation=pullPointLocation, rotation=rotation, translation=translation, cableGeometry=loadPointListFromFile("data/mesh/cable.json")); eobject.addObject(FingerController(cable)) CollisionMesh(eobject, name="CollisionMesh", surfaceMeshFileName="data/mesh/finger.stl", rotation=rotation, translation=translation, collisionGroup=[1, 2]) CollisionMesh(eobject, name="CollisionMeshAuto1", surfaceMeshFileName="data/mesh/fingerCollision_part1.stl", rotation=rotation, translation=translation, collisionGroup=[1]) CollisionMesh(eobject, name="CollisionMeshAuto2", surfaceMeshFileName="data/mesh/fingerCollision_part2.stl", rotation=rotation, translation=translation, collisionGroup=[2]) return finger def createScene(rootNode): from stlib3.scene import MainHeader, ContactHeader rootNode.addObject('RequiredPlugin', name='Sofa.Component.AnimationLoop') # Needed to use components [FreeMotionAnimationLoop] rootNode.addObject('RequiredPlugin', name='Sofa.Component.Collision.Detection.Algorithm') # Needed to use components [BVHNarrowPhase,BruteForceBroadPhase,CollisionPipeline] rootNode.addObject('RequiredPlugin', name='Sofa.Component.Collision.Detection.Intersection') # Needed to use components [LocalMinDistance] rootNode.addObject('RequiredPlugin', name='Sofa.Component.Collision.Geometry') # Needed to use components [LineCollisionModel,PointCollisionModel,TriangleCollisionModel] rootNode.addObject('RequiredPlugin', name='Sofa.Component.Collision.Response.Contact') # Needed to use components [RuleBasedContactManager] rootNode.addObject('RequiredPlugin', name='Sofa.Component.Constraint.Lagrangian.Correction') # Needed to use components [LinearSolverConstraintCorrection] rootNode.addObject('RequiredPlugin', name='Sofa.Component.Constraint.Lagrangian.Solver') # Needed to use components [GenericConstraintSolver] rootNode.addObject('RequiredPlugin', name='Sofa.Component.Engine.Select') # Needed to use components [BoxROI] rootNode.addObject('RequiredPlugin', name='Sofa.Component.LinearSolver.Direct') # Needed to use components [SparseLDLSolver] rootNode.addObject('RequiredPlugin', name='Sofa.Component.Mapping.Linear') # Needed to use components [BarycentricMapping] rootNode.addObject('RequiredPlugin', name='Sofa.Component.Mass') # Needed to use components [UniformMass] rootNode.addObject('RequiredPlugin', name='Sofa.Component.ODESolver.Backward') # Needed to use components [EulerImplicitSolver] rootNode.addObject('RequiredPlugin', name='Sofa.Component.SolidMechanics.FEM.Elastic') # Needed to use components [TetrahedronFEMForceField] rootNode.addObject('RequiredPlugin', name='Sofa.Component.SolidMechanics.Spring') # Needed to use components [RestShapeSpringsForceField] rootNode.addObject('RequiredPlugin', name='Sofa.Component.StateContainer') # Needed to use components [MechanicalObject] rootNode.addObject('RequiredPlugin', name='Sofa.Component.Topology.Container.Constant') # Needed to use components [MeshTopology] rootNode.addObject('RequiredPlugin', name='Sofa.Component.Topology.Container.Dynamic') # Needed to use components [TetrahedronSetTopologyContainer] rootNode.addObject('RequiredPlugin', name='Sofa.Component.Visual') # Needed to use components [VisualStyle] MainHeader(rootNode, gravity=[0.0, -981.0, 0.0], plugins=["SoftRobots"]) ContactHeader(rootNode, alarmDistance=4, contactDistance=3, frictionCoef=0.08) rootNode.VisualStyle.displayFlags = "showBehavior showCollisionModels" Finger(rootNode, translation=[1.0, 0.0, 0.0]) return rootNodewhere Bold codes are added by me. But it still showed the same scene in the window (only red box without any finger) and gave warnings:
And for sure the "gripper.py" also can not display any finger.
I'm new in SOFA, and everything modeled in the SoftRobots/FirstSteps tutorial runs fine.
Can you kindly help me to find the problem?
All reactions