Open iche033 opened 2 years ago
A potential fix is to use component that stores a list of visual plugins instead
We'll need some way of passing system information from the server to the client for #191. I was thinking of creating a component that stores a ignition::msgs::Plugin_V. Do you think that could address all the needs of the VisualPlugin
, @iche033 ? I think that would be better to serialize than an sdf::ElementPtr
.
I think so. As long as contents of the plugin.proto msg can be converted back to an sdf::ElementPtr
then it should be fine. For loading visual plugins, it comes down to this call on the GUI side:
https://github.com/ignitionrobotics/ign-gazebo/blob/ign-gazebo6/src/gui/GuiRunner.cc#L343-L344
Environment
Description
Visual plugin support on the GUI side is added in https://github.com/ignitionrobotics/ign-gazebo/pull/1275. However when multiple visual plugins are specified for a
<visual>
, only the last one will be loaded, see https://github.com/ignitionrobotics/ign-gazebo/pull/1335#issuecomment-1049728543This is mainly because we are only creating attaching one VisualPlugin component to a visual entity on the server side, which then get serialized and sent to the GUI side: https://github.com/ignitionrobotics/ign-gazebo/blob/0dead0578ba3f26cf97f8162e55a0dbe1112484c/src/SdfEntityCreator.cc#L752-L761
A potential fix is to use component that stores a list of visual plugins instead