sofa-framework / sofa

Real-time multi-physics simulation with an emphasis on medical simulation.
https://www.sofa-framework.org
GNU Lesser General Public License v2.1
871 stars 297 forks source link

[plugins] ADD new Communication plugin #534

Closed ErwanDouaille closed 2 years ago

ErwanDouaille commented 6 years ago

Here is a plugin communication The purpose of this plugin is to add ability to the users to simply send/receive data´s from sofa. Instead of creating many plugins for each implementation/hardware, we propose to regroup all of them in one communication plugin.

Actually there is two network protocol implemented :

Improvements :


This PR:

Reviewers will merge only if all these checks are true.

hugtalbot commented 6 years ago

@fredroy any link to your current python investigations ?

maxime-tournier commented 6 years ago

Hi, great work there!

Just to mention that since the python plugin got proper GIL handling, it is also possible to implement communication all on the python side: just start a python thread and do the message dispatch from there using the python package of your choice. From there it's fairly easy to exchange data using a Queue between the communication thread and e.g. a script controller (in fact that was the main reason behind implementing GIL handling).

damienmarchal commented 6 years ago

[ci-build][with-scene-tests]

damienmarchal commented 6 years ago

Hello Erwan & @guparan

Was zmq installed on the CI ? I installed it on centos3 and ubuntu but not on macos & windows. It seems there is also a dependency on liboscpack that also needs to be installed Am I wrong ?

ErwanDouaille commented 6 years ago

AFAIK, @bcarrez installed zmq on CI ubuntu (or maybe not, just before vacations).

For liboscpack it requires a specific version : https://github.com/SofaDefrost/sofa/blob/sofaCommunication/applications/plugins/Communication/README.md If you install liboscpack from the repository there is some bugs in it.

About windows and mac I never tested on it. Plus, I have to write a liboscpack cmake find :/

damienmarchal commented 6 years ago

Thanks for the details. So It is consistent with what the CI is returning.

ErwanDouaille commented 6 years ago

[ci-build]

ErwanDouaille commented 6 years ago

[ci-build]

ErwanDouaille commented 6 years ago

[ci-build][with-scene-tests]

hugtalbot commented 6 years ago

Hi @ErwanDouaille

Could you update us about the status of this PR shall it be pursued, cleaned and merged ? Cheers Hugo

ErwanDouaille commented 6 years ago

Hey,

This PR will be pursued, by the gsoc. I will chat with Rupesh tonight

techytoes commented 6 years ago

I think there is some issues with the CI as the communication plugin ran fine on my MacOS. What do you say @ErwanDouaille ?

hugtalbot commented 5 years ago

Hi @ErwanDouaille

How are you doing? It's been some time since your last update. Any news on the Communication plugin? @tgaugry did you use this work on Communication for your own purposes ?

Best!

ErwanDouaille commented 5 years ago

Hey @hugtalbot,

As I remember, the communication plugin is imo ready to merge. It still need some polish like, code cleaning, avoid some useless copy, use some boost things ... but it´s working.

On CI, AFAIK only the core communication plugin is compiled. We don´t want to install libs for all the protocols implemented.

What you need to know is, there is still pending PR (https://github.com/SofaDefrost/sofa/pull/20 with another one) for this plugin. But they are not working and I don´t have any news from the contributor (Rupesh gsoc). This is not a big deal because the content of the PR is an addon for the plugin Qt serial protocol.

Let me know if you have any question :)

hugtalbot commented 3 years ago

All scene examples in the Communication plugin crash, I guess the plugin is not activating thus generating these errors/crashes right @guparan ?

guparan commented 3 years ago

[ci-build][with-all-tests][force-full-build]

hugtalbot commented 3 years ago

[ci-build][with-all-tests][force-full-build]

hugtalbot commented 3 years ago

One warning added : CommunicationSubscriber.inl:36 (-Wreorder)

Two scene tests failing:

and several others on CentOS

hugtalbot commented 3 years ago

Two scenes are related to network: maybe a socket is not properly closed?

guparan commented 3 years ago

[ci-build][with-all-tests]

guparan commented 3 years ago

[ci-build][with-all-tests]

guparan commented 2 years ago

Updated one last time and moved to https://github.com/sofa-framework/Communication Feel free to open issues and pull-requests there.