Restitution dependend on timestep

Post Reply
thantalos
Posts: 2
Joined: Fri Sep 01, 2017 9:33 am

Restitution dependend on timestep

Post by thantalos » Fri Sep 01, 2017 10:01 am

Hello guys!

I've been experimenting with bullet and came across a problem I can't explain it and I can't find any information on the problem.
My setup is as simple as possible: a small box and a small ball falling on a fixed large box. Restitution values for all objects are 1.
Image
Everything seems fine when I run the simulation slower than 500Hz (stepSize > 0.002). If I go above 500Hz, the ball suddenly doesn't work correctly any longer. It seems to loose energy, while the box is still behaving correctly.
Image
Sphere z-Position at 400Hz (blue) and 500Hz (red)
Image

Deactivating split impulse adds energy to the system as expected, independent of step size.
Friction parameters have no effect.
Number of iterations has no effect.
Changes to any ERP parameters have no effect.
It seems to be solely dependent on the real step size, using subSteps doesn't change the behavior ("real step size" = fixedStepSize/numSubSteps).

Shouldn't the simulation be more accurate at higher frequencies?

If there is any additional information I can give you please let me know.

Cheers!

User avatar
drleviathan
Posts: 405
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: Restitution dependend on timestep

Post by drleviathan » Sat Sep 02, 2017 4:48 pm

I think someone else noticed this problem a while ago and as I recall: you need enable double precision floats when using very small timesteps.

thantalos
Posts: 2
Joined: Fri Sep 01, 2017 9:33 am

Re: Restitution dependend on timestep

Post by thantalos » Tue Sep 05, 2017 7:36 am

Thank you but I am already using double precision. In any case I can't imagine that the values dealt with here get so small that numerical precision errors cause such a big deviation. And why would that only affect the ball and not also the much more unstable (in theory) box?

User avatar
drleviathan
Posts: 405
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: Restitution dependend on timestep

Post by drleviathan » Tue Sep 05, 2017 4:22 pm

I searched and found the old thread about this problem:

I misremembered the double precision relevance. It was mentioned but it was the same case as here: already being used.

It is a real bug with a reliable repro recipe.

kangd
Posts: 9
Joined: Tue Oct 24, 2017 11:51 am

Re: Restitution dependend on timestep

Post by kangd » Sat May 12, 2018 1:11 pm

Hello,

I've experienced same issue on Bullet recent version (2.88)

Is there any advanced yet?

Post Reply