0
$\begingroup$

Rosanswers logo

Hello, I am getting a trace error when I try to launch rqt.

Traceback (most recent call last):
      File "/opt/ros/melodic/bin/rqt", line 13, in <module>
        sys.exit(main.main())
      File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_gui/main.py", line 59, in main
        return super(Main, self).main(argv, standalone=standalone, plugin_argument_provider=plugin_argument_provider, plugin_manager_settings_prefix=str(hash(os.environ['ROS_PACKAGE_PATH'])))
      File "/opt/ros/melodic/lib/python2.7/dist-packages/qt_gui/main.py", line 596, in main
        plugin_manager.discover()
      File "/opt/ros/melodic/lib/python2.7/dist-packages/qt_gui/plugin_manager.py", line 125, in discover
        self._plugin_menu.add_plugin(plugin_descriptor)
      File "/opt/ros/melodic/lib/python2.7/dist-packages/qt_gui/plugin_menu.py", line 81, in add_plugin
        action = QAction(action_attributes['label'], menu_manager.menu)
    KeyError: 'label'

However, rqt launches correctly when I launch my plugin in standalone, e.g.:

rqt --standalone rqt_mypkg

The standard plugins such as rqt_graph and rqt_bag also work correctly.

Any ideas?


Originally posted by gallantandre on ROS Answers with karma: 3 on 2019-12-24

Post score: 0


Original comments

Comment by gallantandre on 2020-01-15:
Thank you for the comment. But the problem is not with my plugin, it is when I try to launch rqt via rqt command. It seems to have difficulty loading the menu bar.

When I launch my plugin or any other common plugins, there is no problem.

Comment by Dirk Thomas on 2020-01-15:
The second sentence of my previous comment still applies. You can also try rqt --clear-config.

Comment by gallantandre on 2020-01-15:
Hmm, I seem to be missing something. I am not trying to launch a plugin, so would there be a plugin.xml file? Is there a master plugin.xml file somewhere in the installation folder?

Also rqt --clear-config throws the exact same Traceback.

Comment by gallantandre on 2020-01-15:
OH! My bad, it was my plugin that was causing the problem! There was no label field and the rqt_gui could not add my plugin to the list in the menu!

Thank you so much!

Comment by Dirk Thomas on 2020-01-15:
I converted my first comment into an answer. Please consider checking the mail on the left of it to mark it as the right answer if it works for you. Thanks.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You might be missing the label tag in your plugin xml file? If you could point to your code or update the question with some of the content of your package (maybe the plugin.xml file will do it) we could give you more precise feedback.


Originally posted by Dirk Thomas with karma: 16276 on 2020-01-14

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by gallantandre on 2020-01-15:
Indeed, when the main rqt interface tries to load its menu, it looks for all plugins. For each plugin, it needs a label tag in the plugin.xml file.

The fact that my plugin worked in standalone mode caused my brain to turn into mush apparently.

Thanks

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.