You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Thanks for the bug report @Kettenhoax ! I don't think I'll get around to looking into it this week, but I'm happy to review a PR with a unit test during the week if you do come up with a fix.
Looking into this, I found that rqt plugins in general can't store QColors in perspective files. Since QColors are valid QVariants in terms of qt_gui_cpp::Settings, rqt_image_overlay doesn't violate api constraints as far as I could find.
I've opened an issue at ros-visualization/qt_gui_core#271, but would like to keep this one open.
Based on the upstream response we can serialize QColors in a different format instead.
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.
It seems the color associated with the layer can't be serialized.
The text was updated successfully, but these errors were encountered: