How to implement static friction?

eweitnauer
Posts: 7
Joined: Tue Jul 14, 2009 11:37 am

How to implement static friction?

Post by eweitnauer »

Hello,
I am using the bullet library for the physics simulations in my thesis. I am planning to do some statistics about the influence of the parameters on the result of a simple pushing action[1]. I just began to work with bullet quite recently and I came accross two questions now:

1) I want to test how big the difference between using a static and dynamic friction model vs. using only one kind of friction is.
How can I implement static friction in the current Bullet release?

2) To test the influence of parameters, I would need to make a list of parameters and a qualitative description of their meaning first.
Is there already a list of simulation parameters (friction, restitution, gravity, sim. step size, damping, ...) and a discription of their qualitative / quantitative influence on simulation results?

Cheers, Erik.

[1] The test scenario will be: An polygon with a small height lying flat on a surface gets pushed by a kinematic object (a cylinder) the moves in a straight line. I am going to record the end position & rotation of the polygon.
eweitnauer
Posts: 7
Joined: Tue Jul 14, 2009 11:37 am

Re: How to implement static friction?

Post by eweitnauer »

Can anyone answer the question?
bradclancy
Posts: 7
Joined: Thu Jun 25, 2009 4:32 am

Re: How to implement static friction?

Post by bradclancy »

Hey Eweitnauer,

I've implemented this for my usage of bullet, though it is a hack and really just acts as a switch between a static value and a dynamic value. There are other issues as well, a box for example will get 3/4 contacts on the surface it is on and each one may exhibit slightly different reactions to the static friction so that once they start moving the object has some rotational motion. (But I think that is a different issue :))

[I change code in the CombineFriction function in btManifoldResult.cpp]
Essentially, if the two colliding objects are not moving (relative to the contact) then I return the combination of the static frictions. Otherwise, return the combination of the dynamic frictions.

If anyone else has a more robust implementation I'd love to hear it :)

Cheers,
Brad
eweitnauer
Posts: 7
Joined: Tue Jul 14, 2009 11:37 am

Re: How to implement static friction?

Post by eweitnauer »

Thanks for the info Brad, I will try that! I will post the results here later.