Home | Tutorials | Wiki | Issues
Ask Your Question
1

Ball rolls forever; how to stop it?

asked 2016-05-07 22:15:30 -0600

winston gravatar image

updated 2016-05-10 20:38:05 -0600

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 flag offensive close merge delete

Comments

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.

hsu gravatar imagehsu ( 2016-05-11 13:17:49 -0600 )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.

hsu gravatar imagehsu ( 2016-05-11 13:21:35 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-05-10 11:24:27 -0600

nkoenig gravatar image

You can add linear damping to the sphere.

edit flag offensive delete link more

Comments

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?

winston gravatar imagewinston ( 2016-05-10 20:33:43 -0600 )edit

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

winston gravatar imagewinston ( 2016-05-10 20:40:20 -0600 )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.

nkoenig gravatar imagenkoenig ( 2016-05-11 13:12:17 -0600 )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.

winston gravatar imagewinston ( 2016-05-12 03:41:35 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-05-07 22:15:30 -0600

Seen: 678 times

Last updated: May 10 '16