gz-sim
gz-sim copied to clipboard
Prompt user if they're missing necessary plugins
Desired behavior
One of the disadvantages of being so modular with what plugins are loaded is that users may not always know they're missing a necessary plugin. For example, the JointPositionController
GUI plugin will be publishing messages into the void unless the user has a position controller loaded on the server to listen to those messages. It would be great if the user were prompted the moment they open what plugin with a dialog saying
I see you're trying to control joints for model X, but I don't see any topics for that model. Would you like to load a controller from the list below?
Then they select a plugin and it's magically loaded on the server and everything just works :sparkles:
Alternatives considered
For JointPositionController
, we currently have a :question: button that shows a dialog with information:
But that still requires the user to stop the simulation, figure out what plugin to load, find out how to load it, and restart the simulation.
Implementation suggestion
For plugins that expect specific topics to be available, we could check if the topics are there.
We'll need a mechanism for the GUI to tell the server to load plugins. This overlaps in part with https://github.com/ignitionrobotics/ign-gazebo/issues/190
Additional context
It's important not to create a tight coupling between plugins, so users can switch plugins underneath the hood. For example, a different joint controller offering the same topics should work with the joint controller GUI. We should only offer to load a known plugin if we know that there aren't other equivalent plugins loaded, which we can tell by checking transport, for example.