Home › Forum › SOFA › Programming with SOFA › Collision response between two objects
Tagged: 64_bits, collision detection, Linux_ubuntu, SOFA_1806
- This topic has 3 replies, 3 voices, and was last updated 6 years ago by Hugo.
-
AuthorPosts
-
21 November 2018 at 13:45 #12506shangBlocked
hi,all
I am wondering what is the method for simulation and calculation of the collision response force between the two objects in sofa. Actually,I want to know how to control and set the friction and bounce force between the two collision object. Could someone know how to deal with this or where is the source code of the related component? Thank you!23 November 2018 at 13:56 #12528Ant0ninBlockedHi @xiaojuan,
In SOFA, the component/class which describes the collision pipeline and how the contacts are handled is DefaultPipeline (alias CollisionPipeline). As it is visible in its init() method, the pipeline is very modular and needs additionnal components to be configured:
1 – A component like LocalMinDistance which describes the intersection method
2 – A component like BruteForceDetection which describes the broad phase collision detection
3 – A component which describe the narrow phase collision detection (it could be BruteForceDetection again because this one inherits from both classes BroadPhaseDetection and NarrowPhaseDetection)
4 – A contact manager component like DefaultContactManager (alias CollisionResponse). If you use FreeMotionAnimationLoop instead of DefaultAnimationLoop, the contact manager will construct a set of constraints which constitute the collision response. These constraints are solved thanks to a solver like GenericConstraintSolver then correction forces are applied (through a component like UncoupledConstraintCorrection) to avoid interpenetration between the 2 physical objects ( More information in the documentation: https://www.sofa-framework.org/community/doc/main-principles/constraints/lagrange-constraint/ ).
One important configuration parameter of the contact manager is its attribute ‘response’. The latter describe the constraint system (or complementarity problem) you want to construct when a collision is detected between 2 objects. In the case you want to handle friction, you’ll have to specify a ‘response’ like ‘FrictionContact’. It is also possible to add response-specific parameters like the friction coefficient ‘mu’ using the attribute ‘responseParams’. In case of deformable objects, the bounce force is not explicitly configurable because actually it depends of the elastic properties (Young modulus and Poisson ratio) of the 2 objects.5 – Eventually a collision group manager. When several objects are within the same group, they cannot collide each other.
Hope it helps.
23 November 2018 at 15:06 #12529shangBlockedThank you Ant0nin,
It is explained in detail very much!
I will find out the configuration of friction for my scene.12 December 2018 at 20:15 #12575 -
AuthorPosts
- You must be logged in to reply to this topic.