Open 123jjx321 opened 1 year ago
Hi @123jjx321
What "_sofa_linuxrun" are your referring to exactly?
Hi,hug
I mean just use the sofa.run file in ubuntu20.04(not build from source), and follow the instructions of caribou like :
First:simply extract in sofa_install/plugin/SofaCaribou(not follow the "build Caribou from source" in document too);
Second:add environment variables by "export = paths as below"
SOFA_ROOT=/home/j/SOFA/v22.12.00
PATH=/home/j/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/j/SOFA/v22.12.00:/home/j/SOFA/v22.12.00/plugins/SofaPython3/lib/python3/site-packages:/usr/bin/python3.8:/home/j/SOFA/v22.12.00/plugins/SofaPython3:/home/j/SOFA/v22.12.00/lib:/home/j/SOFA/v22.12.00/DLLs
PYTHONPATH=/home/j/SOFA/v22.12.00/plugins/SofaPython3/lib/python3/site-packages:/home/j/SOFA/v22.12.00/plugins/SofaCaribou/lib/python3/site-packages
SOFACARIBOU_ROOT=/home/j/SOFA/v22.12.00/plugins/SofaCaribou
SOFAPYTHON3_ROOT=/home/j/SOFA/v22.12.00/plugins/SofaPython3
Then, when I want to use caribou in ubuntu 20.04, It shows there is a error in "import SofaCaribou". by the way, I am using the latest sofa.
import Caribou import SofaCaribou [ERROR] [SofaRuntime] ImportError: libSofa.Core.so.23.06.99: cannot open shared object file: No such file or directory Traceback (most recent call last): File "
", line 1, in File "/home/j/SOFA/v22.12.00/plugins/SofaCaribou/lib/python3/site-packages/SofaCaribou/init.py", line 6, in from .SofaCaribou import *
do you know where did I wrong? should I must build Caribou from source to use it?
Dear @123jjx321
I am not sure that the binary version of the Caribou plugin is actually up to date (your point "First"). Caribou does not seem to distribute any binary anymore : an easy way to go would be to compile the Caribou plugin "out of tree" as detailed here. Information on how to compile Caribou are available here.
Let me know if this works
First, I directly download the SOFA_v22.12.00.Linux.run(not build from source).
Second, I followed the "compile Caribou are available here" you suggest to me, and build it " out-of tree" step by step
Third, when I check whether did i success or not, i just open a terminal and get the following results: it shows that the "import Sofa/SofaRuntime/Sofa.Gui/Sofa.Core/Caribou are all right" but there is something wrong with "import SofaCaribou".
j@j:~/DeepPhysX/Sofa/examples/demos/Beam/FC$ python3 Python 3.8.10 (default, Nov 14 2022, 12:59:47) [GCC 9.4.0] on linux Type "help", "copyright", "credits" or "license" for more information.
import Sofa
Checking SOFA_ROOT and SOFAPYTHON3_ROOT Using environment variable SOFA_ROOT: /home/j/SOFA/v22.12.00
import SofaRuntime import Sofa.Gui [INFO] [Sofa.Gui] Loaded qt.conf from /home/j/SOFA/v22.12.00/bin/qt.conf customized with Prefix = /home/j/SOFA/v22.12.00 import Sofa.Core import Caribou import SofaCaribou [ERROR] [SofaRuntime] ImportError: generic_type: type "FictitiousGridVec2d" referenced unknown base type "sofa::core::objectmodel::BaseObject" Traceback (most recent call last): File "
", line 1, in File "/home/j/.local/lib/python3.8/site-packages/SofaCaribou/init.py", line 6, in from .SofaCaribou import *
And here is my environment file related to SofaCaribou and SofaPython: j@j:~/Desktop$ export Python_INCLUDE_DIRS=/usr/include/python3.8 j@j:~/Desktop$ export SP3_ROOT=/home/j/SOFA/SofaPython3/build/install j@j:~/Desktop$ export python_EXECUTABLE=/usr/bin/python3.8 j@j:~/Desktop$ export SP3_BUILD=/home/j/SOFA/SofaPython3/build j@j:~/Desktop$ export SP3_SRC=/home/j/SOFA/SofaPython3 j@j:~/Desktop$ export PYTHONPATH=/home/j/SOFA/SofaPython3/build/lib/python3/site-packages j@j:~/Desktop$ export CARIBOU_ROOT=/home/j/SOFA/caribou/build/install j@j:~/Desktop$ export CARIBOU_INSTALL=/home/j/SOFA/caribou/build/install j@j:~/Desktop$ export Python_EXECUTABLE=/usr/bin/python3.8 j@j:~/Desktop$ export SOFA_ROOT=/home/j/SOFA/v22.12.00
by the way, i met a lot of warning like
[ERROR] [PluginManager] Plugin loading failed (/home/j/SOFA/v22.12.00/collections/SofaComponentAll/lib/libSofaComponentAll.so): libSofaSimulationCommon.so.22.12.00: cannot open shared object file: No such file or directory [ERROR] [PluginManager] Plugin loading failed (/home/j/SOFA/v22.12.00/plugins/SofaCaribou/lib/libSofaCaribou.so): libSofa.Component.Topology.Container.Constant.so.23.06.99: cannot open shared object file: No such file or directory
Hi, I just download the sofa_linux_run file, and successfully bind with the SofaPython3 plugin, But the SofaCaribou shows error as below