Circles rolling forever

Is there a way to make circles stop rolling on the x-axis while they are over a flat horizontal ground?

Thanks.
I think that is why there is a "rolling resistance" feature on the TODO list. Damping should take care of it though. I haven't messed around with gravity environments much, but I would think a little angular damping would even do it.
Oh, I didn't see the TODO list. (In fact I didn't even find it).
Shame on me.
Just change the angular momentum to 0.
Sorry if the TODO list comment came off as sarcastic, I'm not sure if it did, but it wasn't meant to be in any case. Yeah it's a little hard to find because it's only in the SVN. I put a link to it in the Unofficial FAQ sticky post in the General forum. I'm not really sure what the difference between a little angular damping and simulation of rolling resistance would be, but I would think damping should take care of most situations. As k2xl said, you could completely zero out the angular momentum if you needed circles to stop rolling at particular moment.
Hey, it didn't came off as sarcastic at all!
I really didn't know about the TODO list, but I'm glad you posted a link to it.
I'm kind of new to Box2D, so I need to study deeper. Thanks.
Re: difference between damping and rolling resistance:

Angular damping multiplies the angular velocity by a factor slightly below 1 every frame, so regardless of what is touching the object or acting on it, it always slows down by the same fractional amount. Rolling resistance is a torque proportional to the sum of the absolute values of the normal forces acting on an object, so for instance, a wheel rolling with a heavy object on top of it will slow down more than a wheel rolling unencumbered. This is closer to what happens in real life, but you're quite right, usually some angular damping will do the trick just fine.
So true rolling resistance is actually quite easy to add into box2d, then? I'd always assumed it would require some modification of the engine. And do we sum the normal forces, or do we sum the normal forces dotted with their distance from the COM?
Yes, rolling resistance should be very simple to add as an external torque; if Erin adds it internally it will be more stable, but from the outside you can certainly do it, and as long as you keep the amount of friction to a reasonable value you should be fine. It's always better to add stuff like this at the engine level, though - there's a reason the engine itself applies sliding friction internally instead of as an external force.

As for the specifics of the frictional force, I'll have to get back to you, I have to think about the various microscopic causes and I don't have much time right now. You might try Googling it, though, I remember seeing an article with a pretty good explanation. I'm pretty sure the torque should involve the distance to CM, you might try it both ways and see how it looks. The important quantity is the total amount of force pressing in on the body.

FWIW, it might be more clean to model this friction as an additional term at each point of contact on a circle, as that's really where the force comes from.
I would implement rolling resistance by trying to constrain the relative angular velocity to zero with some maximum torque, dependent on the normal force. Perhaps, it should only be used for circle-vs-something.

Original thread: https://box2d.org/forum/viewtopic.php?t=452