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

rqt on ROS2 - cannot export perspective - 'QtCore' is not defined

asked 2019-05-07 12:21:34 -0500

bergercookie gravatar image

updated 2019-05-08 03:12:24 -0500

gvdhoorn gravatar image

I've launched rqt and I'm getting the following error when I'm trying to save the current layout to a perspective file:

Traceback (most recent call last):
  File "/opt/ros/crystal/lib/python3.6/site-packages/qt_gui/perspective_manager.py", line 188, in save_settings_completed
    callback(*callback_args)
  File "/opt/ros/crystal/lib/python3.6/site-packages/qt_gui/perspective_manager.py", line 399, in _on_export_perspective_continued
    self._convert_values(data, self._export_value)
  File "/opt/ros/crystal/lib/python3.6/site-packages/qt_gui/perspective_manager.py", line 423, in _convert_values
    self._convert_values(groups[group], convert_function)
  File "/opt/ros/crystal/lib/python3.6/site-packages/qt_gui/perspective_manager.py", line 420, in _convert_values
    keys[key] = convert_function(keys[key])
  File "/opt/ros/crystal/lib/python3.6/site-packages/qt_gui/perspective_manager.py", line 460, in _export_value
    reimported = self._import_value(data)
  File "/opt/ros/crystal/lib/python3.6/site-packages/qt_gui/perspective_manager.py", line 429, in _import_value
    return QByteArray.fromHex(eval(value['repr(QByteArray.hex)']))
  File "<string>", line 1, in <module>
NameError: name 'QtCore' is not defined

I 'm using rqt on ROS 2. The same procedure is successful when launching the ROS 1 equivalent. Any pointers?

edit retag flag offensive close merge delete

Comments

Re-importing QtCore as follows solves it, but sounds more of a hack to me than an actual solution:

import python_qt_binding.QtCore as QtCore

bergercookie gravatar image bergercookie  ( 2019-05-07 12:36:25 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-06-06 09:56:21 -0500

marguedas gravatar image

I faced the same issue today and it looks like the code included this import until recently and it was (I believe involuntarily) removed. See https://github.com/ros-visualization/... for a PR to add it back

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-05-07 12:21:34 -0500

Seen: 262 times

Last updated: Jun 06 '19