Impulse accumulation issue

Please don't post Bullet support questions here, use the above forums instead.
Post Reply
lgchemer
Posts: 5
Joined: Fri Jan 20, 2012 11:28 pm
Location: Urbana, IL

Impulse accumulation issue

Post by lgchemer »

Hello.
I have a quick question on a simple contact simulation using the impulse based simulation method for rigid bodies (using the sequential impulse method).
This may look like a soft contact, but I don't expect any robust or accurate result on the deformation, but just would like to see if the correct impulse could be calculated.

For example, I'd like to simulate a very simple yet interesting problem as follows:
There are two cubic boxes vertically stacked on the ground ('T'op one and 'B'ottom one as shown below):
__
|T|
----
|B|
----------- Ground

After stacked them, a compression test is performed by moving down the 'T' box by a "constant" vertical velocity, say 1mm/min.
This implies the change of the relative velocity between the boxes will be kept constant throughout the simulation (because they are in contact).
At the beginning of each time step, the vertical velocity of 'T' and 'B' will be the same as 1mm/min (after some simulation time has elapsed with a full contact between them), but the first contact resolution between 'B' and Ground will make the the velocity of 'B' to ~0, so the relative collision velocity between 'T' and 'B' will be ~1mm/min, which will generate an impulse (to make the velocity of 'B' to 1mm/min again), to wit,
Impulse (calculated at every time step) = collision mass x (change of the relative velocity)

Therefore, an exactly same amount of Impulse will be accumulated at every time step, and the total (accumulated) impulse at contact points will linearly increase.

However, I recently found a sequential impulse solver (such as BOX2D, and also in Bullet Erin Catto had implemented for) doesn't give a consistent impulse value, which looks depending on the time step size chosen.

First, I choose a time step, say 1/1000 sec.
For every time step, the code calculates the impulse at frequency of 1000, and will accumulate the impulse at the contact points as such.

For another simulation, I chose a time step, 10 times larger than 1/1000 sec, i.e., 1/100 sec.
In this case, the code will accumulate the impulse much slower (by 1/10), the total (accumulated) impulse will be smaller than the first simulation after a same time elapsed.

For those simulations, the impulse calculated at each time step is the same, but the total impulse accumulated will be simply different due to the sampling rate.

I know this question might be absurd, but just wonder if this is inherent limitation, or if there is any solution for a reasonably correct value independent of time step chosen.

Thanks much ahead!!
Post Reply