gazebosim / gz-rviz

ROS 2 visualization using Gazebo Libraries
https://gazebosim.org
58 stars 9 forks source link

[GSoC] Visualization plugins placement #6

Open Sarath18 opened 4 years ago

Sarath18 commented 4 years ago

This ticket is concerned with how the visualization plugins are loaded and placed in ign-rviz.

Potential places to load visualization plugins:

  1. Dialog window on the top-right of ignition gui.
  2. Drawer Menu in ignition-gui. The save/load config options can then be moved to the dialog window.
  3. Add, Remove, Duplicate button in a master visualization Displays GUI plugin (similar to RViz)

After loading the plugins, where are these visualization plugins placed in the application GUI:

  1. Each plugin is loaded individually with their GUI configs and is split horizontally adding new visualization plugins (like GUI plugins in ign-gui)
  2. All the visualization plugins after loading are placed in a master Displays GUI plugin and can be configured from there. (like RViz)

In the scenario where multiple visualization plugins are loaded, option 1 might tend to clutter the GUI. I am not sure if option 2 is feasible.

@ahcorde, @chapulina can you help me figure out the right implementation for this problem?

chapulina commented 4 years ago

If I understand correctly, this question is about whether visualization plugins should have different placement from regular plugins.

As a reference, we used to have support for "display plugins" on ign-gui0. There was a plugin called Displays which was a regular ign-gui plugin:

https://github.com/ignitionrobotics/ign-gui/blob/560389770529d50a1b7c925c211ba0967fccd12b/include/ignition/gui/plugins/Displays.hh#L35-L45

And that plugin loaded within it other plugins that inherited from the DisplayPlugin class:

https://github.com/ignitionrobotics/ign-gui/blob/560389770529d50a1b7c925c211ba0967fccd12b/include/ignition/gui/DisplayPlugin.hh#L36-L37

You can see some screen captures of that at work here:

https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-gui/pull-requests/150/page/1

So I think that this would fit your options 3 and 2:

We don't need to follow the same structure, but I hope it's a helpful reference. One of the downsides to that approach was that we had a lot of duplicate code between Plugin and DisplayPlugin which would be nice to avoid.