What to do if the node disappears in rqt_graph of ROS.
When launching rqt_graph from the console, an error occurs if dot_parser is not defined. It seems that the cause is that the dependency is broken by updating python.
$ rqt_graph
Couldn't import dot_parser, loading of dot files will not be possible.
PluginHandlerDirect._restore_settings() plugin "rqt_graph/RosGraph#0" raised an exception:
Traceback (most recent call last):
File "/opt/ros/indigo/lib/python2.7/dist-packages/qt_gui/plugin_handler_direct.py", line 116, in _restore_settings
self._plugin.restore_settings(plugin_settings_plugin, instance_settings_plugin)
File "/opt/ros/indigo/lib/python2.7/dist-packages/rqt_graph/ros_graph.py", line 206, in restore_settings
self._refresh_rosgraph()
File "/opt/ros/indigo/lib/python2.7/dist-packages/rqt_graph/ros_graph.py", line 231, in _refresh_rosgraph
self._update_graph_view(self._generate_dotcode())
File "/opt/ros/indigo/lib/python2.7/dist-packages/rqt_graph/ros_graph.py", line 266, in _update_graph_view
self._redraw_graph_view()
File "/opt/ros/indigo/lib/python2.7/dist-packages/rqt_graph/ros_graph.py", line 299, in _redraw_graph_view
same_label_siblings=True)
File "/opt/ros/indigo/lib/python2.7/dist-packages/qt_dotgraph/dot_to_qt.py", line 234, in dotcode_to_qt_items
graph = pydot.graph_from_dot_data(dotcode.encode("ascii", "ignore"))
File "/usr/lib/python2.7/dist-packages/pydot.py", line 220, in graph_from_dot_data
return dot_parser.parse_dot_data(data)
NameError: global name 'dot_parser' is not defined
Reinstall pydot and pyparsing
sudo chmod 777 -R /usr/lib/python2.7/dist-packages/
pip uninstall pydot
pip uninstall pyparsing
pip install pydot
pip install pyparsing
Rqt related packages disappeared in ROS indigo, and various things stopped working: Otter Festival http://kawauso-festival.blogspot.jp/2016/07/ros-indigorqt.html ... It may not be possible to repair without changing the version of pyparsing.
NameError: global name'dot_parser' is not defined and what to do when it comes up in python: qiita http://qiita.com/v_and_p/items/e6f0243d7d3cba5b7a2f
Recommended Posts