Repository navigation
Rest shape springs force field : how to define the stiffness ? #2977
Replies: 2 comments 17 replies
|
Hi @jducrocq007 Could you give us a bit more context regarding the use of the RestShapeSpringsForceField? RestShapeSpringsForceField is a forcefield applying forces resulting from the variation of position with regards to the rest positions: |
|
Okay, so here is a simplified version of the scene. I go to the final pose in 1,000 steps and I found out that setting 'stiffness = 1000' gave the best behavior to my simulation, but it's completely empirical. I would like to know how to compute this value precisely. Thank you very much for everything. Best, ` ` |
Hi @jducrocq007
No worries, even though I'm not a SOFA expert, I'm glad the code I shared can help.
You are right, the
positiondata of a MechanicalObject with template Rigid3d is a position + a quaternion, under the form[x y z qx qy qz qw]. If you use the GUI to visualize your MechanicalObject (or set the datashowObject='1'in object definition, like in the example script), you will see a tiny RGB frame which depicts the position and orientation of the rigid body.With values
[0 0 0 0 0 0 1], your object has null translation and null rotation wrt. world frame. If you press A to show the world frame of SOFA, you will see that it coincides with your rigid body. Try[0 0 0 0.707 0 0 0.707]…