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

Problem using SOFA with `SoftRobots` & `STLIB` & `SofaPython3` plugins #2754

Open Sihtralad opened 2 years ago

Sihtralad commented 2 years ago

Greetings,

I have built SOFA v21.12 without any error massages, on Ubuntu 18.04. And it works fine without plugins. However when I try to run examples for SoftRobots, I encounter the same problems as previously described is following topics, also tried the solutions that is described there. (Also tried to build on Ubuntu 20.04 but the result is the same)

https://www.sofa-framework.org/community/forum/topic/error-couldnt-import-objects-from-stlib3-physics-rigid/

https://www.sofa-framework.org/community/forum/topic/issues-with-running-examples-on-sofa_v20-12-02_defrost_linux/

Has this problem been solved?

Moreover, my colleague also built SOFA and the plugins on Ubuntu 20.04, then sent me the built version of his. I have re-installed Ubuntu 20.04 with his user name, and surprisingly the plugins worked without any errors. Therefore, I am assuming there might be a mistake while I use Cmake. However, as me and my colleague discussed, we have followed exactly the same method but the results were different.

I get the following error massage when I try to run SOFA with my build:

`[ERROR] [SofaPython3::SceneLoader] Unable to completely load the scene from file '....path/to/file.../SoftRobots/docs/tutorials/FirstSteps/details/sofapython3/step4.py3scn'.
Python exception:
ImportError: cannot import name 'Floor' from 'stlib3.physics.rigid' (/....path/to/file...../sofa/build/lib/python3/site-packages/stlib3/physics/rigid/init.py)

At: step4.py3scn(2):

(219): _call_with_frames_removed (843): exec_module (686): _load_unlocked (702): _load /usr/lib/python3.8/imp.py(171): load_source /usr/lib/python3.8/imp.py(234): load_module (3): `
damienmarchal commented 2 years ago

Hi @Sihtralad,

thank you for reporting the issue.

We made some fixes for the RoboSoft conference But in general we don't backport the fixes to old releases (the 21.12 is a past release).

Could you confirm this problem is still there with the master branches of Sofa+STLIB+SoftRobot ?