Setting link friction parameters (mu and mu2) programatically, preferrably via service call from ROS

asked 2017-07-28 05:46:03 -0600

jokken gravatar image


I am running gazebo7 with ROS Indigo on Ubuntu 14.04. In my simulation, a robot manipulates an object and observes the results to learn the effects of its action. After each iteration, I reset the simulation. However, I would like to vary the friction parameters mu and mu2 of the ground plane and the manipulated object automatically after each iteration.

Can I achieve this using a service call from ROS? This would be my preferred approach.

I have looked at the gazebo_msgs documentation but have not found a message that allows me to do that. SetLinkPropertiesRequest only allows me to change intertial parameters, mass, gravity mode, and the centre of mass.

This question may be related and concerns setting friction torque parameters for wheels programatically. The suggested answer is writing a model plugin. If possible, I would like to avoid that.

I hypothesise that another method would be to delete the ground plane and/or object each time and spawn a new version with modified friction parameters using SpawnModelRequest. That would also be less convenient and (presumably) efficient than just changing parameters.

I would greatly appreciate any guidance or suggestions.


edit retag flag offensive close merge delete