Forum Replies Created
-
AuthorPosts
-
HugoKeymaster
Hey @adamzhang
I would be great to see tactile research work using SOFA, it is a field which is not the most active one.
1. Tactile sensoring coupled to simulation is a very interesting topic, extremely few investigated in the community. In SOFA, we often simulate virtual models that interact together. Some simulations need what we call haptic feedback, i.e. the haptic information on a real device (haptic device), represented by a virtual device in the simulation. SOFA does support such haptic force feedback. The force is the result of the resolution of a constraint problem, i.e. the solution of the interaction between the virtual objects. An example is made using the Geomagic haptic interface, where the user can interact with a virtual organ through the Geomagic device (applications/plugins/Geomagic/scenes/Geomagic-FEMLiver.scn)
2. Yes, with some FrictionContact option, the contact response is computed by solving Signorini’s law and Coulomb’s friction
3. Regarding a coupling between SOFA and ROS, Fabian Aichele’s work is the best fit for your need. Coupling SOFA into ROS platform!
By the way @faichele, let us know if you need guidance in this merge with the master version of SOFA (or the v18.12 source branch)
Best
Hugo
3 January 2019 at 18:11 in reply to: Carving into model does not work when using another model #12719HugoKeymasterHi @fayad
I am no expert from this plugin, I’ll try to find the answer (or someone who knows) for you 😉
BestHugo
3 January 2019 at 18:10 in reply to: [SOLVED] making models move with each other and not separate #12718HugoKeymasterDear @fayad !
Nice to see you active on the forum. And I saw that you already got some help from @secretdevil in other topics. Great to see and thank you Binesh.
Regarding your current topic, all you need is to create groups of contacts. In your scene, you can:
– add group=”1″ to all scissor parts
– add group=”2″ to any additional object you want to collide with
Thus, the collision between scissor parts won’t be computed. The group datafield has to be specified in all collision models (Point, Line, Triangle).Hope this helps.
BestHugo
HugoKeymasterYes, take a look in examples/Components/engine/TransformEngine.scn
Hugo
HugoKeymasterDear @maadi5,
To start with Python, you can have a look to the example scenes located in applications/plugins/SofaPython/examples. The empty controller case shows how a python is structured.
Hugo
18 December 2018 at 11:55 in reply to: [SOLVED] How to do feasible and stable physical acceleration in force feedback scene? #12617HugoKeymasterThanks for the feedback @outtt
This plugin is a plugin developed by a research team. They are not providing support on this. However, I will catch them up and ask for information.
Let us know whether you solved your issue.
What is your exact configuration (OS, version, version of SOFA etc)Hugo
HugoKeymasterHi @nassim
Regarding the friction issue, you can relate to the following forum discussion talking about the “mu” parameter for friction.
Note that rotation induced by collision can also be due to inertia (i.e. mass) effects.If you want to set a stiffer fiber within your cylinder, you could either:
– create a heterogeneous stiffness (defining a localStiffnessFactor per tetrahedron)
– or use the Mapping approach: map your fibers within the cylinder. Thus, you don’t need anymore Lagrange constraints and an usual DefaultAnimationLoop can be used. Below is an example:<Node name="root" gravity="0 -1 0" dt="0.1"> <!-- Basic Components to perform the collision detection --> <RequiredPlugin pluginName='SofaMiscCollision'/> <GenericConstraintSolver tolerance="0.001" maxIterations="1000"/> <VisualStyle displayFlags="showBehaviorModels showForceFields showVisual showWireframe" /> <DefaultMotionAnimationLoop /> <DefaultPipeline name="DefaultCollisionPipeline" verbose="0" /> <BruteForceDetection name="Detection" /> <MinProximityIntersection name="Proximity" alarmDistance="0.8" contactDistance="0.5" /> <DefaultContactManager name="Response" /> <DefaultCollisionGroupManager name="Group" /> <CollisionResponse name="Response" response="FrictionContact" /> <CollisionGroup name="Group" /> <Node name="Floor"> <MeshTopology name="Topology Floor" filename="mesh/floorFlat.obj" /> <MechanicalObject name="Particles Floor" /> <UncoupledConstraintCorrection /> <PointModel name="FrictionCoeff" contactFriction="100" /> <TetrahedronModel name="FrictionCoeff4" contactFriction="1" /> <TriangleModel name="Triangle For Collision Floor" moving="0" simulated="0" /> <LineModel name="Lines For Collision" moving="0" simulated="0" /> <PointModel name="Points For Collision" moving="0" simulated="0"/> </Node> <!--Test de cylindre 2 --> <Node name="Cylinder" activated="1"> <MeshGmshLoader name="loader" filename="mesh/cylinder.msh" /> <EulerImplicitSolver name="cg_odesolver" printLog="0" /> <CGLinearSolver name="linear solver" template="GraphScattered" iterations="25" tolerance="1e-09" threshold="1e-09" /> <TetrahedronSetTopologyContainer src="@loader" name="Topology Container" fileTopology="mesh/cylinder.msh" /> <TetrahedronSetTopologyModifier name="Topology Modifier" /> <TetrahedronSetTopologyAlgorithms name="Topology Algorithms" template="Vec3d" /> <TetrahedronSetGeometryAlgorithms name="Geometry Algorithms" template="Vec3d" /> <TetrahedronModel name="Models" /> <TetrahedronModel name="FrictionCoeff2" contactFriction="1" /> <MechanicalObject src="@loader" name="Cylinder" template="Vec3d" translation="0 13 0" rotation="90 0 0" scale="12" /> <TetrahedronFEMForceField name="FEM" template="Vec3d" method="polar" poissonRatio="0.3" youngModulus="1500" assembling="0" /> <UniformMass name="Mass" template="Vec3d" totalmass="300" /> <Node name="Visual Model"> <OglModel name="Visual" template="ExtVec3f" color="green" /> <IdentityMapping name="Mapping" template="Vec3d,ExtVec3f" input="@.." output="@Visual" /> </Node> <Node name="Collision Model"> <Mesh name="Cylinder Mesh" filename="mesh/cylinder.obj" /> <MechanicalObject name="Collision" /> <Triangle name="Cube Triangle For Collision" /> <Line name="Cube Edge For Collision" /> <Point name="Cube Point For Collision" /> <IdentityMapping name="RigidMapping Collision-RigidDOF" input="@../Cylinder" output="@Collision" /> </Node> </Node> <Node name="Wire1"> <EulerImplicitSolver name="cg_odesolver" printLog="0" /> <CGLinearSolver name="linear solver" template="GraphScattered" iterations="25" tolerance="1e-09" threshold="1e-09" /> <CylinderGridTopology name="Regular Mesh1" n="5 5 5" axis="0 1 0" radius="0.5" length="12" /> <MechanicalObject name="DOFs" template="Vec3d" translation="-1.45 1 0" rotation="0 0 0" /> <TetrahedronFEMForceField name="FEM1" template="Vec3d" method="polar" poissonRatio="0.1" youngModulus="13000" assembling="0" /> <UniformMass name="Mass1" template="Vec3d" totalmass="1000" /> <BarycentricMapping name="Mapping-fiber1" output="@." input="@../Cylinder" /> <Node name="Visual Model"> <OglModel name="Visual1" template="ExtVec3f" color="blue" /> <IdentityMapping name="Mapping1" template="Vec3d,ExtVec3f" input="@.." output="@Visual1" /> </Node> </Node> <Node name="Wire2"> <EulerImplicitSolver name="cg_odesolver" printLog="0" /> <CGLinearSolver name="linear solver" template="GraphScattered" iterations="25" tolerance="1e-09" threshold="1e-09" /> <CylinderGridTopology name="Regular Mesh2" n="5 5 5" axis="0 1 0" radius="0.5" length="12" /> <MechanicalObject name="DOFs" template="Vec3d" translation="1.45 1 0" rotation="0 0 0" /> <TetrahedronFEMForceField name="FEM2" template="Vec3d" method="polar" poissonRatio="0.1" youngModulus="13000" assembling="0" /> <UniformMass name="Mass2" template="Vec3d" totalmass="1000" /> <BarycentricMapping name="Mapping-fiber2" output="@." input="@../Cylinder" /> <Node name="Visual Model"> <OglModel name="Visual2" template="ExtVec3f" color="blue" /> <IdentityMapping name="Mapping2" template="Vec3d,ExtVec3f" input="@.." output="@Visual2" /> </Node> </Node> </Node>
Hope this helps.
Best regards,Hugo
HugoKeymasterDear @maadi5,
Thank you for your interest in SOFA and welcome to the forum.
Starting with FE simulation is not an easy objective since it requires knowledge in linear algebra, continuum mechanics and computer sciences. However, I would be glad to assist you in any way I can.If you are not used to computer science (“cloning”/”build”/”CMake”), rather use the binary version of SOFA.
To understand how to build a simulation step by step, you can use the example scenes located in examples/Tutorials/StepByStep/ and launch them. We are working on a new Modeler to assist people in building their own scene. We are also planning to create videos to describe how to build such a scene step by step.
Since SOFA is open-source, our development force is limited and our efforts are therefore focused on limited number of topics. But we are well aware of the complexity of handling SOFA when starting with simulation.
Best regards,
Hugo
HugoKeymasterHi Fayad,
What you can actually do is to create yourself an animation : using WriteState. WriteState saves all positions into a file. Once you register the animation, you could replay it using ReadState.
To create rotation/translation/scaling of an object, you can always use the TransformEngine.
Let me know if it helps.
Hugo
HugoKeymasterHi Fayad,
To rotate an object, you need to use a TransformEngine.
Or you can do it manually using python.Regarding the visual model not following, is there a mapping making the correspondence between the mechanical and the visual model ?
Best
Hugo
17 December 2018 at 11:55 in reply to: [SOLVED] How to fix the orientation of the instrument dof? #12607HugoKeymasterOk @outtt
Never forget to let us know about the solution you find to your issues, thus helping all the community!
BestHugo
HugoKeymasterHey @hkomninos
A PR goes in this sense now.
You can have a look to the contribution of epernod: here.Best
Hugo
HugoKeymasterHi @fayad
For the *.off format, you shall use the MeshOffLoader. Even if the off format is not widely used in the community, it should work for what you want to do.
For *.vtk meshes, use the MeshVTKLoader instead.Best,
Hugo
HugoKeymasterHey @nassim
Sorry for the delay of my reply, many things are going on.
In order to keep the muscle within the cylinder, one idea could be to set a collision model on both cylinder/muscle so that they collide together.
To have a motion created from the muscle, your muscle mechanical model could couple a passive constitutive law (e.g. linear elasticity) and an active part. I am no expert in active muscle mechanical model, but I am sure some can be found in the literature. Maybe some forum users might know references. Nassim have you seen any similar work / model ?
Another solution, would be to force displacement (eg with Python controller indeed) thus inducing internal stress and a motion from the muscle.
I will try to give a try asap to your scene.
Best,Hugo
HugoKeymasterAny luck by checking the file @secretdevil ?
Thanks !Hugo
12 December 2018 at 20:39 in reply to: Go from OBJ meshes to to a file containing tetrahedral elements #12579HugoKeymasterDear @fayad
sorry for the delay of the first reply.
The Obj format manages only surface meshes. If you want to handle a volumetric mesh (with volumetric elements, like tetra or hexa, and not only surface element, like triangles or quads), you shall use another format like the VTK format.Best
Hugo
HugoKeymasterHi @hkomninos
The PrecomputedConstraintCorrection computes the exact inverse matrix W=A^-1(t=0) once at the initialization of the simulation. and then uses this same W matrix during the entire computation.
Note that a documentation on constraint resolution is available online.
If it solves your question, please close the topic.
BestHugo
HugoKeymasterHi @afherrerac
Your question is related to a external plugin: the SoftRobot plugin.
Very few people on this forum are knowledgeable on this plugin. I would rather advise to contact the team in charge of the SoftRobot plugin.Best wishes,
Hugo
12 December 2018 at 20:15 in reply to: [SOLVED] How to stabilize the beam model using BeamFEMForceField? #12576HugoKeymasterOk I close this topic.
In case, you have further question on Beam stability, do not hesitate to ask it here.
Or create another thread for any other question.Best
Hugo
HugoKeymasterDear @xiaojuan
I think Antonin’s advice should have helped you.
If this is fine for you we can close the topic.Cheers,
Hugo
HugoKeymasterThanks @hkomninos for your feedback.
Could you please make a pull-request using GitHub to share this change in the public repository of SOFA please?Best
Hugo
12 December 2018 at 20:15 in reply to: How to genuinely increase the friction in a frictionContact scene? #1257323 November 2018 at 22:39 in reply to: [SOLVED] How to stabilize the beam model using BeamFEMForceField? #12532HugoKeymasterHey @xiaojuan
Are you choosing all numerical settings and model parameters on purpose?
Could you especially explain the Poisson ration = 0.9 ?For sure, more stability would be obtained by using a mass that is based on the Beam FEM. The theory for the Beam in SOFA is the Timoshenko beam theory. Here you are using the UniformMass, i.e. the same mass value at each point of your beams which should not be the case. A mass matrix with a correct integration is a tri-diagonal matrix taking into account the section of the beam and the length of it. Unfortunately such a Beam mass does not exist yet in SOFA. I know a branch was working on this here.
Moreover you can find papers on Timoshenko beam theory online. Like here or any other article. We would be really glad to welcome your contribution on this.
Best
Hugo
23 November 2018 at 20:28 in reply to: [SOLVED] Could sofa use full Python instead of being embedded in XML file using component #12531HugoKeymasterAlright, shall we close this topic then?
HugoKeymasterHi @fayad
I tested your scene with the “liver.obj” mesh from SOFA, since you did not share your Prostate mesh. It is actually working.
So, as @mjbarrow suggested, it should be due to an issue of numerical settings / parameters. Have you tested the contactStiffness? the time step might also be decreased ?
Best
Hugo
-
AuthorPosts