Tutorials/1.9/friction

Each physics engine in Gazebo (for example ODE, Bullet, Simbody, DART) has different friction models. Please refer to the [SDF parameters](http://gazebosim.org/sdf/1.4.html#friction159) for a complete listing of available friction parameters.

The rest of this tutorial will assume you are using ODE, the default physics engine.


 * 1) How friction works

When two object collide, such as a ball rolling on a plane, a friction term is generated. In ODE this is composed of two parts, mu and mu2, where:

1. mu is the Coulomb friction coefficient for the first friction direction, and 1. mu2 is the friction coefficient for the second friction direction (perpendicular to the first friction direction).

ODE will automatically compute the first and second friction directions for us. Note, you can manually specify the [first friction direction in SDF](http://gazebosim.org/sdf/1.4.html#friction159), but this capability is out of the scope of this tutorial.

The two objects in collision each specify mu and mu2. Gazebo will choose the smallest mu and mu2 from the two colliding objects.

The valid range of values for mu and mu2 is between 0 and 1, where 0 equates to a friction-less contact and 1 a surface with infinite friction.


 * 1) How to specify friction

It's always best to refer to the [SDF documentation](http://gazebosim.org/sdf/1.4.html#friction159).

The following example will specify a box with low friction:

0 0 0.5 0 0 0          1 1 1               0.01 0.01          1 1 1

This is a more exhaustive [example](https://bitbucket.org/osrf/gazebo/src/3bd08807f5d9997e9d51eed9276350bac523c4bf/sdf/worlds/test_friction.world?at=default).