rqt_graph提示b‘Format: “dot“ not recognized. Use one of:\n‘

在终端运行roscore,分别运行rosrun turtlesim turtle和rosrun turtlesim turtle_teleop_key,再输入r

在终端运行roscore,分别运行rosrun turtlesim turtle和rosrun turtlesim turtle_teleop_key,再输入rqt_graph,提示如下错误

"dot" with args ['-Tdot', '/tmp/tmp145cvdav'] returned code: 1

stdout, stderr:
 b''
b'Format: "dot" not recognized. Use one of:\n'

PluginHandlerDirect._restore_settings() plugin "rqt_graph/RosGraph#0" raised an exception:
Traceback (most recent call last):
  File "/opt/ros/noetic/lib/python3/dist-packages/qt_gui/plugin_handler_direct.py", line 121, in _restore_settings
    self._plugin.restore_settings(plugin_settings_plugin, instance_settings_plugin)
  File "/opt/ros/noetic/lib/python3/dist-packages/rqt_graph/ros_graph.py", line 260, in restore_settings
    self._refresh_rosgraph()
  File "/opt/ros/noetic/lib/python3/dist-packages/rqt_graph/ros_graph.py", line 289, in _refresh_rosgraph
    self._update_graph_view(self._generate_dotcode())
  File "/opt/ros/noetic/lib/python3/dist-packages/rqt_graph/ros_graph.py", line 308, in _generate_dotcode

解决办法

在终端输入sudo dot -c