Forum Replies Created
-
AuthorPosts
-
bgarcialBlocked
Definitely I have to test the SOFA Communication Plugin, I wanted to share with you some concerns about it:
Give a try to the examples, quite fast to use. There is cpp files associated to sofa´s scene. By default the communication plugin is turned on by cmake.
I want test the Communications plugin samples, How to can I do it?
I mean, in the README.md says some considerations.In relation to them … I have my own local SOFA instance. I will download the SOFA plugin Communications structure directory and I will add in my sofa instance (/applications/plugins/…) and compile it.
Some additional considerations to test some basic samples in which I can test send/receive data from a SOFA scene?
My apologies if I request too much to you (this is not intention), is that the documentation is not clear for me. Sorry. However this documentation whatever give great notions to follow in the process.
About of reuse the Communications Plugin, you says:
In my opinion yes. The limitation is if your datas are matrix. (I didn´t find a correct sofa type for it).
What kind of data would you like to send ? Any speed requirements/limitations ?Initially we want send from SOFA the following data characterization:
– Data about of instrument position
In this sense I will think that floats and/or doubles data type is suited …– Data about of collision of instrument user with the simulation scenario.
In this sense, we send information in some vector/array in three dimensions according to x,y,z axes in relation to 3D object models nature.– Haptic feedback
This feedback too with vector/array in three dimensions– Topological changes
Arrays of int type, in relation to id’s of each change in the mesh, in where each id is mapped to x,y,z axes …However, beyond all this I want test the communication plugin to know more about it, and can think in use and why not collaborate just in case …
bgarcialBlockedI’ve add the
<RequiredPlugin name='ZeroMq' />
directive and the sceneTest.scn
is loaded without errors from SOFA. Thanks for it 🙂Now, I have another error, but is my code in my constructor class
ZMQServerComponent
in myZMQServerComponent.cpp
file.Apparently the plugin or the scene enter to my
ZMQServerComponent
constructor two times …
Well, this is another history or anecdotebgarcial@elpug : ~/workspace/sofa/build/v17.06/bin [0] % ./runSofa [ERROR] [PluginManager] Plugin loading failed (/home/bgarcial/workspace/sofa/build/v17.06/lib/libZeroMq.so): function initExternalModule() not found Creating socket zeroMQ ... Creating socket zeroMQ ... terminate called after throwing an instance of 'zmq::error_t' what(): Address already in use ########## SIG 6 - SIGABRT: usually caused by an abort() or assert() ########## -> /home/bgarcial/workspace/sofa/build/v17.06/lib/libSofaHelper.so.17.06.02(sofa::helper::BackTrace::dump()+0x23) [0x7f5a09015d53]
[Off topic]
May I can know the reason why you try to implement zmq instead of using the Communication plugin ? ?I will want ask/talk with you in relation to Communication Plugin and for it, I did re-open my last thread/question in which you ask to me some interest questions about of use of Communications plugin and their possibilities and limitations. In this thread I will answer to you
Also, many thanks for your help 🙂
bgarcialBlockedHi @erwandouaille perfect.
I’ll start taking a look at the plugin you’ve built.
I see that in this file they call the libraries, among them Izmq
https://github.com/SofaDefrost/sofa/blob/sofaCommunication/applications/plugins/Communication/CMakeLists.txt#L34I see you have worked the plugin so that from a scene can send and receive data from it via zeroMQ, is that correct?
In this sense, for the moment, one of ours objectives is send the position of user instrument in relation with the simulation scenario.
Initially, I am configuring the zeroMQ library, and our task after, will be setup the communication of scene data via zeroMQ sockets. In this sense, I have a question which can seem obvious or not and also more according to our needs …Can I reuse the SofaCommunication plugin in relation to zeroMQ functionalities and not reinvent the wheel in relation to configurations libraries and implement communication data?
I know that this question is more to analyze by myself in more detail too .
Best Regards for share the product and knowledge.
bgarcialBlockedHi @hugo I think the key is in this file in the LeapMotion plugin sample to call the libraries that I need
According to you says me, I will watch in a deep way the LeapMotion structure directory and their properties to construct my plugin.
I appreciate your comments 🙂bgarcialBlockedHi @hugo
In first instance thanks for your answer.
Now, I am referencing the
LeapMotion
that you tell me.
Next, I place my plugin directory in sofa/src/applications/plugins/Currently, I configure (via
cmake-gui
) and build the plugin which I am generating, and I get this error:Apparently, my C++ application which I want work inside of SOFA, does not recognize the zeroMQ data type socket.
My doubt or inconvenient is how to add or configure the zeroMQ library which I am calling here (
#include <zmq.hpp>
)I unknown how to setup the external libraries which my plugin will use.
In my CMakeLists.txt may be? -
AuthorPosts