Home › Forum › SOFA › Using SOFA › [SOLVED] Sofa registry (ObjectFactory) problem
- This topic has 2 replies, 3 voices, and was last updated 9 years, 1 month ago by Hugo.
-
AuthorPosts
-
28 May 2015 at 09:26 #3342RestrepoBlocked
Hello.
I’m working with CamiTK/Sofa for FEM simulation, the problem i’m having is that the function that I have in camiTK calls sofa but is not getting the updated positions of my scene after a simulation. I managed to pinpoint (after a lot of debuging) the source of the problem and that’s that while sofa creates 530 (aprox) registries of the classes (like defaultanimloop, mechanicalobj, visual, etc…) camiTK is getting 49 registries. these registries are used then for the ObjectFactory, ObjectElement, etc. and after for the visitors to decide which functions are being called.
so far i found the config.h file that has the macros that build the list of symbols for the registry, but the call of that macro is nowhere to be found, so i cannot force certain path for it too look new .so libraries (which i assume sofa is loading when camiTK is calling it REF: img 2) and form where he’s getting the “Class_,name” functions to register.
in the debug the stack of sofa looks smt like this (Before reaching the main)
SOFA STACK : http://i.imgur.com/IcvoFY5.png?1
CAMITK STACK : http://i.imgur.com/rgvkNYs.pngSo the problem is that if sofa doesn’t have a registry for example of a solver he’s not getting any solution for the simulation because the “solver node” in the tree is going to have a default (template) of an object and not an actual solver, in consequence the visitor is not going to call the functions and there won’t be updated positions. besides forcing sofa to “Reload” all the registry when called from outside I don’t have many ideas for a workaround.
Thanks for any help i can get.
Best Regards.
Felipe
Ps. i must clarify that i’m no expert in SOFA, and this conclusion is what I got from debuging and following the code. if I’m wrong in any assumption please let me know.
*Edit: I’m working over the v15.03 Branch on the last version/commit.
- This topic was modified 2 years, 8 months ago by Guillaume.
29 May 2015 at 13:30 #3346MarcBlockedHello Restrepo,
i cannot force certain path for it too look new .so libraries (which i assume sofa is loading when camiTK is calling it REF: img 2)
I don’t know what CamiTK is, so let me take a guess: you have an application that uses Sofa, and it cannot create some components, because it simply doesn’t know about them. Actually, the usual Sofa components live in different libraries, so you need to link against the correct libraries to use those components. Try linking the application against the “SofaComponentMain” library, which itself is linked against all the other component libraries.
Feel free to give more details if I guessed completely wrong.
(Also : are there no error messages? Any output from Sofa on stdout / stderr?)
27 October 2015 at 09:48 #3879HugoKeymasterDear Restrepo,
I you don’t have any further remarks or question, I will close this topics.
Best,Hugo
-
AuthorPosts
- You must be logged in to reply to this topic.