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

Prepare for incoming gazebo-yarp-plugins 5 release #6

Closed
PeterBowman opened this issue Jun 8, 2022 · 2 comments
Closed

Prepare for incoming gazebo-yarp-plugins 5 release #6

PeterBowman opened this issue Jun 8, 2022 · 2 comments
Assignees

Comments

@PeterBowman
Copy link
Member

PeterBowman commented Jun 8, 2022

Implicit network wrappers (i.e. controlboardwrapper2) will be dropped in favor of a yarprobotinterface plugin:

The new explicit NWS/NWC thing depends on a transitional CMake variable GAZEBO_YARP_PLUGINS_DISABLE_IMPLICIT_NETWORK_WRAPPERS being set to ON (currently defaults to OFF). During said transition, in order to avoid tweaking this while building gazebo-yarp-plugins, it is possible to pass the dynamic disableImplicitNetworkWrapper option through .ini configuration to achieve the same behavior (and make it possible to have two models coexisting: using the new and the old schemes).

Incidentally, this task will also make our models compatible with YARP 3.7, which has officially hard-deprecated the controlboardwrapper2 device.

@PeterBowman
Copy link
Member Author

PeterBowman commented Jun 8, 2022

The disableImplicitNetworkWrapper is a temporary config option that will disappear in the future. There is another similar quirk to be considered: robotology/yarp#2819 has introduced support for the portprefix attribute/parameter in yarprobotinterface at YARP 3.7.

Old code (will be covered in this issue):

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE robot PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd">

<robot name="teo_head_nws" portprefix="/teoSim" build="0" xmlns:xi="http://www.w3.org/2001/XInclude">
    <devices>
        <device name="head_nws_yarp" type="controlBoard_nws_yarp">
            <param name="name">/teoSim/head</param>
            <param name="period">0.01</param>
            <action phase="startup" level="5" type="attach">
                <param name="device">controlboard_plugin_device</param>
            </action>
            <action phase="shutdown" level="5" type="detach" />
        </device>
    </devices>
</robot>

New code (to be applied after YARP 3.7 is well-established):

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE robot PUBLIC "-//YARP//DTD yarprobotinterface 3.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV3.0.dtd">

<robot name="teo_head_nws" portprefix="/teoSim" build="0" xmlns:xi="http://www.w3.org/2001/XInclude">
    <devices>
        <device name="head_nws_yarp" type="controlBoard_nws_yarp">
            <param name="name">/${portprefix}/head</param>
            <param name="period">0.01</param>
            <action phase="startup" level="5" type="attach">
                <param name="device">controlboard_plugin_device</param>
            </action>
            <action phase="shutdown" level="5" type="detach" />
        </device>
    </devices>
</robot>

Edit: portprefix done at 7a7f0c2.

@PeterBowman
Copy link
Member Author

PeterBowman commented Jun 8, 2022

cc @roboticslab-uc3m/teo: please update https://github.com/robotology/gazebo-yarp-plugins to v4.2+ in order to keep using our models (note this requires Gazebo 11).

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

1 participant