Forum Replies Created
-
AuthorPosts
-
HugoKeymaster
OK @pasquale94
Let us know when you get back to physics simulation. We will be there fore you.Hugo
HugoKeymasterDear @twxu I think I replied to you in the other thread where you had the similar question.
Dear @antonio-8196 you can either:
– download the binaries of SOFA+SoftRobot– or download+compile SOFA and then download+compile SoftRobot.Hugo
HugoKeymasterHi @jjcasmar
Thank you for your question.
I see you are doing things in a similar way than what was developed in the Flexible plugin.You perfectly understood the definition of
addForce
andaddDForce
.I am just not sure to see how your scene is created. Could you please describe it (including your mapping)?
Hugo
HugoKeymasterDear @twxu
Interesting, I do not know in detail the SoftRobot tutorial. But I think I can already guide you a bit.
1. since you are using a mesh for the cavity which not fitting the mechanical mesh anymore (no exact correspondence between mesh vertices), the mapping will compute the associated points in the finger mesh around each point of the cavity mesh (and their barycentric coordinates). If the finger mesh is oriented (by this, I mean tetrahedra are all oriented in the same direction) then you can have a slight twisting effect due to the pressure constraint mapped into these oriented tets. To decrease this effect, you should use a finer mesh or a non-oriented mesh (for the finger).
2. This, I guess, could be due to the dissipative integration scheme. Especially the Rayleigh damping added. Could you try setting them to zero ?
Best
Hugo
HugoKeymasterAlright @cesar-vargas ! My bad I did not get your point.
Most of it looks correct, just for the OglColorMap I would rather write:
bed_data_OglColorMap->f_colorScheme.setValue("Red to Blue");
Else :+1:
Best
Hugo
HugoKeymasterHi @shan
Thank you for your question and welcome on the SOFA forum.
I think you could apply a PartialFixedConstraint (defining in which direction you would like to restrict the motion) in your cylinder node.Best
Hugo
HugoKeymasterHi @momo2000
Thanks for the feedback.
If you have some improvements you would like to share do not hesitate to make a pull-request on our GitHub.Thanks again. Best wishes,
Hugo
HugoKeymasterHugoKeymasterHi @secretdevil
Sorry I did not reply to your comment.
I always advise to use default 0 Rayleigh parameters in order to make sure of what you are actually simulating (physical parameters and numerical settings).Subsequently adding damping will change the physical behavior by damping your system, thus making it more stable (because more robust to sudden changes). But it means you are not working with the same modeling assumption anymore.
Best
Hugo
HugoKeymasterCool ! Any change in SOFA needed?
HugoKeymasterI do not know this gamepad especially but I am sure you can find guidance on Logitech forum for driver creation. Let us know about your progress.
Best
Hugo
HugoKeymasterI guess you are having an error right? runtime or compilation one?
Could you share it with us please?Best
Hugo
HugoKeymasterHi @wzdy4444
@fleonard and his team in Montreal are actually pretty active on continuous collision detection. Could you tell us more Francois about your work and progresses?For building your unit test (which are also most welcome in SOFA!), you can take a look at the Collision online doc. I hope this helps.
Best wishes,
Hugo
5 October 2020 at 22:30 in reply to: Question about Neo-Hookean Strain Energy function implemented in Sofa. #17283HugoKeymasterHi @pasquale94
Let me poke @jnbrunet expert of the point 🙂
Could you please take a look Jean Nicolas?Best wishes,
Hugo
HugoKeymasterDear @twxu
Thank you for your message.
The nodes of the cavity do not have to be aligned with the surrounding pneunet. The fact is that a correspondance will be sought for each node of the cavity with regards to the surrounding element (here, sought in the surrounding tetrahedron in the pneunet mesh).If your configuration 1. not working properly?
If not, could you elaborate on the issue?Thanks, best,
Hugo
HugoKeymasterthanks @sukhraj for the feedback
This is an error in Refine2DMesh which I reported in a previous SOFA dev meeting. It occurrs with the latest (>=5.0) version of CGAL. I created an issue on this topic here.
Do not hesitate to poke the dev in charge of this topic. (I just did it few minutes ago)
Best,Hugo
HugoKeymaster5 October 2020 at 22:09 in reply to: Need Help With the Rigidify function from stlib.physics.mixedmaterial #17278HugoKeymasterHi @momo2000
Have you taken a look at the comment on the function:
def Rigidify(targetObject, sourceObject, groupIndices, frames=None, name=None, frameOrientation=None): """ Transform a deformable object into a mixed one containing both rigid and deformable parts. :param targetObject: parent node where to attach the final object. :param sourceObject: node containing the deformable object. The object should be following the ElasticMaterialObject template. :param list groupIndices: array of array indices to rigidify. The length of the array should be equal to the number of rigid component. :param list frames: array of frames. The length of the array should be equal to the number of rigid component. The orientation are given in eulerAngles (in degree) by passing three values or using a quaternion by passing four values. [[rx,ry,rz], [qx,qy,qz,w]] User can also specify the position of the frame by passing six values (position and orientation in degree) or seven values (position and quaternion). [[x,y,z,rx,ry,rz], [x,y,z,qx,qy,qz,w]] If the position is not specified, the position of the rigids will be the barycenter of the region to rigidify. :param str name: specify the name of the Rigidified object, is none provided use the name of the SOurceObject. """
Rigidification is a numerical technique defining one or several rigid frames in your deformable object, in order to make your object locally more rigid. You can also find an example in SOFA: examples/Components/animationloop/MechanicalMatrixMapper.pyscn
The field frame should therefore contain the quaternions corresponding to the rigid frames while the group of indices are the indices of your deformable model impacted by these frames, the “rigidified” nodes.
I hope this helps.
BestHugo
HugoKeymasterHi @wzdy4444
I really apologize for the delay of my reply.
I am sorry I am not sure to get your first question.In your case, if you are only looking for inducing forces by your compressed actuator, a solution could indeed be to define different position (the deformed configuration) and rest_position (undeformed). The actuator material should thus induce forces on your object so that the actuator recovers its rest shape.
In general, saving the whole mechanical state and restart from a deformed state is not that simple in SOFA. Especially because several vectors/matrices/tensors are saved in C++ components, but not exposed.
Best
Hugo
HugoKeymasterHi @yupeng
Since your point is quite precise for collision detection I needed to get back to other devs for info.
A team that I know working on needle insertion developed some homemade code. But the principle should be close to what is in the open version of SOFA:
– they use a regular DiscreteIntersection
– they use TetrahedronCollisionModel to compute the collision points
– they recover the proximity pairs in the constraint pipeline (function processGeometricalData) to build the sliding constraintYou can also get additional info in the following paper (developers based their work on it): Interactive Simulation of Flexible Needle Insertions Based on Constraint Models
I hope this will help.
Best wishes,Hugo
5 October 2020 at 21:38 in reply to: Unable to assign rest_position to MO in SofaPython3 plugin in Debug mode #17275HugoKeymasterHi @jjcasmar
Have you tried to define a value of your dof in the MechanicalObject (field position)?
It should initialize the rest_position field.Best
Hugo
HugoKeymasterHugoKeymasterhi @dst03251
sorry for the delay. I tested it as well and got an error as well. These tutorials are not much used anymore. I will take some time to fix it.
Could you tell us more what you are aiming at modeling with SOFA? Do you want to create your own executable project?Hugo
HugoKeymasterHi @amackeith !
Sorry for my latency.
In general, capture collision when objects are moving quickly (large displacement from one time step to another) can be complex. Such a collision detection requires a appropriate/small time step to be properly captured or an alternative can be to use larger alarmDistance (distance starting from which the objects are detected close but not in contact, ie no force applied) and the contactDistance (distance below which a force is applied).In your simulation, you are using Penalty method (see “default” in response) as a collision response. It is particularly sensitive and can easily get unstable. The force applied below the contactDistance is actually proportional to the interpenetration distance (using the contactStiffness) but does not take into account the physics of your objects.
You can notice such “unstable” behavior, despite increasing alarmDistance=4 and contactDistance=1.I get a relative stable behavior by using:
– contactStiffness=”3000″ for the Arm
– massDensity=”0.1″ and contactStiffness=”100″ for the BodyStabler approach relies on Lagrange multipliers, since they would solve the collision as constraints, taking into account the physics of each objects. In this case, there is no need to define (a bit randomly) and use contactStiffnesses.
I hope this helps.
Best,Hugo
HugoKeymasterWelcome to SOFA! We are glad having you in the community.
A good introduction to SOFA regarding XML would be to take a look at the examples (see examples/Components and examples/Tutorials in SOFA).
You can also find useful information to start with SOFA:
- follow the online documentation
- watch our first Tutorials on YouTube
- read a reference paper about SOFA
- browse the SOFA API
Note that we are also proposing training sessions for an efficient introduction to SOFA.
Best
Hugo
-
AuthorPosts