Joints have unstable collision response

Post Reply
dudosee
Posts: 8
Joined: Mon Jul 16, 2018 1:11 pm

Joints have unstable collision response

Post by dudosee » Thu Aug 09, 2018 2:23 pm

I have two boxes which are glued together via Fixed Constraint (gray) (basically the same thing happens with Hinge Constraint) and another single box with size and mass of this two other boxes combined (blue).

Here is how they react to collision with floor:

100 Hz:
Image

2000 Hz:

Image

So this begs the question, am I doing something wrong? Should I tweak something in a simulation? Should I not use such a high frequency for my simulation?

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

Re: Joints have unstable collision response

Post by drleviathan » Thu Aug 09, 2018 3:17 pm

The correct solution is the last option you suggest: don't take such small substeps. There have been other posts about this bug but I haven't heard of anyone tracking it down yet.

If you really need such small steps but aren't doing a real-time simulation then it would be possible to scale the dimensions, mass, time, and other properties to effectively get the physics you want without tickling that bug.

Meanwhile, I wonder: why would you use a fixed constraint between two bodies when you could just use a single btyRigidBody with a btCompoundShape that has two subshapes?

dudosee
Posts: 8
Joined: Mon Jul 16, 2018 1:11 pm

Re: Joints have unstable collision response

Post by dudosee » Thu Aug 09, 2018 7:33 pm

No, this is not the actual use case, I just wanted to boil this problem down to its simplest version. I have a model of a human, that use all kinds of joints and each and every one of them have this problem. What I'm trying to do is I'm trying to implement inverse dynamic via PD controls and Finite state machine, basically to make human walk in physics simulation. It's actually nearly impossible to do with less than ~500 Hz, with more robust results being at frequency between 2000 and 20000 Hz. Thanks for your help, I'll try to scale my simulation, although its seems to be very unsettling thing to do.

Post Reply