rosrun rqt_reconfigure rqt_reconfigure时出现PluginManager._load_plugin() could not load plugin
在进行ros动态参数配置过程中,运行rosrun rqt_reconfigure rqt_reconfigure
出现一下问题
PluginManager._load_plugin() could not load plugin "rqt_reconfigure/Param": Traceback (most recent call last): File "/opt/ros/melodic/lib/python2.7/dist-packages/qt_gui/plugin_handler.py", line 102, in load self._load() File "/opt/ros/melodic/lib/python2.7/dist-packages/qt_gui/plugin_handler_direct.py", line 55, in _load self._plugin = self._plugin_provider.load(self._instance_id.plugin_id, self._context) File "/opt/ros/melodic/lib/python2.7/dist-packages/qt_gui/composite_plugin_provider.py", line 72, in load instance = plugin_provider.load(plugin_id, plugin_context) File "/opt/ros/melodic/lib/python2.7/dist-packages/qt_gui/composite_plugin_provider.py", line 72, in load instance = plugin_provider.load(plugin_id, plugin_context) File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_gui_py/ros_py_plugin_provider.py", line 61, in load return super(RosPyPluginProvider, self).load(plugin_id, plugin_context) File "/opt/ros/melodic/lib/python2.7/dist-packages/qt_gui/composite_plugin_provider.py", line 72, in load instance = plugin_provider.load(plugin_id, plugin_context) File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_gui/ros_plugin_provider.py", line 106, in load return class_ref(plugin_context) File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_reconfigure/param_plugin.py", line 51, in __init__ self._plugin_widget = ParamWidget(context) File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_reconfigure/param_widget.py", line 105, in __init__ self, rp, self.sig_sysmsg File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_reconfigure/node_selector_widget.py", line 102, in __init__ self._update_nodetree_pernode() File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_reconfigure/node_selector_widget.py", line 341, in _update_nodetree_pernode TreenodeQstdItem.NODE_FULLPATH File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_reconfigure/treenode_qstditem.py", line 94, in __init__ self._set_param_name(grn_current_treenode) File "/opt/ros/melodic/lib/python2.7/dist-packages/rqt_reconfigure/treenode_qstditem.py", line 246, in _set_param_name self._toplevel_treenode_name = self._list_treenode_names[0] IndexError: list index out of range
解决办法:
将/opt/ros/melodic/lib/python2.7/dist-packages/rqt_reconfigure/node_selector_widget.py文件中第325行改为if node_name_grn in self._nodeitems or node_name_grn == '':即可