0
$\begingroup$

Gazebo Answers logo

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. 0.5, 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?


Originally posted by winston on Gazebo Answers with karma: 449 on 2016-05-07

Post score: 1


Original comments

Comment by hsu on 2016-05-11:
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.

Comment by hsu on 2016-05-11:
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.

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

You can add linear damping to the sphere.


Originally posted by nkoenig with karma: 7676 on 2016-05-10

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by winston on 2016-05-10:
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?

Comment by winston on 2016-05-10:
I use ODE as the physics engine. Is it because ODE does not support rolling friction?

Comment by nkoenig on 2016-05-11:
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 is a good example.

Comment by winston on 2016-05-12:
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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.