Robotics StackExchange | Archived questions

where to specify friction?

I see several examples (such as test_friction.world ) that specify mu/mu2/slip1/slip2 in the link/collision/surface/friction/ode namespace.

I also see some examples (such as this one ) that specify mu1/mu2/slip1/slip2 in the namespace.

Aside from the mu vs mu1 question, which one is correct? Or are they two ways of the same thing?

Asked by knickels on 2020-08-21 14:47:05 UTC

Comments

Answers

They are the same, but neither of them is guaranteed to actually be applied to your model (personal experience). I cannot pinpoint when the set parameters are being used and when are not. Use whatever makes more sense in your usecase. Either you have a robot/model description on a separate location from your world (perhaps you use it in multiple worlds) then you want to specify the friction inside this description (the tags), or you only specify this model in the specific world description. In that case go ahead and define the friction in there.

In case the surface friction set in the SDF description does not apply (you check the value inside the gazebo client, for example, and it is not what you set), you will need to set the friction in some gazebo plugin.

model->GetLink(link_name)->GetCollision(_index)->GetSurface()->FrictionPyramid()->SetMuPrimary(mu);

Asked by kumpakri on 2020-08-24 04:58:52 UTC

Comments