When the node disappears in rqt_graph

Purpose

What to do if the node disappears in rqt_graph of ROS.

Symptoms

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

Coping

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

reference

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

When the node disappears in rqt_graph
Behavior when returning in the with block
When the target is Ubuntu 16.04 in Ansible
When the previous graph remains in Seaborn
Time when terminal disappears in Visual Studio Code
Precautions when installing packages in the conda environment
When the axis and label overlap in matplotlib
Embedding in datetime when only the time is known
When the variable name conflicts with the Devaga command in pdb
Master the type in Python? (When should type check be done)
Check in advance what happens when you execute the command
Solve the Japanese problem when using the CSV module in Python.
The minimum methods to remember when aggregating data in Pandas
Download the file in Python
Find the difference in Python
Attention when os.mkdir in Python
Methods available in the list
Be careful when specifying the default argument value in Python3 series
Automatically acquire the operation log in the terminal when logging in to Linux
[Linux] I want to know the date when the user logged in
I got an AttributeError when mocking the open method in python
Mode line when you open the appropriate Python code in Vim
[Linux] When the screen is cut off when installing CentOS in VirtualBox
The solution when an empty object is returned in go's json.Marshal
Animate what happens in frequency space when the Nyquist frequency is exceeded
First aid when EditWithIdle disappears from the Windwos Python right-click menu
What to do when the value type is ambiguous in Python?