gazebosim / gazebo-classic

Gazebo classic. For the latest version, see https://github.com/gazebosim/gz-sim
http://classic.gazebosim.org/
Other
1.21k stars 484 forks source link

correctly configure visual plugins via model editor #3268

Open BrettRD opened 2 years ago

BrettRD commented 2 years ago

Desired behavior

In the model editor, you can add plugins to the model. These plugins end up at the bottom of the SDF document.

Some plugins need to be in particular locations in the SDF document, such as libgazebo_ros_video.so, which needs to be inside a <visual> tag associated with a <link>

If the visual plugin is added by the model editor, it ends up in the wrong spot in the sdf and can't be loaded. However, it does appear in the model editor, and is listed under the world tab alongside the model links

Correctly configured Visual plugins do not appear in the plugin list in the model editor, and do not appear in the world tab under the model alongside the links

Alternatives considered

URDF files allow you to associate xml stubs with gazebo entities using a reference tag, this would allow users to hack around the issue by adding tags to the inner-xml of the plugin.

Implementation suggestion

Ideally, gazebo would search for plugins recursively into the xml tree, allowing visual plugins to be located under their respective visual tags, and the model editor would allow you to associate a plugin with a property of a link or model.

Additional context

https://classic.gazebosim.org/tutorials?tut=ros_gzplugins The video plugin in this tutorial cannot be listed by the model editor