Home › Forum › SOFA › Using SOFA › How to specify multiple friction coefficients?
Tagged: contact, friction, Linux_ubuntu, SOFA_1906
- This topic has 3 replies, 2 voices, and was last updated 3 years, 7 months ago by Hugo.
-
AuthorPosts
-
14 April 2021 at 03:13 #19161billBlocked
Say for example you have two cubes sliding down a ramp. I would like one to be frictionless and the other to have a specified mu.
I have tried using friction response in a RuleBasedContactManager such as:
applyTo.createObject('RuleBasedContactManager', responseParams="mu="+str(frictionCoef), name='Response', response='FrictionContact')
but this applies the friction coefficient globally to all objects. I have also tried using the contactFriction flag of a collision model, but this seems to do nothing.
Edit:
I see using the compliant plugin I can specify the frictionCoefficientMixingMethod which is exactly what I want. However, I would like to use this alongside a FreeMotionAnimationLoop and a GenericConstraintSolver and am stuck as to how to piece this together. (Because the FrictionCompliantContact needs a CompliantImplicitSolver and a SequentialSolver no?)
16 April 2021 at 00:14 #19192HugoKeymasterHi @bill757
Interesting point. For now, the SOFA API only allows for frictional contact to use one homogeneous friction coefficient for all object. It’s in on our radar to allow for heterogeneous friction. We could see together how to implement this.
Best,
Hugo
16 April 2021 at 04:33 #19194billBlockedThanks for the reply!
Could you provide an alternative way to simulate the following scenario, in that case?
Essentially I want to have an object on top of a moving platform and I was planning on using friction to hold it in place (but don’t want to have to increase friction for the rest of the scene)
The object shouldn’t be fixed to the moving platform because it will picked up by an external gripper at a later point. Is there a detachable-like constraint for this?
Also, I would like to directly control the velocity of the moving platform. I have tried LinearMovementConstraints for this, but is there an alternative way I can directly set the velocity without having to plan out a trajectory first?
7 May 2021 at 10:44 #19392HugoKeymasterHi @bill757
Modeling a object stable on the surface (due to a high friction) and with the same coefficient you should be able to grasp it.
You can have a look at the example : FrictionContact.scn
Using python, you should be able to control (change) the position/velocity of the platform by accessing the position/velocity data field of the rigid point (I guess the platform is a rigid object).
Best,
Hugo
-
AuthorPosts
- You must be logged in to reply to this topic.