SofaDefrost / SofaGym

Machine Learning framework for Sofa
68 stars 10 forks source link

The object 'CableConstraint' is not in the factory. #57

Closed jiayiliu-pku closed 4 months ago

jiayiliu-pku commented 4 months ago

After installation of all requirements, I tried to perform tests. python test_env.py -e trunk-v0 -ep 100 -s 100 However, I got this error: image

Could you help me with it?

Thanks.

samuelmyoussef commented 4 months ago

Hello,

I'm not exactly sure but it might be a problem with your build. Could you give more details about this?

alxbilger commented 4 months ago

CableConstraint is part of the SoftRobots plugin. Do you have it? Did you load it?

jiayiliu-pku commented 4 months ago

CableConstraint is part of the SoftRobots plugin. Do you have it? Did you load it?

I have it and load it in the Sofa-GUI with plugin manager. However I still get the same error.

jiayiliu-pku commented 4 months ago

Hello,

I'm not exactly sure but it might be a problem with your build. Could you give more details about this?

For SOFA build: I followed https://www.sofa-framework.org/community/doc/getting-started/build/linux For other plugins, I use out-of-tree method to build them. I am not sure how to provide details about it.

If more details are needed, please tell me.

jiayiliu-pku commented 4 months ago

I have re-installed the Sofa and required plugins with in-tree build.

I added the following two lines in CMakeLists.txt in sofa/src to fix the bug (error: 'is_same_v' is not a member of 'std') set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON)

Then, I added required plugins using plugin manager.

The bug was fixed :)