Gazebo | Ignition | Community
Ask Your Question
0

Update friction during runtime

asked 2022-06-26 12:05:05 -0600

kakcalu13 gravatar image

Do you know if it is possible to update friction like mu, mu2, or something under <ode> through commands?

I doubt it exists but it won't hurt to ask anyway

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-07-05 16:45:49 -0600

peci1 gravatar image

Hi, there's not exactly a command, but the API is there. You can find it in the TrackController system. Some more related discussion is in the Pull request adding track controller.

Basically, you will need to enable contact surface customization for all the collisions you want to alter (by setting the EnableContactSurfaceCustomization component of the collisions). Then you will need to subscribe to event CollectContactSurfaceProperties which passes you the contact object created and pre-filled by the physics engine and you can alter it in any way you like before passing it back to the physics engine.

AFAIK this workflow is currently only supported with DART.

If you're only trying to implement wheel slip, have a look at the WheelSlip system, which comes even with an Ign service you can call from command line to change the slip parameters.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-06-26 12:05:05 -0600

Seen: 121 times

Last updated: Jul 05 '22