ros-visualization/rviz — pull request #658 by bcharrow (2013-07-18 17:20:47+00:00)
Title: Select display type by topic

I'm interested in adding a feature that wjwwood came up with: creating displays based on compatible topics. The basic idea is to list visualizable topics alongside the displays that can visualize it. When the user makes a selection, the display gets created and the topic field is already populated.

I've got a proof of a concept with a tabbed interface to switch between the old way of adding displays and the new way. This is what's shown when you hit 'Add'
![bydisplay](https://f.cloud.github.com/assets/35095/820715/b7771252-efca-11e2-860c-bd2d2895f234.png)
![bytopic](https://f.cloud.github.com/assets/35095/820716/b94f757e-efca-11e2-8100-114184262b49.png)

I think this implementation in hacky and shouldn't be merged. I forked the new_display_dialog and customized it into AddDisplayDialog. One big issue is that in order to determine which types a plugin can build, AddDisplayDialog creates its own pluginloader, instantiates all of the plugins, and then accesses a new method that I added to the Display (see AddDisplayDialog::findPlugins)

I'm not sure how else to get this information to the dialog. It seems that at some point each plugin has to be instantiated so that a method can be called to determine which topic it visualizes. Any thoughts on how this could be improved?