Home | Tutorials | Wiki | Issues
Ask Your Question

Setting friction params

asked 2017-06-01 06:39:50 -0500

SorinV gravatar image

updated 2017-06-02 02:47:17 -0500

Ok guys, is any of you open to explain this in a simplified matter, or on a specific example? We all usually need friction for wheels; so If you have a wheel, turning on the x direction. You would want to have friction on the x direction. and on the y also so the wheel does not slip on the sides. So mu = mu2. But if you want to model an omniwheel, you would like the y direction to have no friction, so the wheel can actually slip that side. So you set up the mu2 = 0 In case your wheel is not oriented on the specified axes you can change the direction with fdir1.

I keep on seing people advising friction of 100 or some other values that are not comprised in the 0..1 interval specified by the sdf documentation. What is the catch with that?

I played around with the friction, but apparently for the same settings, my wheels react differently from a run to another.

I try to simulate a 3 omniwheeled robot base. And I've just come to realise there is no friction in the sdf code generated for gazebo from the xacro file written.

code URDF:

        <fdir1>0 1.0 0</fdir1>

generated code SDF with gw sdf -p:


A part of my question can be also found here, but nobody actually answered that part.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-06-22 09:42:12 -0500

SorinV gravatar image

updated 2017-07-05 06:20:46 -0500

Very important: fdir = direction of mu1 in the collision local reference frame

SO i was setting the friction all wrong because i have some wheels that are not all oriented on the same angle so i was calculating a different fdir for each one when there was no need because the reference is local so all you need is either x or y of the fdir to be set to 1 depending on how you build the wheels. I bypassed the generation issue by modifying and loading directly the sdf file using gazebo_ros/spawn_model:

<arg name="robot_xdf_description" default="$(find MY_PACKAGE)/urdf/robot.sdf" />
<node name="sdf_spawner_1" pkg="gazebo_ros" type="spawn_model"
            args="-z 1.0 
            -model robot1 
            -file $(arg robot_xdf_description) 
            -robot_namespace /robot1" 
            respawn="false" output="screen" />

EDIT On a second thought i realised the frame is not the local one (see this issue), but the fdir does not work in the global frame.

EDIT2 Indeed I was right. The fidir still does not work for all the cases. See here.

edit flag offensive delete link more


At least according to the Bitbucket issue (https://bitbucket.org/osrf/gazebo/issues/2068/directional-friction-still-broken), the issue is resolved as of 2017/09/11.

josephcoombe gravatar imagejosephcoombe ( 2018-09-12 09:17:56 -0500 )edit
Login/Signup to Answer

Question Tools



Asked: 2017-06-01 06:39:50 -0500

Seen: 1,681 times

Last updated: Jul 05 '17