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
Description
I am trying to run the examples from the pneunet gripper to grab the cude from the scripts
"step7-withSTLIB.py" file and "step7-grabTheCube.py".
The gripper is not able to grip the cube. If I apply more pressure the gripper is entering into the cube which should not be the case.
Please find the screenshot attached.
Steps to reproduce
running the script step7-grabTheCube.py and using control "+" to grip the cube.
Expected behavior
The cube should be gripped and so that it can be picked up.
The code for "step7-withSTLIB.py" and "param.py" file as below.
"step7-withSTLIB.py"
`# STLIB IMPORT
from stlib3.scene import MainHeader
from stlib3.scene import ContactHeader
from stlib3.physics.rigid import Floor, Cube
from stlib3.physics.deformable import ElasticMaterialObject
SOFTROBOTS IMPORT
from softrobots.actuators import PullingCable, PneumaticCavity
CONTROLLER IMPORT
from wholeGripperController import WholeGripperController
ARGUMENTS IMPORT
from param import *
def createScene(rootNode):
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,UncoupledConstraintCorrection]
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.LinearSolver.Iterative') # Needed to use components [CGLinearSolver]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Mapping.Linear') # Needed to use components [BarycentricMapping]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Mapping.NonLinear') # Needed to use components [RigidMapping]
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,TriangleSetTopologyContainer]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Visual') # Needed to use components [VisualStyle]
System: < NAME AND VERSION - e.g: "Windows 10", "Ubuntu 20.04", ... >
Command: lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy
Version of SOFA: v24.06.00 built with binaries
State: Build Directory
Command called
< COPY-PASTE YOUR COMMAND HERE >
![Screenshot from 2024-10-12 18-06-10](https://github.com/user-attachments/assets/47a941af-2286-435e-a832-94ccab211570)
Problem
Description
I am trying to run the examples from the pneunet gripper to grab the cude from the scripts
"step7-withSTLIB.py" file and "step7-grabTheCube.py".
The gripper is not able to grip the cube. If I apply more pressure the gripper is entering into the cube which should not be the case.
Please find the screenshot attached.
Steps to reproduce
running the script step7-grabTheCube.py and using control "+" to grip the cube.
Expected behavior
The cube should be gripped and so that it can be picked up.
The code for "step7-withSTLIB.py" and "param.py" file as below.
"step7-withSTLIB.py"
`# STLIB IMPORT
from stlib3.scene import MainHeader
from stlib3.scene import ContactHeader
from stlib3.physics.rigid import Floor, Cube
from stlib3.physics.deformable import ElasticMaterialObject
SOFTROBOTS IMPORT
from softrobots.actuators import PullingCable, PneumaticCavity
CONTROLLER IMPORT
from wholeGripperController import WholeGripperController
ARGUMENTS IMPORT
from param import *
def createScene(rootNode):
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,UncoupledConstraintCorrection]
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.LinearSolver.Iterative') # Needed to use components [CGLinearSolver]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Mapping.Linear') # Needed to use components [BarycentricMapping]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Mapping.NonLinear') # Needed to use components [RigidMapping]
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,TriangleSetTopologyContainer]
rootNode.addObject('RequiredPlugin', name='Sofa.Component.Visual') # Needed to use components [VisualStyle]
import math
User parameters
cubeParam = {'name': "Cube",
'totalMass': 0.002,
'translation': [15.0, 20.0, 0.0],
'uniformScale': 21}
floorParam = {'name': "Plane",
'color': [1.0, 0.0, 1.0],
'isAStaticObject': True,
'uniformScale': 3}
Fingers Mesh & Shared Parameters
fingersVolumeMesh = 'data/mesh/pneunetCutCoarse.vtk'
fingersSurfaceAndCollisionMesh = 'data/mesh/pneunetCut.stl'
fingersCavitySurfaceMesh = 'data/mesh/pneunetCavityCut.stl'
Fingers Visu
fingersColor = [0.7, 0.7, 0.7, 0.6]
Fingers Position
heightInitial = 150
radius = 70
angle1 = 90 * math.pi / 180 # Angle between 1st and 2nd finger in radian
angle2 = 270 * math.pi / 180 # Angle between 1st and 3rd finger in radian
angle3 = 360 * math.pi / 180 # Angle between 1st and 4rth finger in radian
youngModulusFingers = 500
youngModulusStiffLayerFingers = 1500
poissonRatioFingers = 0.3
fingersMass = 0.04
cavitiesInitialValue = 0.0001
Parameters for each Fingers
fingersParameters = [
{
'name': 'Finger1',
'rotation': [0.0, 0.0, -270.0],
'translation': [100.0, heightInitial, 0.0],
'ROIBox': [100, heightInitial - 10, -20, 70, heightInitial, 20],
},
{
'name': 'Finger2',
'rotation': [360 - angle1 * 180 / math.pi, 0.0, 90.0],
'translation': [0, heightInitial, radius * math.cos(angle1 - math.pi / 2)],
'ROIBox': [100, heightInitial - 10, -20, 70, heightInitial, 20],
},
{
'name': 'Finger3',
'rotation': [360 - angle2 * 180 / math.pi, 0.0, 90.0],
'translation': [0.0, heightInitial, radius * math.cos(angle2 - math.pi / 2)],
'ROIBox': [100, heightInitial - 10, -20, 70, heightInitial, 20],
}
]
`
Environment
Context
System: < NAME AND VERSION - e.g: "Windows 10", "Ubuntu 20.04", ... >
Command: lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 22.04.4 LTS
Release: 22.04
Codename: jammy
Version of SOFA: v24.06.00 built with binaries
State: Build Directory
Command called
< COPY-PASTE YOUR COMMAND HERE > ![Screenshot from 2024-10-12 18-06-10](https://github.com/user-attachments/assets/47a941af-2286-435e-a832-94ccab211570)
Env vars
python -c "exec( \"import os, sys\nprint('#################')\nprint('--- sys.version ---')\nprint(sys.version)\nprint('--- PATH ---')\ntry:\n print(os.environ['PATH'])\nexcept Exception:\n pass\nprint('--- SOFA_ROOT ---')\ntry:\n print(os.environ['SOFA_ROOT'])\nexcept Exception:\n pass\nprint('--- PYTHONPATH ---')\ntry:\n print(os.environ['PYTHONPATH'])\nexcept Exception:\n pass\nprint('--- sys.path ---')\ntry:\n print(str(sys.path))\nexcept Exception:\n pass\nprint('#################')\" )"
Logs
Full output
Content of build_dir/CMakeCache.txt
< DRAG AND DROP YOUR CMAKECACHE.TXT HERE >
Thank you for your report.
The text was updated successfully, but these errors were encountered: