Ball rolls forever; how to stop it?

I spawn a ball(sphere) in gazebo and apply a force along the x-axis, and I also set the friction for it, i.e. <mu>0.5</mu>, etc. But the ball rolls forever and never stops. What is the problem and how I should fix this problem?

Any help would be greatly appreciated.

Update: I use ODE as the physics engine. Is it because ODE does not support rolling friction? Nate suggested adding linear damping to it but I don't want it to slow down when the ball is kicked into the air. Any better solution?

edit retag close merge delete

ODE does not support rolling friction right now. This could be added similar to torsional friction (see https://bitbucket.org/osrf/gazebo/pull-requests/1831/torsional-friction/diff), but with 2 major differences: 1) constraint direction parallel to object's rotational axis projected to a plane normal to the contact normal. 2) rolling friction coefficient definition.

( 2016-05-11 13:17:49 -0500 )edit

because rolling friction is usually not a very large force, the need to implement it as a constraint is not high. Nate's suggestion as a plugin and apply a force based on object's current dynamics may be sufficient.

( 2016-05-11 13:21:35 -0500 )edit

Sort by ยป oldest newest most voted

You can add linear damping to the sphere.

more

Thank you. I tried it before but this is not perfect because linear damping always works even when the ball is in the air. I want the ball to stop quickly when it is rolling on the ground due to ground fiction. But when the ball is kicked into the air, the air resistance is so small that I don't want the ball to use linear damping. Any suggestions?

( 2016-05-10 20:33:43 -0500 )edit

I use ODE as the physics engine. Is it because ODE does not support rolling friction?

( 2016-05-10 20:40:20 -0500 )edit

Yes, friction will not apply a force to the ball to make it stop rolling. You could write a plugin to achieve this behavior, or add transparent box that applies a damping force to objects that pass through it. This [world](https://bitbucket.org/osrf/gazebo/src/32bce6f11449084251903d4d3377bdf8aff8201a/worlds/mud.world?at=default&fileviewer=file-view-default) is a good example.

( 2016-05-11 13:12:17 -0500 )edit

I am sorry but I don't understand what you mean by " add transparent box that applies a damping force to objects that pass through it". I don't want the ball to pass through anything. Anyway, writing a model plugin is a workaround.

( 2016-05-12 03:41:35 -0500 )edit