关于ros调用rosrun rqt_graph rqt_graph报错的解决方法

报错信息

CompositePluginProvider.discover() could not discover plugins from provider "":
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/qt_gui/composite_plugin_provider.py", line 57, in discover
    plugin_descriptors = plugin_provider.discover(discovery_data)
  File "/opt/ros/noetic/lib/python3/dist-packages/rqt_gui/ros_plugin_provider.py", line 67, in discover
    plugin_descriptors += self._parse_plugin_xml(package_name, plugin_xml)
  File "/opt/ros/noetic/lib/python3/dist-packages/rqt_gui/ros_plugin_provider.py", line 128, in _parse_plugin_xml
    for library_el in root.getiterator('library'):
AttributeError: 'ElementTree' object has no attribute 'getiterator'

CompositePluginProvider.discover() could not discover plugins from provider "":
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/qt_gui/composite_plugin_provider.py", line 57, in discover
    plugin_descriptors = plugin_provider.discover(discovery_data)
  File "/opt/ros/noetic/lib/python3/dist-packages/qt_gui/recursive_plugin_provider.py", line 53, in discover
    plugin_descriptors = self._plugin_provider.discover(discovery_data)
  File "/opt/ros/noetic/lib/python3/dist-packages/rqt_gui/ros_plugin_provider.py", line 67, in discover
    plugin_descriptors += self._parse_plugin_xml(package_name, plugin_xml)
  File "/opt/ros/noetic/lib/python3/dist-packages/rqt_gui/ros_plugin_provider.py", line 128, in _parse_plugin_xml
    for library_el in root.getiterator('library'):
AttributeError: 'ElementTree' object has no attribute 'getiterator'

CompositePluginProvider.discover() could not discover plugins from provider "":
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/qt_gui/composite_plugin_provider.py", line 57, in discover
    plugin_descriptors = plugin_provider.discover(discovery_data)
  File "/opt/ros/noetic/lib/python3/dist-packages/qt_gui/recursive_plugin_provider.py", line 53, in discover
    plugin_descriptors = self._plugin_provider.discover(discovery_data)
  File "/opt/ros/noetic/lib/python3/dist-packages/rqt_gui/ros_plugin_provider.py", line 67, in discover
    plugin_descriptors += self._parse_plugin_xml(package_name, plugin_xml)
  File "/opt/ros/noetic/lib/python3/dist-packages/rqt_gui/ros_plugin_provider.py", line 128, in _parse_plugin_xml
    for library_el in root.getiterator('library'):
AttributeError: 'ElementTree' object has no attribute 'getiterator'

qt_gui_main() found no plugin matching "rqt_graph.ros_graph.RosGraph"
try passing the option "--force-discover"

解决方案

注意看一下自己的终端是否激活了conda,是由于rosrun rqt_graph rqt_graph和conda之间的冲突导致的。
运行:

conda deactivate
rosrun rqt_graph rqt_graph

问题解决!

你可能感兴趣的:(bug记录,自动驾驶,qt,人工智能)