Recently we upgraded our software from PhysX 2.4 to PhysX 3.2. After a long time of tuning and experimenting we believe that we found the optimal settings for our simulation purpose. With these setting we note that the simulation in a bit faster in PhysX 3.2 than in PhysX 2.4, however we currently believe that this is at the cost of the joint/contact solver accuracy/stiffness (If I remember correctly contacts are handled as temporary constraints in PhysX, therefore I mention the problem in one sentence). With this question I hope someone can tell us right OR (preferably!) explain us how to tweak the PhysX 3.2 (joint) solver to perform reasonable the same as PhysX 2.4.
To get more background information, please read the following:
The purpose of our simulator is to simulate tasks performed with a (simulated) robot that is actuated via a hardware haptic master device by a human (see e.g. Haptic cleaning simulation - YouTube). The master device is connected to a robotic hand by a controller. The hand has a two finger gripper interface. The controller can exert at most 3.5 [N] of force and 3 [Nm] of torque to the hand. (As the scene dimension are in units of [mm], [s] and [kg] it means that the forces and torques are at most 3500 [mN] and 3*10^6 [mNmm])
The joint solver inaccuracy/slackness that we encounter in PhysX 3.2 is that joints allow movement along an axis that is restricted. The movement occurs even at a fraction of the maximum master forces. This movement does not occur in PhysX 2.4. This can be seen clearly in the following images:
PhysX 2.4 the gripper fingers remain parallel → https://dl.dropboxusercontent.com/u/2268947/jenga_px2_finger.jpg
PhysX 3.2 the right finger is bended relative far → https://dl.dropboxusercontent.com/u/2268947/jenga_px3_finger.jpg
I must admit that we use a long kinematic chain with many joints, but why is it working correctly in PhysX 2.4 and not in PhysX 3.2?
The contact inaccuracy/slackness that we encounter in PhysX 3.2 a slight movement in contact points. We notice this is behaviour extremely is a Jenga scene we have. When we push to the tower of Jenga bricks so gentle that the static friction force between the bricks is just not overcome, the tower noticeably “bends”. This can be seen clearly by the vertical black line in the following figure → https://dl.dropboxusercontent.com/u/2268947/jenga_px3_with_line.jpg. Even worse is that the tower wobbles back when the contact is released. This bend and wobbling is by far not noticeably in PhysX 2.4.
PhysX 2.4 settings are:
Time step = 0.003 [s] (calculation takes about 0.0027 [s])
Skinwidth = 0.2 [mm]
NX_SF_FORCE_CONE_FRICTION =true
NX_AF_FORCE_CONE_FRICTION = true
Typical mass = 0.03 to 1 [kg]
Typical object size = 10 to 1000 [mm]
PhysX 3.2 settings are:
Time step = 0.003 [s] (calculation takes about 0.0021 [s])
sceneScale.length=1000
sceneScale.mass=1000
sceneScale.speed=9810
contactCorrelationDistance= 10 [mm]
pcm collision detection = false
friction model = two directional
use adaptive forces = true
RestOffset = 0.0 [mm]
ContactOffset 0.01 [mm]
Typical mass = 0.03 to 1 [kg]
Typical object size = 10 to 1000 [mm]
We also tried to use the projection method of joints, which seem to do the trick for pure joints. However The PhysX guide mentions “It is best avoided” and “does not respect collision geometry” while we only notice it in during collision. Moreover it does not work for contacts.
We really hope that someone can point us to the solution to of how to tweak the PhysX 3.2 (joint) solver to perform reasonably the same as PhysX 2.4. If not, I hope that someone form Nvidea can verify that the PhysX 3.2 (joint) solver is more compliant (as we currently suspect) than the one in PhysX 2.4.