- This topic has 2 replies, 2 voices, and was last updated 3 years, 11 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Using SOFA › Best way to detect and quantify interpenetration
Tagged: 64_bits, collision, Linux_ubuntu, SOFA_other
Dear SOFA Community,
assume we have to collision models (model 1 and model 2) consisting of triangles (model 1) and points (model2).
From observation, I assume that if the force between two colliding objects exceeds a certain value (depending on contactStiffness
in the collision models) the particular collision gets “ignored” resulting in interpenetration of the two surfaces.
There are often still some valid collision contacts between model 1 and model 2, but some of the points of model 2 are “behind” the surface of model 2.
The distance value
of sofa::core::collision::DetectionOutput
stored in sofa::core::collision::ContactListener
yields some negative values up to the point where the collisions are properly “ignored”.
What would be the best way to detect and quantify the amount of interpenetration of two collision models, after they no longer registered in ContactListener
?
Cheers,
Paul
SOFA version: v20.12_beta
Hey @scheikl
As we discussed during our training session, the collision response proposes mainly two approaches:
– the penalty (or penality) approach
– the full constraint resolution using Lagrange multipliers
The contactStiffness defined in any CollisionModel will be used in case of penalty. This stiffness will corresponds to the stiffness of springs, dynamically added during the simulation when a collision occurs.
The ProximityIntersection will use the contact information (collision models, contact alarm and contact distance) to compute the DetectionOutput and this “value” corresponding to the interpenetration.
If I understand correctly you would like to keep the contact info even once the contact is solved ? correct ?
Best
Hugo
Hi @hugo ,
thanks for the follow-up! 🙂
Yes and no.
I would like tho get a measure of how much overlap is between two volumetric meshes.
I guess that should happen outside of the collision pipeline.
For example a small ball inside (at the center) of a large ball would not stand in collision with the larger ball.
So I am looking for something like
>>> std::cout << getOverlap(collisionModelSmallBall, collisionModelLargeBall) << "\n";
1.0
Cheers,
Paul
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.