## Soft body contact force

Official Python bindings with a focus on reinforcement learning and robotics.
prathamesh
Posts: 1
Joined: Sun Jan 29, 2023 2:05 pm

### Soft body contact force

We are trying to simulate grasping of soft objects using pybullet. For that purpose, we are trying to get the contact force between a soft body and rigid body, with which we are having some problems. We tried both methods recommended here ( https://github.com/bulletphysics/bullet3/issues/2488).
We tried getting the contact force between a rigid table and a soft object resting on it. We are using FEM/mass-spring.
(1) Using getContactPoints, we are always getting the same force (1N) at each contact point and same number of contact points(10), regardless of the mass of the object.
(2) We created a link on top of the table which is connected to the table by a fixed joint. We got the reaction forces at the fixed joint. The reaction forces are always zero regardless whether the object is resting on the table or not.
The output is shown below
Using contact points: 0
Reaction force at fixed joint: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
-----------------------------------------------------
Using contact points: 0
Reaction force at fixed joint: (0.0, 0.0, 0.0, 0.0, 0.0, 0.0)
-----------------------------------------------------
Both the methods are working with rigid objects. The problem seems to be soft body related.
Using contact points: 97.35091108275402
Reaction force at fixed joint: (0.034910487204954856, 0.034793450729809834, 97.35091108275402, 160.5983761621271, 2.9517741130387547, -0.0586519151633019)
-----------------------------------------------------
Using contact points: 97.56281875457508
Reaction force at fixed joint: (0.032460291941310594, 0.03230360009906202, 97.56281875457508, 160.95020118085586, 2.9559727177872865, -0.054533921059458465)
-----------------------------------------------------