Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use "persistence" option from yarp.Network.connect to create persistent connections #79

Open
2 tasks done
nunoguedelha opened this issue Nov 15, 2021 · 0 comments
Open
2 tasks done
Assignees
Labels
enhancement New feature or request

Comments

@nunoguedelha
Copy link
Collaborator

Preliminary checks

  • "persistent" option working on the terminal.
    yarp connect --persist OUTPUT_PORT INPUT_PORT
    yarp connect --persist-from OUTPUT_PORT INPUT_PORT
    yarp connect --persist-to OUTPUT_PORT INPUT_PORT
    
  • Test in Javascript/Node.js : ⚠️ FAIL ⚠️ . Bindings to the class yarp::os::ContactStyle are not implemented.
    ...

Other tests and obsevations:

...

  • Creating a persistent connection before creating the /write /read ports only works if we use the prefix topic://aTopic. Doing:
    yarp topic /aTopic
    yarp connect /write /aTopic
    [ERROR] |yarp.os.Network| Failure: could not find source port /write
    
    doesn't work without the --persit explicit option.
    ...

Conclusion

Having this in mind and the fact that Bindings to the class yarp::os::ContactStyle are not implemented, it seems easier to use topics for creating persistent connections, although the approach using the style option would be simpler if yarp::os::ContactStyle was available.

The drawback is that we won't be able to cleanup the topics once we don't need them anymore (unless we run a child process just for that of course, which we should avoid).

It might be worth trying to create the bindings for the class yarp::os::ContactStyle. If it's not straightforward enough, we'll go for the topics solutions.

Originally posted by @nunoguedelha in #68 (comment)

Depends on robotology/yarp.js#26.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant