ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Unable to use rqt_tf_tree in Noetic, dot error

asked 2022-06-28 09:32:36 -0500

dottant gravatar image

Hi guys, I'm developing on Ubuntu 20 with ROS Noetic full desktop completely updated but I'm struggling with an error I get if I try to run (but it also happens if I run rqt and later I use the TF plugin)

rosrun rqt_tf_tree rqt_tf_tree

The error is:

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

stdout, stderr:
 b''
b"Error: /tmp/tmp93jif2d2: syntax error in line 6 near ':'\n"

PluginHandlerDirect._restore_settings() plugin "rqt_tf_tree/RosTfTree#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_tf_tree/tf_tree.py", line 131, in restore_settings
    self._refresh_tf_graph()
  File "/opt/ros/noetic/lib/python3/dist-packages/rqt_tf_tree/tf_tree.py", line 143, in _refresh_tf_graph
    self._update_graph_view(self._generate_dotcode())
  File "/opt/ros/noetic/lib/python3/dist-packages/rqt_tf_tree/tf_tree.py", line 150, in _generate_dotcode
    return self.dotcode_generator.generate_dotcode(dotcode_factory=self.dotcode_factory,
  File "/opt/ros/noetic/lib/python3/dist-packages/rqt_tf_tree/dotcode_tf.py", line 98, in generate_dotcode
    self.dotcode = self.dotcode_factory.create_dot(self.graph)
  File "/opt/ros/noetic/lib/python3/dist-packages/qt_dotgraph/pydotfactory.py", line 175, in create_dot
    dot = graph.create_dot()
  File "/usr/lib/python3/dist-packages/pydot.py", line 1726, in new_method
    return self.create(
  File "/usr/lib/python3/dist-packages/pydot.py", line 1953, in create
    assert process.returncode == 0, process.returncode
AssertionError: 1

I tried to find something useful on the ROS Answer and on the web, I've seen some open ticket about error related to mine, but I've found just a couple of suggestions that for some people worked, for ex run on a terminal

sudo dot -c

or uninstall pyyaml which it's not possible to do, I get

Found existing installation: PyYAML 5.3.1
Not uninstalling pyyaml at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'PyYAML'. No files were found to uninstall.

No one worked for me. Can you help me? I really need to debug the TF tree in a proper way for a project
Thank you

edit retag flag offensive close merge delete

Comments

Is your /usr/bin/python file a symlink to python2 or python3?

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-06-28 16:21:32 -0500 )edit

I have a link to python2 as shared library and a link to python3 as executable

dottant gravatar image dottant  ( 2022-06-29 02:39:50 -0500 )edit

You didn't answer my question. This is what I get on my noetic install that runs that app just fine:

$ python --version
Python 3.8.10
Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-06-29 07:15:41 -0500 )edit

Yes, sorry, but for me a symlink is a file which points to another file and in that folder I have the ones i wrote about. Anyway I got the same

python3 --version
Python 3.8.10

If I try your same command line I get

Command 'python' not found, did you mean:

  command 'python3' from deb python3
  command 'python' from deb python-is-python3
dottant gravatar image dottant  ( 2022-06-29 09:33:11 -0500 )edit

I would advise having apt package python-is-python3 installed. Does that fix your issue?

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-06-29 09:40:32 -0500 )edit

Great job, thanks, it works!

dottant gravatar image dottant  ( 2022-06-29 10:05:20 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-06-29 10:34:07 -0500

Mike Scheutzow gravatar image

You need to install apt package python-is-python3.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2022-06-28 09:32:36 -0500

Seen: 333 times

Last updated: Jun 29 '22