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

Create generic OpenraveYarpPluginLoader #47

Closed
jgvictores opened this issue Dec 3, 2017 · 11 comments
Closed

Create generic OpenraveYarpPluginLoader #47

jgvictores opened this issue Dec 3, 2017 · 11 comments

Comments

@jgvictores
Copy link
Member

jgvictores commented Dec 3, 2017

Create generic OpenraveYarpPluginLoader. As a follow-up of #30, an OpenRAVE plugin to load any generic YARP plugin should be developed:

  • Code base could be extracted from OpenraveYarpControlboard and eventually superseed it.
  • An important design decision: OpenraveYarpControlboard goes through all robots, getting all manipulators, opens a YarpControlboard for each one. That in fact emulates teoSim. Would we want something similar? Perhaps a good approach is to do this mega-approach, then allow only parts to be specified. Will try this first.
@jgvictores jgvictores self-assigned this Dec 3, 2017
@jgvictores jgvictores changed the title Create generic OpenraveYarpPlugin or similar Create generic OpenraveYarpPluginLoader Dec 3, 2017
@jgvictores
Copy link
Member Author

Updated description, and set as technically blocking #30 as it may superseed it.

@jgvictores
Copy link
Member Author

jgvictores commented Dec 3, 2017

Note that may superseed #30 which is blocking:

WIP at issue-47-OpenraveYarpPluginLoader.

jgvictores added a commit that referenced this issue Dec 3, 2017
begin OpenraveYarpPluginLoader for #47 as a copy of OpenraveYarpControlboard.
@jgvictores
Copy link
Member Author

Very important notes on OpenRAVE plugin main() and open() at #30 (comment) as well as other ideas.

jgvictores added a commit that referenced this issue Dec 3, 2017
jgvictores added a commit that referenced this issue Dec 4, 2017
jgvictores added a commit that referenced this issue Dec 6, 2017
@jgvictores
Copy link
Member Author

jgvictores commented Dec 6, 2017

OpenraveYarpPluginLoader that loads specific YARP device developed and merged into develop at 478142c.

Possible improvements:

  • Multiple device load.
  • Use open for auto-open from command line (must check for race conditions such as existing robot, see these comments).
  • name: Work on manipulatorIndex/sensorIndex and other alternatives.
  • name: Work on suffix.

@jgvictores
Copy link
Member Author

jgvictores commented Dec 22, 2017

Implemented most improvements at 28ce5e9, including:

  • Multiple device load.
  • name: Work on manipulatorIndex/sensorIndex and other alternatives.

...which renders OpenraveYarpControlboard quite obsolete.

Considered not required:

  • name: Work on suffix.

Would like to study:

  • Use open for auto-open from command line (must check for race conditions such as existing robot, see these comments). However, according to this, "Robots might not necessarily be set before this function call"...

@jgvictores
Copy link
Member Author

Must also update main README.

@jgvictores
Copy link
Member Author

Announcement!

We no longer require Python to load YARP plugins via OpenraveYarpPluginLoader, thanks to d5cfee2.

Here are some details:

  • The direct CLI one-liner succesor of teoSim is:
openrave /usr/local/share/teo-openrave-models/contexts/openrave/teo/teo.robot.xml --module OpenraveYarpPluginLoader "open --device controlboardwrapper2 --subdevice YarpOpenraveControlboard --robotIndex 0 --allManipulators"
  • We can even do funky commands like the following, where open acts as a delimiter:
openrave /usr/local/share/teo-openrave-models/contexts/openrave/teo/teo.robot.xml --module OpenraveYarpPluginLoader "open --device controlboardwrapper2 --subdevice YarpOpenraveControlboard --robotIndex 0 --manipulatorIndex 0 open --device controlboardwrapper2 --subdevice YarpOpenraveControlboard --robotIndex 0 --manipulatorIndex 2"
  • Two pending issues:
    • Via Python, destructors are clearly called upon ^C. Via CLI, for some reason, they are not called upon ^C. The hack would be to set up catching the signal in this main() of the function, but maybe this is overkill and we should dig into OpenRAVE guts.
    • The commented above "Robots might not necessarily be set before this function call" issue has not appeared, but could appear as the result of some race condition as documented.

@PeterBowman Okay if I perform the following steps?

  1. Update documentation taking these functionalities into account.
  2. Delete OpenraveYarpControlboard and related documentation/examples. XGNITIVE examples have already been updated, so there should be no current users. Perhaps the most conflictive change, as I'm not a big fan of leaving obsolete and most probably unused modules around.
  3. Put a two new issues, each regarding one of the pending issues above.
  4. Close this issue, start commenting on others such as Life beyond teoSim #27.

@jgvictores
Copy link
Member Author

PS: Also tried via SendCommand instead of direct call to Open, same non-destructor result.

@jgvictores
Copy link
Member Author

jgvictores commented Dec 23, 2017

PPS: Race condition does occur via openrave.py.

@PeterBowman
Copy link
Member

@jgvictores 👍

@jgvictores
Copy link
Member Author

Finished at 73061b0. Now continued at #59, #60 and #27.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants