Chinamming / bullet

Automatically exported from code.google.com/p/bullet
Other
0 stars 0 forks source link

possible collision response bug with internal edges and spheres #706

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Video of bug: http://www.youtube.com/watch?v=71jd0g6PsdE

The video demonstrates a sphere falling from Y=2.5 to hit a single triangle 
mesh shape that contains two triangles with normals pointing in the positive Y 
direction. The sphere is positioned such that it falls on the internal edge 
with a slight deviation (sphere position = 0.71, 2.5, -0.8). The ball has no 
initial velocity.

The expected result is that the sphere gains no x or z velocity. If the sphere 
lands on a static btBoxShape, the correct behavior is observed.

The video then goes on to show more test cases around the internal edge. Some 
collision responses are more severe depending on where the ball lands.

The InternalEdge utility is being used and reports that it is in fact 
correcting the normal (m_normalWorldOnB = 0, 1, 0)

I have made a test project that demonstrates the problem: 
https://github.com/jazztickets/btest
Just clone the project and run cmake, or grab main.cpp and put it in your own 
testbed.

I tried debugging the problem and it appears that the x or z velocity is coming 
from a friction constraint. I don't know much about the internal workings of 
bullet, but if it helps its around line 1374 in 
btSequentialImpulseConstraintSolver.cpp.

The only thing that solves the problem is using a timestep of greater than 150 
hz. A smaller timestep is needed for higher falls.

More info: http://www.bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=8113

BulletVersion: 2.81
Windows and Linux

Original issue reported on code.google.com by alan.wit...@gmail.com on 6 Apr 2013 at 5:19

GoogleCodeExporter commented 9 years ago
Attached a blender demo file with the same parameters

Original comment by alan.wit...@gmail.com on 7 Apr 2013 at 4:12

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the repro case, I'll look at it later.

Original comment by erwin.coumans on 11 Apr 2013 at 7:39

GoogleCodeExporter commented 9 years ago
See https://github.com/bulletphysics/bullet3/issues/92

Original comment by erwin.coumans on 30 Mar 2014 at 6:07