Forum Replies Created
-
AuthorPosts
-
AndreaBlocked
Dear Hugo,
There is no ffmpeg in my build/bin… What is the clean way for having it?
Thanks
Andrea
AndreaBlockedHi Hugo,
Thanks for your answer.
I also thought this was the reason, but it is not. The error is still there after adding all the privileges to runSofa…
Andrea
AndreaBlockedHey JN,
It gets without problem to the draw() method.
vparams->drawTool()->drawSphere(point, 0.0038)
is effectively called. And the vectorpoint
is correctly updated.Andrea
AndreaBlockedHey JN,
My scene is a priori rendered correctly. I see my forcefields and ogl models, and also the images acquired by a realsense camera (plugged to my computer).
The issue comes when using the component OpenCVProjectivePointSelector from the OpencvPlugin. In particular when I select markers on the current image with a mouse click, these markers are displayed as red points when using runSofa (which is the expected behavior), but are invisible when using python (and yet they are correctly initialized).Not sure if it is relate, but adding
Sofa.Simulation.initVisual(root)
results in a segfault with the following error:-> /home/andrea/projects/sofa/build/install/lib/libSofaHelper.so.20.12.00(sofa::helper::BackTrace::dump()+0x27) [0x7fe673a69977] -> /home/andrea/projects/sofa/build/install/lib/libSofaHelper.so.20.12.00(sofa::helper::BackTrace::sig(int)+0x1d6) [0x7fe673a69d16] -> /lib/x86_64-linux-gnu/libc.so.6(+0x46210) [0x7fe677c54210] Segmentation fault (core dumped)
Hope this helps.
Andrea
AndreaBlockedHey JN,
I also thought the problem might come from the GUI, but I use qglviewer for both python and runSofa.
When running my scene with python, this is the code that creates the root node and the GUI:
root = Sofa.Core.Node() createScene(root) Sofa.Simulation.init(root) Sofa.Gui.GUIManager.Init("Acquire and register", "qglviewer") Sofa.Gui.GUIManager.createGUI(root, file) Sofa.Gui.GUIManager.SetDimension(640, 480) Sofa.Gui.GUIManager.MainLoop(root)
Thanks,
AndreaAndreaBlockedIt works!!! Thank you so much JN!!
AndreaBlockedHey JN,
Still not working. If I run what you suggested I get the following warning:
[SofaViewer] Could not create file 'path_to_my_image/img.png' Valid extensions: dds<code>and there is no background image.
But this time, current_gui is not None 🙂
If I only run
Sofa.Gui.GUIManager.Init("scene", "qglviewer") Sofa.Gui.GUIManager.createGUI(root, __file__)
I get a similar warning:
[SofaViewer] Could not create file '/home/andrea/Projects/sofa/share/textures/SOFA_logo.bmp' Valid extensions: dds
Also note that if I use
Sofa.Gui.GUIManager.createGUI(root)
(without__file__
) I get the following error:
[SofaRuntime] RuntimeError: basic_string::_M_construct null not valid
`I both checked the existence and accessibility to
path_to_my_image/img.png
and to/home/andrea/Projects/sofa/share/textures/SOFA_logo.bmp
Moreover, I need to update the background image at every time step so I will also have to call setBackgroundImage() inside my functions…
Andrea
AndreaBlockedHey JN,
Thanks for your reply.
I also tried that, but
Sofa.Gui.GUIManager.GetGUI()
returns None. Yet I have initialized the GUIManager by doing:Sofa.Gui.GUIManager.Init("scene", "qglviewer") Sofa.Gui.GUIManager.createGUI(root) Sofa.Gui.GUIManager.MainLoop(root)
Andrea
-
AuthorPosts