sofa-framework / sofa

Real-time multi-physics simulation with an emphasis on medical simulation.
https://www.sofa-framework.org
GNU Lesser General Public License v2.1
927 stars 312 forks source link

Unpredictable collision problem when using PrecomputedConstraintCorrection #1809

Open lytyo opened 3 years ago

lytyo commented 3 years ago

The precomputed compliance matrix with PrecomputedConstraintCorrection component has a chance to be corrupted at each recomputation. It depends on the collision model used.

How to reproduce

I made a small example scene : BugShowcase.zip

This scene uses command line arguments and SofaPython3, so I added

PythonEnvironment::setArguments(SetDirectory::GetFileName(filename), arguments);

in the try{} block of in SceneLoaderPY3::loadSceneWithArguments in SceneLoaderPY3.cpp (lines : 90-100)

The solution

I do not know, but changing the 3d model can help. Also, one can try to recompute the compliance matrix until it "works" and save it and reload it (with recompute=False).

fredroy commented 3 years ago

Thank you for your precise issue! We will try to reproduce your issue thanks to your scene.