Skip to content

rqt can't export a perspective with an active rqt_image_overlay layer plugin #57

@Kettenhoax

Description

@Kettenhoax

When trying to export an rqt perspective including a rqt_image_overlay instance with an active layer using the GUI, it fails with with a terminal-printed error.
The GUI doesn't show a warning or error.

Traceback (most recent call last):
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/perspective_manager.py", line 188, in save_settings_completed
    callback(*callback_args)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/perspective_manager.py", line 399, in _on_export_perspective_continued
    self._convert_values(data, self._export_value)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/perspective_manager.py", line 423, in _convert_values
    self._convert_values(groups[group], convert_function)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/perspective_manager.py", line 423, in _convert_values
    self._convert_values(groups[group], convert_function)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/perspective_manager.py", line 423, in _convert_values
    self._convert_values(groups[group], convert_function)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/perspective_manager.py", line 420, in _convert_values
    keys[key] = convert_function(keys[key])
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/perspective_manager.py", line 463, in _export_value
    reimported = self._import_value(data)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/perspective_manager.py", line 428, in _import_value
    return eval(value['repr'])
  File "<string>", line 1
    [{'Color': <PyQt5.QtGui.QColor object at 0x7f60b8b9e340>, 'Enabled': True, 'Plugin': 'overlay_test_plugins::EmptyLayer', 'Topic': '/data'}]
               ^
SyntaxError: invalid syntax

It seems the color associated with the layer can't be serialized.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions