Collision normals not actually normal to surface.

Post Reply
psiorx
Posts: 2
Joined: Wed Feb 18, 2015 10:57 pm

Collision normals not actually normal to surface.

Post by psiorx »

Hi,

We're using Bullet's collision detection at MIT as part of a simulation for the Atlas biped robot. However, we've noticed that the collision normals are sometimes not what we're expecting.

We can reproduce this with a simple test case of a box sliding along a planar horizontal floor. In this case, we would expect that all of the normals be perpendicular to the surface of the floor (i.e. only having a z component).

However, we end up getting data that looks like this (each column is a normal vector):

-0.0000 -0.0154 -0.0000 -0.0604 0.0000 0.000 -0.0000 0.0000
0.0000 0.0115 0.0000 0.0162 0.0000 0.0000 0.0000 0.0000
-1.0000 -0.9998 -1.0000 -0.9980 -1.0000 -1.0000 -1.0000 -1.0000

Notice that most of the normals are correct ( [0;0;-1] is what we expect for all of them ), but there are some that are slightly skewed from vertical.

Over time, this causes the block which starts with only a horizontal velocity to develop a slight yaw in its final position.

We're using btGjkPairDetector in the standard way with btGjkEpaPenetrationDepthSolver and byVoronoiSimplexSolver.

Do you have any idea why this might be happening? Are there any other knobs we can turn to reduce/eliminate this issue?

Thank you.
psiorx
Posts: 2
Joined: Wed Feb 18, 2015 10:57 pm

Re: Collision normals not actually normal to surface.

Post by psiorx »

We've gotten to the bottom of this issue. The problem was that we were approximating explicit contact points as zero radius spheres. When the sphere collides with something, the normal is calculated using the vector between the two collision points. Since, in the case of a zero radius sphere, the collision points can be extremely close to eachother, the normalization of the resulting vector becomes ill conditioned and numerical issues start to arise. By giving the contact points a small but finite radius, the problem disappears.
Post Reply