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

added option to remove implicit wrappers in lasersensor, controlboard, depthcamera and multicamera #565

Merged
merged 19 commits into from
Jul 31, 2021

Conversation

ste93
Copy link
Contributor

@ste93 ste93 commented Jul 28, 2021

based on #564
This PR adds a flag USE_NEW_WRAPPERS that if enable removes all the wrappers from doublelaser, lasersensor, controlboard, depthcamera and multicamera and allows the use of the new nws present in yarp 3.5.

YARP 3.5 is required now as basis

@ste93
Copy link
Contributor Author

ste93 commented Jul 28, 2021

@traversaro do you think that it should be added a CI with the flag USE_NEW_WRAPPERS on?

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
@traversaro
Copy link
Member

Thanks @ste93 ! I already commented something I noticed, even if the complete review will be easier after #564 gets through. Could you consider reviewing the PR title to something more descriptive? "Removed wrappers" does not sound something that really describe what this PR is doing.

@ste93 ste93 changed the title Removed wrappers added option to remove default wrappers in doublelaser, lasersensor, controlboard, depthcamera and multicamera Jul 28, 2021
@ste93 ste93 force-pushed the removed_wrappers branch from 928e96a to 78914aa Compare July 28, 2021 12:22
@ste93 ste93 force-pushed the removed_wrappers branch from 78914aa to efe34c2 Compare July 29, 2021 10:27
@ste93
Copy link
Contributor Author

ste93 commented Jul 29, 2021

@traversaro rebased on devel

@traversaro
Copy link
Member

@traversaro rebased on devel

Let me know when this is ready for review.

@ste93
Copy link
Contributor Author

ste93 commented Jul 29, 2021

Let me know when this is ready for review.

It is ready

CMakeLists.txt Outdated Show resolved Hide resolved
plugins/controlboard/src/ControlBoard.cc Outdated Show resolved Hide resolved
plugins/controlboard/src/ControlBoard.cc Outdated Show resolved Hide resolved
plugins/depthCamera/src/DepthCamera.cc Show resolved Hide resolved
plugins/depthCamera/src/DepthCamera.cc Show resolved Hide resolved
Copy link
Member

@traversaro traversaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a leftover comment, sorry for that .

plugins/depthCamera/src/DepthCamera.cc Outdated Show resolved Hide resolved
@traversaro
Copy link
Member

I guess also the docs in https://github.com/robotology/gazebo-yarp-plugins/tree/master/plugins/robotinterface#how-to-specify-existing-yarp-devices-to-which-to-attach on how to specify the YARP device instance name should mention that if GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS is enabled, then the yarpDeviceName is used also for the gazebo_yarp_controlboard plugin.

@randaz81
Copy link
Member

I recommend to remove plugin doublelaser by this PR, since it cannot work with the new architecture.
Additionally I recommend for the next release to remove it entirely from the repo since it is deprecated and no more in use.

@traversaro
Copy link
Member

I recommend to remove plugin doublelaser by this PR, since it cannot work with the new architecture.
Additionally I recommend for the next release to remove it entirely from the repo since it is deprecated and no more in use.

The gazebo_yarp_doublelaser plugin was modified by @drdanz in https://github.com/robotology/gazebo-yarp-plugins/pull/559/files to handle the new workflow and the documentation was also updated to mention it, do you think we should remove it also from the docs?

@ste93
Copy link
Contributor Author

ste93 commented Jul 30, 2021

Just one question: how are you testing that GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS set to OFF continue to work as intended? Are you running some kind of model that assume that the implicit wrappers are there, such as the iCub model, or the non-modified R1 model? gazebo-yarp-plugins has a few tests, but unfortunatly they do not cover a lot of functionalities.

For now I'm testing with the old r1 model, I can try with iCub but I don't have any running simulator now, I'll check it maybe. Do you have any suggestion?

@traversaro
Copy link
Member

For now I'm testing with the old r1 model, I can try with iCub but I don't have any running simulator now, I'll check it maybe.

The old R1 model seems fine, but are you testing the case in which you are not using gazebo_yarp_robotinterface and you are relying instead on the implicitly create wrappers, for example via yarpmotorgui?

@ste93
Copy link
Contributor Author

ste93 commented Jul 30, 2021

For now I'm testing with the old r1 model, I can try with iCub but I don't have any running simulator now, I'll check it maybe.

The old R1 model seems fine, but are you testing the case in which you are not using gazebo_yarp_robotinterface and you are relying instead on the implicitly create wrappers, for example via yarpmotorgui?

yes I'll test with yarpmotorgui and yarpview

@ste93 ste93 changed the title added option to remove implicit wrappers in doublelaser, lasersensor, controlboard, depthcamera and multicamera added option to remove implicit wrappers in lasersensor, controlboard, depthcamera and multicamera Jul 30, 2021
@randaz81
Copy link
Member

The gazebo_yarp_doublelaser plugin was modified by @drdanz in https://github.com/robotology/gazebo-yarp-plugins/pull/559/files to handle the new workflow and the documentation was also updated to mention it, do you think we should remove it also from the docs?

Yes, with the new yarp 3.5, this device can be completely removed from the repo.
It was existing only because it was not possible to do the attach operation which is now possible with the robotinterface plugin.
Its functionalities are now replaced by the same yarp device driver used on the real robot, i.e. https://github.com/robotology/cer/tree/master/cermod/cerDoubleLidar. This device can be now attached to a gazebo lidar device via robotinterface.

@traversaro
Copy link
Member

Thanks, the PR seems good to go. The only missing pieces are:

@traversaro
Copy link
Member

Yes, with the new yarp 3.5, this device can be completely removed from the repo.

Cool! Can you approve PR #570 that add a deprecation notice for the users on this, so then in the next release we can remove the plugin?

@ste93
Copy link
Contributor Author

ste93 commented Jul 30, 2021

Thanks, the PR seems good to go. The only missing pieces are:

* [added option to remove implicit wrappers in lasersensor, controlboard, depthcamera and multicamera #565 (comment)](https://github.com/robotology/gazebo-yarp-plugins/pull/565#issuecomment-889717629)

* Update the CHANGELOG

updated both

@ste93
Copy link
Contributor Author

ste93 commented Jul 30, 2021

I've tested it on gazebo, yarpmotorgui, yarplaserscannergui and yarpview both with and without the new option and it seems to work fine :)

Comment on lines 77 to 79
For the `gazebo_yarp_controlboard`, if the `yarpDeviceName` parameter is not specified, for legacy reason the **YARP device instance name** for each created device can also be specified with the `networks` parameter list in the plugin configuration.

A cmake option (`GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS`) has been added, if this option is enabled then implicit wrappers present in`gazebo_yarp_multicamera`, `gazebo_yarp_lasersensor`, `gazebo_yarp_controlboard` and `gazebo_yarp_depthCamera` are removed, the new way to have them is to attach the new nws to gazebo devices via yarprobotinterface as above.
Copy link
Member

@traversaro traversaro Jul 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a bit strange to have a sentence that uses the present perfect in a document that uses the present, don't you find? Did you tried to check if this sentence is coherent with the rest of the document? I think it may be more clear to remove all together the new sentence, and just add a sentence to the previous period, something like:

Suggested change
For the `gazebo_yarp_controlboard`, if the `yarpDeviceName` parameter is not specified, for legacy reason the **YARP device instance name** for each created device can also be specified with the `networks` parameter list in the plugin configuration.
A cmake option (`GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS`) has been added, if this option is enabled then implicit wrappers present in`gazebo_yarp_multicamera`, `gazebo_yarp_lasersensor`, `gazebo_yarp_controlboard` and `gazebo_yarp_depthCamera` are removed, the new way to have them is to attach the new nws to gazebo devices via yarprobotinterface as above.
If the `GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS` option is set to `OFF` (default value), for the `gazebo_yarp_controlboard` if the `yarpDeviceName` parameter is not specified, for legacy reason the **YARP device instance name** for each created device can also be specified with the `networks` parameter list in the plugin configuration of `yarpDeviceName`. If instead the `GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS` option is set to `ON`, the `gazebo_yarp_controlboard` behaves like the rest of the plugins and requires to take the **YARP device instance name** from the `yarpDeviceName` parameter.

@traversaro
Copy link
Member

I've tested it on gazebo, yarpmotorgui, yarplaserscannergui and yarpview both with and without the new option and it seems to work fine :)

Great, can you check my last comment on the docs?

@ste93 ste93 force-pushed the removed_wrappers branch from 580f323 to f7886c9 Compare July 30, 2021 16:02
plugins/robotinterface/README.md Outdated Show resolved Hide resolved
@traversaro
Copy link
Member

Thanks @ste93 ! I would Squash and merge, but if you prefer to re-structure your commits please let me know.

@ste93
Copy link
Contributor Author

ste93 commented Jul 30, 2021

no you can squash the commits

@traversaro traversaro merged commit 030adae into robotology:devel Jul 31, 2021
@traversaro
Copy link
Member

Thanks @ste93 !

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

Successfully merging this pull request may close these issues.

3 participants