From af50ec27838ba2d307d69581984564c6e30d494f Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Sat, 21 Nov 2026 23:48:16 +0000 Subject: [PATCH 01/10] lyrical, rolling: rqt_msg without rqt_py_common's missing constants helper rqt_msg imports get_message_constants_from_class from rqt_py_common, which no rqt_py_common release has (ros-visualization/rqt_msg#37), so the message, service and action type browsers fail to load. Fall back to a local implementation: constant names and values from the rosidl metaclass, their types from the installed interface file. Co-Authored-By: Claude Opus 5.5 --- distros/lyrical/patch/ros2-rqt-msg.patch | 44 ++++++++++++++++++++++++ distros/lyrical/pkg_additional_info.yaml | 2 ++ distros/rolling/patch/ros2-rqt-msg.patch | 44 ++++++++++++++++++++++++ distros/rolling/pkg_additional_info.yaml | 2 ++ 4 files changed, 92 insertions(+) create mode 100644 distros/lyrical/patch/ros2-rqt-msg.patch create mode 100644 distros/rolling/patch/ros2-rqt-msg.patch diff --git a/distros/lyrical/patch/ros2-rqt-msg.patch b/distros/lyrical/patch/ros2-rqt-msg.patch new file mode 100644 index 000000000..b106de0cd --- /dev/null +++ b/distros/lyrical/patch/ros2-rqt-msg.patch @@ -0,0 +1,44 @@ +diff --git a/src/rqt_msg/messages_tree_model.py b/src/rqt_msg/messages_tree_model.py +index b9cafa0..a4ff0b3 100644 +--- a/src/rqt_msg/messages_tree_model.py ++++ b/src/rqt_msg/messages_tree_model.py +@@ -33,7 +33,38 @@ + + from python_qt_binding.QtGui import QStandardItem + +-from rqt_py_common.message_helpers import get_message_constants_from_class ++try: ++ from rqt_py_common.message_helpers import get_message_constants_from_class ++except ImportError: ++ # RoboStack: no released rqt_py_common has this helper yet ++ # (https://github.com/ros-visualization/rqt_msg/issues/37) ++ import os ++ import re ++ ++ def get_message_constants_from_class(message): ++ """Return [(type, name, value)] of the constants of a message (instance or class).""" ++ msg_class = message if isinstance(message, type) else type(message) ++ metaclass = type(msg_class) ++ constants = getattr(metaclass, '_%s__constants' % metaclass.__name__, None) or {} ++ if not constants: ++ return [] ++ # the constant types are only in the interface file ++ types = {} ++ package = msg_class.__module__.split('.')[0] ++ kind = msg_class.__module__.split('.')[1] if '.' in msg_class.__module__ else 'msg' ++ name = re.sub(r'_(Request|Response|Event|Goal|Result|Feedback)$', '', msg_class.__name__) ++ try: ++ from ament_index_python.packages import get_package_share_directory ++ path = os.path.join(get_package_share_directory(package), kind, '%s.%s' % (name, kind)) ++ with open(path) as f: ++ for line in f: ++ match = re.match(r'\s*([\w/\[\]<=]+)\s+([A-Z][A-Z0-9_]*)\s*=', line) ++ if match: ++ types.setdefault(match.group(2), match.group(1)) ++ except Exception: # noqa: B902 (no interface file: fall back to the Python types) ++ pass ++ return [(types.get(n, type(v).__name__), n, v) for n, v in constants.items()] ++ + from rqt_py_common.message_tree_model import MessageTreeModel + + diff --git a/distros/lyrical/pkg_additional_info.yaml b/distros/lyrical/pkg_additional_info.yaml index cf261f400..7c7a40c44 100644 --- a/distros/lyrical/pkg_additional_info.yaml +++ b/distros/lyrical/pkg_additional_info.yaml @@ -148,6 +148,8 @@ rmf_utils: # its DLL moved to bin (Windows) build_number: 31 rmf_websocket: # its DLL moved to bin (Windows) build_number: 31 +rqt_msg: # rqt_msg#37 (constants helper) + build_number: 31 rqt_robot_monitor: # Qt6 patch (upstream PR #52) build_number: 31 rtabmap_rviz_plugins: diff --git a/distros/rolling/patch/ros2-rqt-msg.patch b/distros/rolling/patch/ros2-rqt-msg.patch new file mode 100644 index 000000000..b106de0cd --- /dev/null +++ b/distros/rolling/patch/ros2-rqt-msg.patch @@ -0,0 +1,44 @@ +diff --git a/src/rqt_msg/messages_tree_model.py b/src/rqt_msg/messages_tree_model.py +index b9cafa0..a4ff0b3 100644 +--- a/src/rqt_msg/messages_tree_model.py ++++ b/src/rqt_msg/messages_tree_model.py +@@ -33,7 +33,38 @@ + + from python_qt_binding.QtGui import QStandardItem + +-from rqt_py_common.message_helpers import get_message_constants_from_class ++try: ++ from rqt_py_common.message_helpers import get_message_constants_from_class ++except ImportError: ++ # RoboStack: no released rqt_py_common has this helper yet ++ # (https://github.com/ros-visualization/rqt_msg/issues/37) ++ import os ++ import re ++ ++ def get_message_constants_from_class(message): ++ """Return [(type, name, value)] of the constants of a message (instance or class).""" ++ msg_class = message if isinstance(message, type) else type(message) ++ metaclass = type(msg_class) ++ constants = getattr(metaclass, '_%s__constants' % metaclass.__name__, None) or {} ++ if not constants: ++ return [] ++ # the constant types are only in the interface file ++ types = {} ++ package = msg_class.__module__.split('.')[0] ++ kind = msg_class.__module__.split('.')[1] if '.' in msg_class.__module__ else 'msg' ++ name = re.sub(r'_(Request|Response|Event|Goal|Result|Feedback)$', '', msg_class.__name__) ++ try: ++ from ament_index_python.packages import get_package_share_directory ++ path = os.path.join(get_package_share_directory(package), kind, '%s.%s' % (name, kind)) ++ with open(path) as f: ++ for line in f: ++ match = re.match(r'\s*([\w/\[\]<=]+)\s+([A-Z][A-Z0-9_]*)\s*=', line) ++ if match: ++ types.setdefault(match.group(2), match.group(1)) ++ except Exception: # noqa: B902 (no interface file: fall back to the Python types) ++ pass ++ return [(types.get(n, type(v).__name__), n, v) for n, v in constants.items()] ++ + from rqt_py_common.message_tree_model import MessageTreeModel + + diff --git a/distros/rolling/pkg_additional_info.yaml b/distros/rolling/pkg_additional_info.yaml index ff6c5e9c7..8c57d8c36 100644 --- a/distros/rolling/pkg_additional_info.yaml +++ b/distros/rolling/pkg_additional_info.yaml @@ -94,6 +94,8 @@ rmf_utils: # its DLL moved to bin (Windows) build_number: 33 rmf_websocket: # its DLL moved to bin (Windows) build_number: 33 +rqt_msg: # rqt_msg#37 (constants helper) + build_number: 33 rviz_2d_overlay_plugins: build_number: 33 rviz_common: From c3a0954a1a714e484f292dfd9f7dfe68efbadd82 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Sat, 21 Nov 2026 23:48:16 +0000 Subject: [PATCH 02/10] humble, jazzy: Qt 6 for rqt, rviz and their plugins; class_loader and rqt fixes jazzy: - rqt on PyQt6 / Qt 6 like humble: python_qt_binding, qt_gui, qt_gui_cpp (its extras now say Qt 6), rqt_gui_cpp, rqt_image_view, rqt_py_common, ros_image_to_qimage, rqt_image_overlay(_layer), plansys2_tools, py_trees_ros_tutorials. - rviz on Qt 6: backport of ros2/rviz#1187, #1475, #1592, #1596 for rviz_common, rviz_rendering, rviz_default_plugins, rviz2, rviz_visual_testing_framework, rviz_rendering_tests; and every package linking it: rviz_imu_plugin, rviz_2d_overlay_plugins, rviz_satellite, rviz_visual_tools, vision_msgs_rviz_plugins, grid_map_rviz_plugin, octomap_rviz_plugins, nav2_rviz_plugins (QtStateMachine via qt6-scxml), slam_toolbox, fuse_viz, navmap_rviz_plugin, rtabmap_rviz_plugins, moveit_ros_visualization, moveit_setup_* (QStringRef, QRegExp), moveit_setup_assistant, moveit_task_constructor_visualization. - turtlesim and swri_console on Qt 6. - class_loader: construct console_bridge's output handler before the static loader vector, so it outlives it; fixes the abort on exit of every rqt on macOS (ros/class_loader#252). humble: - python_qt_binding: PyQt5 compatibility layer on PyQt6 (enum members, exec_, moved classes, QRegExp, QComboBox signal overloads, QModelIndex.child, ...), without which qt_gui itself fails to import (QtCriticalMsg) and rqt does not start. - turtlesim on Qt 6; no Qt 5 run dependency for the rqt packages already on Qt 6. both: rqt_msg without rqt_py_common's missing constants helper (rqt_msg#37). Build numbers bumped for every changed package. Co-Authored-By: Claude Opus 5.5 --- distros/humble/patch/dependencies.yaml | 19 + .../humble/patch/ros2-python-qt-binding.patch | 423 ++++++++++-- distros/humble/patch/ros2-rqt-msg.patch | 44 ++ distros/humble/patch/ros2-turtlesim.patch | 36 + distros/humble/pkg_additional_info.yaml | 18 + distros/jazzy/patch/dependencies.yaml | 204 +++++- distros/jazzy/patch/ros2-class-loader.patch | 23 + distros/jazzy/patch/ros2-fuse-viz.patch | 29 + .../patch/ros2-grid-map-rviz-plugin.patch | 31 + .../patch/ros2-moveit-ros-visualization.patch | 68 ++ .../patch/ros2-moveit-setup-app-plugins.patch | 13 + .../patch/ros2-moveit-setup-assistant.patch | 35 + .../patch/ros2-moveit-setup-controllers.patch | 13 + .../ros2-moveit-setup-core-plugins.patch | 26 + .../patch/ros2-moveit-setup-framework.patch | 67 +- .../ros2-moveit-setup-srdf-plugins.patch | 57 ++ .../jazzy/patch/ros2-nav2-rviz-plugins.patch | 73 +- .../patch/ros2-octomap-rviz-plugins.patch | 31 +- .../patch/ros2-py-trees-ros-tutorials.patch | 212 ++++++ .../jazzy/patch/ros2-python-qt-binding.patch | 637 ++++++++++++++++-- distros/jazzy/patch/ros2-qt-gui-cpp.patch | 206 +++++- .../patch/ros2-ros-image-to-qimage.patch | 31 + .../jazzy/patch/ros2-rqt-gui-cpp.linux.patch | 27 + distros/jazzy/patch/ros2-rqt-gui-cpp.patch | 22 + .../patch/ros2-rqt-image-overlay-layer.patch | 22 + .../jazzy/patch/ros2-rqt-image-overlay.patch | 39 ++ distros/jazzy/patch/ros2-rqt-image-view.patch | 61 +- distros/jazzy/patch/ros2-rqt-msg.patch | 44 ++ .../patch/ros2-rtabmap-rviz-plugins.patch | 13 + distros/jazzy/patch/ros2-rviz-common.patch | 340 ++++++++++ .../patch/ros2-rviz-default-plugins.patch | 421 ++++++++++++ .../jazzy/patch/ros2-rviz-imu-plugin.patch | 45 ++ .../patch/ros2-rviz-rendering-tests.patch | 20 + distros/jazzy/patch/ros2-rviz-rendering.patch | 195 ++++++ distros/jazzy/patch/ros2-rviz-satellite.patch | 14 + .../ros2-rviz-visual-testing-framework.patch | 63 ++ .../jazzy/patch/ros2-rviz-visual-tools.patch | 14 + distros/jazzy/patch/ros2-rviz2.patch | 64 ++ distros/jazzy/patch/ros2-slam-toolbox.patch | 68 +- distros/jazzy/patch/ros2-turtlesim.patch | 40 ++ .../patch/ros2-vision-msgs-rviz-plugins.patch | 31 + distros/jazzy/pkg_additional_info.yaml | 82 +++ 42 files changed, 3763 insertions(+), 158 deletions(-) create mode 100644 distros/humble/patch/ros2-rqt-msg.patch create mode 100644 distros/humble/patch/ros2-turtlesim.patch create mode 100644 distros/jazzy/patch/ros2-class-loader.patch create mode 100644 distros/jazzy/patch/ros2-fuse-viz.patch create mode 100644 distros/jazzy/patch/ros2-grid-map-rviz-plugin.patch create mode 100644 distros/jazzy/patch/ros2-moveit-setup-app-plugins.patch create mode 100644 distros/jazzy/patch/ros2-moveit-setup-assistant.patch create mode 100644 distros/jazzy/patch/ros2-moveit-setup-controllers.patch create mode 100644 distros/jazzy/patch/ros2-moveit-setup-core-plugins.patch create mode 100644 distros/jazzy/patch/ros2-moveit-setup-srdf-plugins.patch create mode 100644 distros/jazzy/patch/ros2-py-trees-ros-tutorials.patch create mode 100644 distros/jazzy/patch/ros2-ros-image-to-qimage.patch create mode 100644 distros/jazzy/patch/ros2-rqt-gui-cpp.linux.patch create mode 100644 distros/jazzy/patch/ros2-rqt-gui-cpp.patch create mode 100644 distros/jazzy/patch/ros2-rqt-image-overlay-layer.patch create mode 100644 distros/jazzy/patch/ros2-rqt-image-overlay.patch create mode 100644 distros/jazzy/patch/ros2-rqt-msg.patch create mode 100644 distros/jazzy/patch/ros2-rtabmap-rviz-plugins.patch create mode 100644 distros/jazzy/patch/ros2-rviz-common.patch create mode 100644 distros/jazzy/patch/ros2-rviz-default-plugins.patch create mode 100644 distros/jazzy/patch/ros2-rviz-imu-plugin.patch create mode 100644 distros/jazzy/patch/ros2-rviz-rendering-tests.patch create mode 100644 distros/jazzy/patch/ros2-rviz-rendering.patch create mode 100644 distros/jazzy/patch/ros2-rviz-satellite.patch create mode 100644 distros/jazzy/patch/ros2-rviz-visual-testing-framework.patch create mode 100644 distros/jazzy/patch/ros2-rviz-visual-tools.patch create mode 100644 distros/jazzy/patch/ros2-rviz2.patch create mode 100644 distros/jazzy/patch/ros2-turtlesim.patch create mode 100644 distros/jazzy/patch/ros2-vision-msgs-rviz-plugins.patch diff --git a/distros/humble/patch/dependencies.yaml b/distros/humble/patch/dependencies.yaml index edc2dc165..510d5481c 100644 --- a/distros/humble/patch/dependencies.yaml +++ b/distros/humble/patch/dependencies.yaml @@ -84,6 +84,11 @@ parameter_traits: add_run: ["cpp-expected"] pcl_conversions: add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "libboost-devel"] +plansys2_tools: + # rqt plugin: Qt 6 like rqt_gui_cpp + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] plotjuggler: add_host: ["libxcb", "${{ 'elfutils' if linux }}", "ros2-ros-workspace", "git-lfs"] polygon_rviz_plugins: @@ -146,6 +151,7 @@ ros_image_to_qimage: # Same PyQt6 port as qt_gui_cpp/rqt_gui_cpp above (patch/ros2-ros-image-to-qimage.patch). remove_host: ["qt-main"] add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] + remove_run: ["qt-main"] rqt_gui_cpp: remove_host: ["qt-main"] add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] @@ -153,16 +159,24 @@ rqt_image_overlay: # Same PyQt6 port as qt_gui_cpp/rqt_gui_cpp above (patch/ros2-rqt-image-overlay.patch). remove_host: ["qt-main"] add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] + remove_run: ["qt-main"] rqt_image_overlay_layer: # Same PyQt6 port as qt_gui_cpp/rqt_gui_cpp above (patch/ros2-rqt-image-overlay-layer.patch). remove_host: ["qt-main"] add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] + remove_run: ["qt-main"] rqt_image_view: remove_host: ["qt-main"] add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] +rqt_mocap4r2_control: + # rqt plugin: Qt 6 like rqt_gui_cpp + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] rqt_py_common: remove_host: ["qt-main"] add_host: ["qt6-main"] + remove_run: ["qt-main"] rtabmap: add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "ceres-solver", "${{ 'libdc1394' if not win }}", "libusb", "vtk"] remove_host: ["ros2-qt-gui-cpp"] @@ -184,6 +198,11 @@ spdlog_vendor: add_run: ["spdlog"] tracetools: remove_host: ["pkg-config"] +turtlesim: + # Qt 6 (patch/ros2-turtlesim.patch), like rqt + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] uncrustify_vendor: add_host: ["uncrustify"] add_run: ["uncrustify"] diff --git a/distros/humble/patch/ros2-python-qt-binding.patch b/distros/humble/patch/ros2-python-qt-binding.patch index 3e3f20764..76ec16947 100644 --- a/distros/humble/patch/ros2-python-qt-binding.patch +++ b/distros/humble/patch/ros2-python-qt-binding.patch @@ -1,7 +1,8 @@ -diff -ruN a/CMakeLists.txt b/CMakeLists.txt +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 919969e..1f6b885 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -11,6 +11,8 @@ +@@ -11,6 +11,8 @@ install(FILES cmake/shiboken_helper.cmake cmake/sip_configure.py cmake/sip_helper.cmake @@ -10,8 +11,47 @@ diff -ruN a/CMakeLists.txt b/CMakeLists.txt DESTINATION share/${PROJECT_NAME}/cmake) if(BUILD_TESTING) -diff -ruN a/cmake/pyproject.toml.in b/cmake/pyproject.toml.in ---- a/cmake/pyproject.toml.in +diff --git a/cmake/fixup_sip_module_name.py b/cmake/fixup_sip_module_name.py +new file mode 100644 +index 0000000..934af4e +--- /dev/null ++++ b/cmake/fixup_sip_module_name.py +@@ -0,0 +1,31 @@ ++#!/usr/bin/env python3 ++"""Copy PyQt-builder's ABI-tagged sip module to the plain name CMake expects. ++ ++PyQt-builder's pip-based wheel install places the compiled module under a ++Python-ABI-tagged filename using Python's own extension suffix (e.g. ++libfoo.cpython-312-x86_64-linux-gnu.so -- always .so, even on macOS, since ++that's the suffix CPython's import machinery requires for C extensions) ++rather than the plain lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} that ++build_sip_binding()'s callers (and the install() step) expect -- which on ++macOS is .dylib, not .so. So the match can't assume the same extension as ++`want`; only the base name is reliable. Searches recursively since pip ++--target layout can nest the module in a subdirectory, and fails loudly ++(rather than leaving a confusing later "file INSTALL cannot find" CMake ++error) when nothing matches. ++""" ++import glob ++import os ++import shutil ++import sys ++ ++library_dir, want = sys.argv[1], sys.argv[2] ++base = os.path.splitext(want)[0] ++pattern = base + '.*' ++hits = [ ++ f for f in glob.glob(os.path.join(library_dir, '**', pattern), recursive=True) ++ if os.path.basename(f) != want ++] ++if hits: ++ shutil.copyfile(hits[0], os.path.join(library_dir, want)) ++else: ++ available = [] +diff --git a/cmake/pyproject.toml.in b/cmake/pyproject.toml.in +new file mode 100644 +index 0000000..e6263dc +--- /dev/null +++ b/cmake/pyproject.toml.in @@ -0,0 +1,27 @@ +# Specify sip v5 as the build system for the package. @@ -41,10 +81,11 @@ diff -ruN a/cmake/pyproject.toml.in b/cmake/pyproject.toml.in +qmake-QT = ["widgets"] +exceptions = true + -diff -ruN a/cmake/sip_configure.py b/cmake/sip_configure.py +diff --git a/cmake/sip_configure.py b/cmake/sip_configure.py +index 708b04c..5620533 100644 --- a/cmake/sip_configure.py +++ b/cmake/sip_configure.py -@@ -179,6 +179,7 @@ +@@ -179,6 +179,7 @@ makefile._target = '"%s"' % os.path.join(output_dir, makefile._target) # Force c++14 if sys.platform == 'win32': makefile.extra_cxxflags.append('/std:c++14') @@ -52,48 +93,11 @@ diff -ruN a/cmake/sip_configure.py b/cmake/sip_configure.py # The __cplusplus flag is not properly set on Windows for backwards # compatibilty. This flag sets it correctly makefile.CXXFLAGS.append('/Zc:__cplusplus') -diff -ruN a/cmake/fixup_sip_module_name.py b/cmake/fixup_sip_module_name.py ---- /dev/null -+++ b/cmake/fixup_sip_module_name.py -@@ -0,0 +1,31 @@ -+#!/usr/bin/env python3 -+"""Copy PyQt-builder's ABI-tagged sip module to the plain name CMake expects. -+ -+PyQt-builder's pip-based wheel install places the compiled module under a -+Python-ABI-tagged filename using Python's own extension suffix (e.g. -+libfoo.cpython-312-x86_64-linux-gnu.so -- always .so, even on macOS, since -+that's the suffix CPython's import machinery requires for C extensions) -+rather than the plain lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} that -+build_sip_binding()'s callers (and the install() step) expect -- which on -+macOS is .dylib, not .so. So the match can't assume the same extension as -+`want`; only the base name is reliable. Searches recursively since pip -+--target layout can nest the module in a subdirectory, and fails loudly -+(rather than leaving a confusing later "file INSTALL cannot find" CMake -+error) when nothing matches. -+""" -+import glob -+import os -+import shutil -+import sys -+ -+library_dir, want = sys.argv[1], sys.argv[2] -+base = os.path.splitext(want)[0] -+pattern = base + '.*' -+hits = [ -+ f for f in glob.glob(os.path.join(library_dir, '**', pattern), recursive=True) -+ if os.path.basename(f) != want -+] -+if hits: -+ shutil.copyfile(hits[0], os.path.join(library_dir, want)) -+else: -+ available = [] -+ for root, _dirs, files in os.walk(library_dir): -+ available.extend(os.path.relpath(os.path.join(root, f), library_dir) for f in files) -+ sys.exit(f"fixup_sip_module_name.py: no file matching {pattern!r} found under {library_dir}; contents: {available}") -diff -ruN a/cmake/sip_helper.cmake b/cmake/sip_helper.cmake +diff --git a/cmake/sip_helper.cmake b/cmake/sip_helper.cmake +index 41aec4b..b02ab90 100644 --- a/cmake/sip_helper.cmake +++ b/cmake/sip_helper.cmake -@@ -15,7 +15,7 @@ +@@ -15,7 +15,7 @@ execute_process( if(PYTHON_SIP_EXECUTABLE) string(STRIP ${PYTHON_SIP_EXECUTABLE} SIP_EXECUTABLE) else() @@ -102,7 +106,7 @@ diff -ruN a/cmake/sip_helper.cmake b/cmake/sip_helper.cmake endif() if(SIP_EXECUTABLE) -@@ -26,6 +26,29 @@ +@@ -26,6 +26,29 @@ else() set(sip_helper_NOTFOUND TRUE) endif() @@ -132,7 +136,7 @@ diff -ruN a/cmake/sip_helper.cmake b/cmake/sip_helper.cmake # # Run the SIP generator and compile the generated code into a library. # -@@ -77,37 +100,114 @@ +@@ -77,37 +100,114 @@ function(build_sip_binding PROJECT_NAME SIP_FILE) set(LIBRARY_DIRS ${${PROJECT_NAME}_LIBRARY_DIRS}) set(LDFLAGS_OTHER ${${PROJECT_NAME}_LDFLAGS_OTHER}) @@ -271,10 +275,11 @@ diff -ruN a/cmake/sip_helper.cmake b/cmake/sip_helper.cmake COMMENT "Meta target for ${PROJECT_NAME} Python bindings..." ) add_dependencies(lib${PROJECT_NAME} ${sip_DEPENDENCIES}) -diff -ruN a/src/python_qt_binding/__init__.py b/src/python_qt_binding/__init__.py +diff --git a/src/python_qt_binding/__init__.py b/src/python_qt_binding/__init__.py +index 1e209de..6b789a1 100644 --- a/src/python_qt_binding/__init__.py +++ b/src/python_qt_binding/__init__.py -@@ -66,3 +66,11 @@ +@@ -66,3 +66,11 @@ for module_name, module in QT_BINDING_MODULES.items(): del module del sys @@ -286,10 +291,25 @@ diff -ruN a/src/python_qt_binding/__init__.py b/src/python_qt_binding/__init__.p +QIcon.setThemeSearchPaths(current_theme_path + [os.path.join(conda_path, 'share/icons/')]) +QIcon.setThemeName('Adwaita') +del os -diff -ruN a/src/python_qt_binding/binding_helper.py b/src/python_qt_binding/binding_helper.py +diff --git a/src/python_qt_binding/binding_helper.py b/src/python_qt_binding/binding_helper.py +index 603e1e2..9dc24c6 100644 --- a/src/python_qt_binding/binding_helper.py +++ b/src/python_qt_binding/binding_helper.py -@@ -150,9 +150,9 @@ +@@ -90,6 +90,8 @@ def _select_qt_binding(binding_name=None, binding_order=None): + 'QtTest', + 'QtWebChannel', + 'QtWebEngine', # Qt 5.6 and higher ++ 'QtOpenGLWidgets', # Qt 6 ++ 'QtSvgWidgets', # Qt 6 + 'QtWebEngineCore', + 'QtWebEngineWidgets', + 'QtWebKitWidgets', # Qt 5.0 - 5.5 +@@ -146,34 +148,314 @@ def _named_optional_import(name): + + def _load_pyqt(required_modules, optional_modules): + # set environment variable QT_API for matplotlib +- os.environ['QT_API'] = 'pyqt' ++ os.environ['QT_API'] = 'pyqt6' # register required and optional PyQt modules for module_name in required_modules: @@ -301,16 +321,16 @@ diff -ruN a/src/python_qt_binding/binding_helper.py b/src/python_qt_binding/bind # set some names for compatibility with PySide sys.modules['QtCore'].Signal = sys.modules['QtCore'].pyqtSignal -@@ -161,19 +161,19 @@ + sys.modules['QtCore'].Slot = sys.modules['QtCore'].pyqtSlot + sys.modules['QtCore'].Property = sys.modules['QtCore'].pyqtProperty - # try to register Qwt module - try: +- # try to register Qwt module +- try: - import PyQt5.Qwt5 - _register_binding_module('Qwt', PyQt5.Qwt5) -+ import PyQt6.Qwt5 -+ _register_binding_module('Qwt', PyQt6.Qwt5) - except ImportError: - pass +- except ImportError: +- pass ++ _qt5_compatibility() global _loadUi @@ -323,6 +343,291 @@ diff -ruN a/src/python_qt_binding/binding_helper.py b/src/python_qt_binding/bind - return PyQt5.QtCore.PYQT_VERSION_STR + import PyQt6.QtCore + return PyQt6.QtCore.PYQT_VERSION_STR ++ ++ ++def _make_qregexp(QtCore): ++ """Qt 5's QRegExp, on QRegularExpression (the parts plugins use).""" ++ QRegularExpression = QtCore.QRegularExpression ++ CaseInsensitive = QtCore.Qt.CaseSensitivity.CaseInsensitive ++ ++ class QRegExp(QRegularExpression): ++ RegExp, Wildcard, FixedString, RegExp2, WildcardUnix, W3CXmlSchema11 = range(6) ++ # QRegExp.PatternSyntax(n): the syntax values are plain ints here ++ PatternSyntax = int ++ ++ def __init__(self, pattern='', cs=QtCore.Qt.CaseSensitivity.CaseSensitive, syntax=0): ++ if isinstance(pattern, QRegularExpression): ++ pattern = pattern.pattern() ++ self._source, self._syntax, self._captures = pattern, syntax, [] ++ if syntax in (QRegExp.Wildcard, QRegExp.WildcardUnix): ++ pattern = QRegularExpression.wildcardToRegularExpression(pattern) ++ elif syntax == QRegExp.FixedString: ++ pattern = QRegularExpression.escape(pattern) ++ options = QRegularExpression.PatternOption.NoPatternOption ++ if cs == CaseInsensitive: ++ options = QRegularExpression.PatternOption.CaseInsensitiveOption ++ super(QRegExp, self).__init__(pattern, options) ++ ++ def _keep(self, match): ++ self._captures = list(match.capturedTexts()) if match.hasMatch() else [] ++ return match ++ ++ def exactMatch(self, text): ++ whole = QRegularExpression( ++ QRegularExpression.anchoredPattern(self.pattern()), self.patternOptions()) ++ return self._keep(whole.match(text)).hasMatch() ++ ++ def indexIn(self, text, offset=0): ++ match = self._keep(self.match(text, offset)) ++ return match.capturedStart(0) if match.hasMatch() else -1 ++ ++ def cap(self, n=0): ++ return self._captures[n] if n < len(self._captures) else '' ++ ++ def capturedTexts(self): ++ return list(self._captures) ++ ++ def matchedLength(self): ++ return len(self._captures[0]) if self._captures else -1 ++ ++ def isEmpty(self): ++ return not self._source ++ ++ def setCaseSensitivity(self, cs): ++ options = self.patternOptions() ++ if cs == CaseInsensitive: ++ options |= QRegularExpression.PatternOption.CaseInsensitiveOption ++ else: ++ options &= ~QRegularExpression.PatternOption.CaseInsensitiveOption ++ self.setPatternOptions(options) ++ ++ def caseSensitivity(self): ++ if self.patternOptions() & QRegularExpression.PatternOption.CaseInsensitiveOption: ++ return CaseInsensitive ++ return QtCore.Qt.CaseSensitivity.CaseSensitive ++ ++ return QRegExp ++ ++ ++def _qt5_compatibility(): ++ """Let code written for PyQt5 (most rqt plugins) run on PyQt6 (RoboStack). ++ ++ - enum values also as attributes of their class (Qt.AlignLeft, not only ++ Qt.AlignmentFlag.AlignLeft), as PyQt5 had them ++ - exec_() next to exec() ++ - the classes Qt 6 moved from QtWidgets to QtGui also in QtWidgets ++ - a few Qt 5 methods Qt 6 dropped, as their replacements ++ """ ++ import enum ++ ++ modules = [sys.modules[name] for name in ('QtCore', 'QtGui', 'QtWidgets', 'QtSvg', ++ 'QtOpenGL', 'QtOpenGLWidgets', 'QtNetwork', 'QtPrintSupport') if name in sys.modules] ++ for module in modules: ++ for class_name in dir(module): ++ if not class_name.startswith('Q'): ++ continue ++ cls = getattr(module, class_name) ++ # module-level enums (QtCore.QtMsgType: QtCore.QtCriticalMsg, ...) ++ if isinstance(cls, enum.EnumMeta): ++ for name, member in cls.__members__.items(): ++ if not hasattr(module, name): ++ setattr(module, name, member) ++ continue ++ if not isinstance(cls, type): ++ continue ++ for attr_name in dir(cls): ++ if not attr_name[:1].isupper(): ++ continue ++ attr = getattr(cls, attr_name, None) ++ if isinstance(attr, enum.EnumMeta): ++ # int(enum value), as with PyQt5's int-like enums ++ if not issubclass(attr, int) and '__int__' not in attr.__dict__: ++ try: ++ attr.__int__ = lambda self: int(self.value) ++ attr.__index__ = lambda self: int(self.value) ++ except (AttributeError, TypeError): ++ pass ++ # __members__: also aliases and flag combinations (Qt.AllDockWidgetAreas) ++ for name, member in attr.__members__.items(): ++ if name not in cls.__dict__: ++ try: ++ setattr(cls, name, member) ++ except (AttributeError, TypeError): ++ pass ++ if 'exec' in dir(cls) and 'exec_' not in dir(cls): ++ try: ++ cls.exec_ = cls.exec ++ except (AttributeError, TypeError): ++ pass ++ ++ QtCore = sys.modules.get('QtCore') ++ QtGui = sys.modules.get('QtGui') ++ QtWidgets = sys.modules.get('QtWidgets') ++ if QtCore is not None: ++ if not hasattr(QtCore.Qt, 'MidButton'): ++ QtCore.Qt.MidButton = QtCore.Qt.MouseButton.MiddleButton ++ # Qt.CTRL + Qt.Key_S (Qt 5 ints): Qt 6 combines a modifier and a key into a ++ # QKeyCombination (Qt.ControlModifier | Qt.Key_S), which QKeySequence and QShortcut take ++ if hasattr(QtCore, 'QKeyCombination'): ++ Qt = QtCore.Qt ++ ++ def _key_add(self, other): ++ if isinstance(other, (Qt.Modifier, Qt.KeyboardModifier)): ++ return Qt.KeyboardModifier(int(self.value) | int(other.value)) ++ if isinstance(other, Qt.Key): ++ return QtCore.QKeyCombination(Qt.KeyboardModifier(int(self.value)), other) ++ return NotImplemented ++ for modifier_enum in (Qt.Modifier, Qt.KeyboardModifier): ++ try: ++ modifier_enum.__add__ = _key_add ++ modifier_enum.__radd__ = _key_add ++ except (AttributeError, TypeError): ++ pass ++ # QMutex(QMutex.Recursive): Qt 6 has QRecursiveMutex instead ++ if not hasattr(QtCore.QMutex, 'Recursive') and hasattr(QtCore, 'QRecursiveMutex'): ++ class QMutex(QtCore.QMutex): ++ NonRecursive = 0 ++ Recursive = 1 ++ ++ def __new__(cls, mode=0): ++ if mode == 1: ++ return QtCore.QRecursiveMutex() ++ return super().__new__(cls) ++ ++ def __init__(self, mode=0): ++ super().__init__() ++ QtCore.QMutex = QMutex ++ # QRegExp (gone from Qt 6's QtCore): a QRegularExpression with QRegExp's API, so that ++ # it also works where Qt 6 takes a QRegularExpression (findChildren, validators) ++ if not hasattr(QtCore, 'QRegExp'): ++ QtCore.QRegExp = _make_qregexp(QtCore) ++ # QModelIndex.child(row, column), removed in Qt 6 ++ if not hasattr(QtCore.QModelIndex, 'child'): ++ def _child(self, row, column): ++ model = self.model() ++ return model.index(row, column, self) if model is not None else QtCore.QModelIndex() ++ QtCore.QModelIndex.child = _child ++ # QSortFilterProxyModel.filterRegExp / setFilterRegExp: Qt 6 only has the ++ # QRegularExpression variants (the QRegExp above is one) ++ proxy = getattr(QtCore, 'QSortFilterProxyModel', None) ++ if proxy is not None and not hasattr(proxy, 'filterRegExp'): ++ def _filter_regexp(self): ++ regex = self.filterRegularExpression() ++ return QtCore.QRegExp(regex.pattern(), self.filterCaseSensitivity()) ++ ++ def _set_filter_regexp(self, regex): ++ if not isinstance(regex, QtCore.QRegularExpression): ++ regex = QtCore.QRegExp(regex) ++ self.setFilterRegularExpression(regex) ++ proxy.filterRegExp = _filter_regexp ++ proxy.setFilterRegExp = _set_filter_regexp ++ # QSignalMapper.mapped[int / str / QObject]: Qt 6 has mappedInt, mappedString, mappedObject ++ if hasattr(QtCore, 'QSignalMapper') and not hasattr(QtCore.QSignalMapper, 'mapped'): ++ class _Mapped(object): ++ def __init__(self, mapper): ++ self._mapper = mapper ++ ++ def __getitem__(self, signal_type): ++ if signal_type is int: ++ return self._mapper.mappedInt ++ if signal_type is str: ++ return self._mapper.mappedString ++ return self._mapper.mappedObject ++ ++ def connect(self, slot): ++ return self._mapper.mappedInt.connect(slot) ++ ++ def disconnect(self, *args): ++ return self._mapper.mappedInt.disconnect(*args) ++ QtCore.QSignalMapper.mapped = property(lambda self: _Mapped(self)) ++ if QtWidgets is not None and hasattr(QtWidgets, 'QComboBox'): ++ # QComboBox.currentIndexChanged[str], activated[str], highlighted[str]: Qt 6 has ++ # currentTextChanged, textActivated, textHighlighted instead ++ def _combo_overloads(name, text_name): ++ signal = getattr(QtWidgets.QComboBox, name) ++ ++ class _Overloads(object): ++ def __init__(self, combo): ++ self._bound = signal.__get__(combo, type(combo)) ++ self._combo = combo ++ ++ def __getitem__(self, signal_type): ++ if signal_type is str: ++ return getattr(self._combo, text_name) ++ return self._bound ++ ++ def __getattr__(self, attr): ++ return getattr(self._bound, attr) ++ return property(lambda self: _Overloads(self)) ++ for name, text_name in (('currentIndexChanged', 'currentTextChanged'), ++ ('activated', 'textActivated'), ++ ('highlighted', 'textHighlighted')): ++ if hasattr(QtWidgets.QComboBox, text_name): ++ setattr(QtWidgets.QComboBox, name, _combo_overloads(name, text_name)) ++ # removed in Qt 6 (also used in .ui files: QComboBox::AdjustToMinimumContentsLength) ++ policy = QtWidgets.QComboBox.SizeAdjustPolicy ++ if not hasattr(QtWidgets.QComboBox, 'AdjustToMinimumContentsLength'): ++ QtWidgets.QComboBox.AdjustToMinimumContentsLength = \ ++ policy.AdjustToMinimumContentsLengthWithIcon ++ if QtGui is not None and QtWidgets is not None: ++ for name in ('QAction', 'QActionGroup', 'QShortcut', 'QUndoCommand', 'QUndoGroup', ++ 'QUndoStack', 'QFileSystemModel'): ++ if hasattr(QtGui, name) and not hasattr(QtWidgets, name): ++ setattr(QtWidgets, name, getattr(QtGui, name)) ++ # Qt 5's QtWebEngine module (QWebEngineView, QWebEnginePage), e.g. for rqt_web ++ if 'QtWebEngine' not in sys.modules and 'QtWebEngineWidgets' in sys.modules: ++ import types ++ web_engine = types.ModuleType('QtWebEngine') ++ for module_name in ('QtWebEngineCore', 'QtWebEngineWidgets'): ++ module = sys.modules.get(module_name) ++ if module is not None: ++ for name in dir(module): ++ if name.startswith('Q'): ++ setattr(web_engine, name, getattr(module, name)) ++ _register_binding_module('QtWebEngine', web_engine) ++ if QtGui is not None and not hasattr(QtGui, 'QRegExpValidator') and hasattr(QtGui, 'QRegularExpressionValidator'): ++ QtGui.QRegExpValidator = QtGui.QRegularExpressionValidator ++ QtSvg, QtSvgWidgets = sys.modules.get('QtSvg'), sys.modules.get('QtSvgWidgets') ++ if QtSvg is not None and QtSvgWidgets is not None: ++ for name in ('QGraphicsSvgItem', 'QSvgWidget'): ++ if hasattr(QtSvgWidgets, name) and not hasattr(QtSvg, name): ++ setattr(QtSvg, name, getattr(QtSvgWidgets, name)) ++ if QtGui is not None: ++ # icon themes: conda-forge's Adwaita (>= 41) has only the -symbolic icons (its other ++ # icons moved to AdwaitaLegacy), so fall back to them (RoboStack/ros-noetic#225) ++ if not getattr(QtGui.QIcon.fromTheme, '_robostack', False): ++ _from_theme = QtGui.QIcon.fromTheme ++ ++ def from_theme(name, *fallback): ++ icon = _from_theme(name) ++ if icon.isNull() and not name.endswith('-symbolic'): ++ icon = _from_theme(name + '-symbolic') ++ if icon.isNull() and fallback: ++ return fallback[0] ++ return icon ++ from_theme._robostack = True ++ QtGui.QIcon.fromTheme = staticmethod(from_theme) ++ if not hasattr(QtGui.QPainter, 'HighQualityAntialiasing'): ++ QtGui.QPainter.HighQualityAntialiasing = QtGui.QPainter.RenderHint.Antialiasing ++ if not hasattr(QtGui.QFontMetrics, 'width'): ++ QtGui.QFontMetrics.width = QtGui.QFontMetrics.horizontalAdvance ++ if not hasattr(QtGui.QFontMetricsF, 'width'): ++ QtGui.QFontMetricsF.width = QtGui.QFontMetricsF.horizontalAdvance ++ for event in (QtGui.QMouseEvent, QtGui.QWheelEvent, QtGui.QDropEvent): ++ if hasattr(event, 'position'): ++ if not hasattr(event, 'pos'): ++ event.pos = lambda self: self.position().toPoint() ++ if not hasattr(event, 'posF'): ++ event.posF = lambda self: self.position() ++ if not hasattr(event, 'x'): ++ event.x = lambda self: int(self.position().x()) ++ if not hasattr(event, 'y'): ++ event.y = lambda self: int(self.position().y()) ++ if hasattr(event, 'globalPosition'): ++ if not hasattr(event, 'globalPos'): ++ event.globalPos = lambda self: self.globalPosition().toPoint() ++ if not hasattr(QtGui.QWheelEvent, 'delta'): ++ QtGui.QWheelEvent.delta = lambda self: self.angleDelta().y() def _load_pyside(required_modules, optional_modules): diff --git a/distros/humble/patch/ros2-rqt-msg.patch b/distros/humble/patch/ros2-rqt-msg.patch new file mode 100644 index 000000000..dd911453f --- /dev/null +++ b/distros/humble/patch/ros2-rqt-msg.patch @@ -0,0 +1,44 @@ +diff --git a/src/rqt_msg/messages_tree_model.py b/src/rqt_msg/messages_tree_model.py +index 0622b8c..4e5fbda 100644 +--- a/src/rqt_msg/messages_tree_model.py ++++ b/src/rqt_msg/messages_tree_model.py +@@ -33,7 +33,38 @@ + + from python_qt_binding.QtGui import QStandardItem + +-from rqt_py_common.message_helpers import get_message_constants_from_class ++try: ++ from rqt_py_common.message_helpers import get_message_constants_from_class ++except ImportError: ++ # RoboStack: no released rqt_py_common has this helper yet ++ # (https://github.com/ros-visualization/rqt_msg/issues/37) ++ import os ++ import re ++ ++ def get_message_constants_from_class(message): ++ """Return [(type, name, value)] of the constants of a message (instance or class).""" ++ msg_class = message if isinstance(message, type) else type(message) ++ metaclass = type(msg_class) ++ constants = getattr(metaclass, '_%s__constants' % metaclass.__name__, None) or {} ++ if not constants: ++ return [] ++ # the constant types are only in the interface file ++ types = {} ++ package = msg_class.__module__.split('.')[0] ++ kind = msg_class.__module__.split('.')[1] if '.' in msg_class.__module__ else 'msg' ++ name = re.sub(r'_(Request|Response|Event|Goal|Result|Feedback)$', '', msg_class.__name__) ++ try: ++ from ament_index_python.packages import get_package_share_directory ++ path = os.path.join(get_package_share_directory(package), kind, '%s.%s' % (name, kind)) ++ with open(path) as f: ++ for line in f: ++ match = re.match(r'\s*([\w/\[\]<=]+)\s+([A-Z][A-Z0-9_]*)\s*=', line) ++ if match: ++ types.setdefault(match.group(2), match.group(1)) ++ except Exception: # noqa: B902 (no interface file: fall back to the Python types) ++ pass ++ return [(types.get(n, type(v).__name__), n, v) for n, v in constants.items()] ++ + from rqt_py_common.message_tree_model import MessageTreeModel + + diff --git a/distros/humble/patch/ros2-turtlesim.patch b/distros/humble/patch/ros2-turtlesim.patch new file mode 100644 index 000000000..4259d4c72 --- /dev/null +++ b/distros/humble/patch/ros2-turtlesim.patch @@ -0,0 +1,36 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bebab82..c42d1e5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,14 +12,14 @@ endif() + find_package(ament_cmake REQUIRED) + find_package(ament_index_cpp REQUIRED) + find_package(geometry_msgs REQUIRED) +-find_package(Qt5 REQUIRED COMPONENTS Widgets) ++find_package(Qt6 REQUIRED COMPONENTS Widgets) + find_package(rclcpp REQUIRED) + find_package(rclcpp_action REQUIRED) + find_package(rosidl_default_generators REQUIRED) + find_package(std_msgs REQUIRED) + find_package(std_srvs REQUIRED) + +-include_directories(include ${Qt5Widgets_INCLUDE_DIRS}) ++include_directories(include ${Qt6Widgets_INCLUDE_DIRS}) + + rosidl_generate_interfaces(${PROJECT_NAME} + "action/RotateAbsolute.action" +@@ -42,12 +42,12 @@ set(turtlesim_node_HDRS + include/turtlesim/turtle_frame.h + ) + +-qt5_wrap_cpp(turtlesim_node_MOCS ${turtlesim_node_HDRS}) ++qt6_wrap_cpp(turtlesim_node_MOCS ${turtlesim_node_HDRS}) + + rosidl_get_typesupport_target(cpp_typesupport_target "${PROJECT_NAME}" "rosidl_typesupport_cpp") + + add_executable(turtlesim_node ${turtlesim_node_SRCS} ${turtlesim_node_MOCS}) +-target_link_libraries(turtlesim_node Qt5::Widgets) ++target_link_libraries(turtlesim_node Qt6::Widgets) + ament_target_dependencies(turtlesim_node ${dependencies}) + target_link_libraries(turtlesim_node "${cpp_typesupport_target}") + diff --git a/distros/humble/pkg_additional_info.yaml b/distros/humble/pkg_additional_info.yaml index 882c32dda..a9f633ba7 100644 --- a/distros/humble/pkg_additional_info.yaml +++ b/distros/humble/pkg_additional_info.yaml @@ -125,9 +125,27 @@ zenoh_cpp_vendor: cartographer_ros: additional_cmake_args: "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON" build_number: 26 # offline_node.cpp out of the shared library (duplicate gflags abort) +plansys2_tools: # no Qt 5 run dependency + build_number: 26 +python_qt_binding: # PyQt5 compatibility layer (rqt on PyQt6) + build_number: 26 +ros_image_to_qimage: # no Qt 5 run dependency + build_number: 26 +rqt_image_overlay: # no Qt 5 run dependency + build_number: 26 +rqt_image_overlay_layer: # no Qt 5 run dependency + build_number: 26 +rqt_mocap4r2_control: # no Qt 5 run dependency + build_number: 26 +rqt_msg: # rqt_msg#37 (constants helper) + build_number: 26 +rqt_py_common: # no Qt 5 run dependency + build_number: 26 rtabmap: additional_cmake_args: if: win then: "-DBUILD_TOOLS=OFF -DBUILD_EXAMPLES=OFF -DWITH_GTSAM=OFF" else: "-DBUILD_TOOLS=OFF -DBUILD_EXAMPLES=OFF" build_number: 26 # built with Qt (its GUI library, for rtabmap_viz) +turtlesim: # Qt 6 + build_number: 26 diff --git a/distros/jazzy/patch/dependencies.yaml b/distros/jazzy/patch/dependencies.yaml index 63a36c3fc..fc4368fc8 100644 --- a/distros/jazzy/patch/dependencies.yaml +++ b/distros/jazzy/patch/dependencies.yaml @@ -21,8 +21,18 @@ easynav_octomap_maps_manager: add_host: ["octomap"] foxglove_bridge: add_host: ["ros2-ament-cmake"] +fuse_viz: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] geometric_shapes: add_host: ["octomap"] +grid_map_rviz_plugin: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] gz_cmake_vendor: # Major version pin selects the Gazebo release matching jazzy (applies to all gz-* vendor packages). add_host: ["gz-cmake3"] @@ -104,6 +114,46 @@ libg2o: mimick_vendor: add_build: ["vcstool", "setuptools <81"] add_host: ["setuptools <81"] +moveit_ros_visualization: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] +moveit_setup_app_plugins: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] +moveit_setup_assistant: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] +moveit_setup_controllers: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] +moveit_setup_core_plugins: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] +moveit_setup_framework: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] +moveit_setup_srdf_plugins: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] +moveit_task_constructor_visualization: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] moveit_visual_tools: add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}"] mrpt_gui: @@ -115,8 +165,23 @@ nav2_constrained_smoother: add_host: ["${{ 'openblas' if win }}"] nav2_mppi_controller: add_run: ["xtensor==0.25.0"] +nav2_rviz_plugins: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main", "qt6-scxml"] nav2_util: add_host: ["libboost-devel"] +navmap_rviz_plugin: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] +octomap_rviz_plugins: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] opennav_coverage: # package.xml misses deps that CMakeLists.txt finds add_host: [ros2-rclcpp-components, ros2-std-msgs, ros2-visualization-msgs] @@ -125,6 +190,10 @@ openvdb_vendor: add_host: ["openvdb"] pcl_conversions: add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "libboost-devel"] +plansys2_tools: + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] plotjuggler: add_host: ["libxcb", "${{ 'elfutils' if linux }}", "ros2-ros-workspace", "git-lfs"] py_trees: @@ -133,19 +202,32 @@ py_trees_js: add_host: - hatchling py_trees_ros_tutorials: - # the mock GUI imports PyQt5 (jazzy's rqt stack is Qt5 too), but package.xml doesn't declare it - add_run: ["pyqt"] + # the mock GUI is ported to PyQt6 (patch/ros2-py-trees-ros-tutorials.patch), like the rqt stack; + # package.xml doesn't declare it + add_run: ["pyqt6"] + remove_run: ["pyqt", "pyqt-builder"] python_qt_binding: - # sip <6.16: exact pin conflicts with pyqt5-sip's range; unpinned risks the 6.16.x ABI regression. - add_host: ["pyqt-builder", "sip <6.16"] - add_run: ["pyqt-builder"] + # PyQt6 / Qt 6 (patch/ros2-python-qt-binding.patch, as in humble). + # sip <6.16: 6.16.x regressed ABI targeting for PyQt-based bindings. + add_host: ["pyqt-builder", "pep517", "qt6-main", "pyqt6", "sip <6.16"] + add_run: ["pyqt-builder", "pep517", "qt6-main", "pyqt6"] + remove_host: ["qt-main", "pyqt"] + remove_run: ["qt-main", "pyqt"] +qt_gui: + # PyQt6, like python_qt_binding + remove_host: ["qt-main", "pyqt"] + remove_run: ["qt-main", "pyqt"] + add_host: ["qt6-main", "pyqt6"] + add_run: ["qt6-main", "pyqt6"] qt_gui_cpp: - add_build: ["${{ 'pyqt' if (build_platform != target_platform) }}", "${{ 'qt-main' if (build_platform != target_platform) }}"] - # Same sip <6.16 fix as python_qt_binding above (pulls its own pyqt5/pyqt5-sip into this host solve too). + add_build: ["${{ 'pyqt6' if (build_platform != target_platform) }}", "${{ 'qt6-main' if (build_platform != target_platform) }}"] + # Qt 6 / PyQt6 (patch/ros2-qt-gui-cpp.patch); same sip <6.16 pin as python_qt_binding above. # Only the PyQt (sip) bindings: pyside2 has no Python 3.14 build, and the shiboken # bindings are optional (built only when python_qt_binding's shiboken_helper finds it). - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "pyqt-builder", "pep517", "sip <6.16"] - add_run: ["pyqt-builder", "pep517"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "pyqt-builder", "pep517", "qt6-main", "pyqt6", "sip <6.16"] + add_run: ["pyqt-builder", "pep517", "qt6-main", "pyqt6"] + remove_host: ["qt-main", "pyqt"] + remove_run: ["qt-main", "pyqt"] roboplan_example_models: # src/resources.cpp uses dladdr() from dlfcn.h, which is POSIX-only. # On Windows we need to depend on dlfcn-win32 instead. @@ -156,33 +238,111 @@ roboplan_ros_examples: ros_gz_sim: add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}"] ros_image_to_qimage: - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] + remove_host: ["qt-main"] + remove_run: ["qt-main"] rqt_gui_cpp: - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] + remove_host: ["qt-main"] + remove_run: ["qt-main"] rqt_image_overlay: - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] + remove_host: ["qt-main"] + remove_run: ["qt-main"] rqt_image_overlay_layer: - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] + remove_host: ["qt-main"] + remove_run: ["qt-main"] rqt_image_view: - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] + remove_host: ["qt-main"] + remove_run: ["qt-main"] +rqt_py_common: + # Qt 6, like qt_gui + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["qt6-main"] rtabmap: add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "ceres-solver", "${{ 'libdc1394' if not win }}", "libusb", "vtk"] +rtabmap_rviz_plugins: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] +rviz2: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] +rviz_2d_overlay_plugins: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] +rviz_common: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] +rviz_default_plugins: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] +rviz_imu_plugin: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] rviz_ogre_vendor: add_host: ["zlib", "freeimage", "freetype", "assimp", "zziplib", "pugixml", "${{ 'libglu' if linux }}", "setuptools <81"] add_build: ["vcstool", "setuptools <81"] add_run: ["assimp"] +rviz_rendering: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] +rviz_rendering_tests: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] +rviz_satellite: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] +rviz_visual_testing_framework: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] +rviz_visual_tools: + # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] sdformat_vendor: add_host: ["sdformat14"] add_run: ["sdformat14"] slam_toolbox: - add_build: ["${{ 'qt-main' if (build_platform != target_platform) }}"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "blas-devel"] + add_build: ["${{ 'qt6-main' if (build_platform != target_platform) }}"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "blas-devel", "qt6-main"] + remove_host: ["qt-main"] + remove_run: ["qt-main"] spatio_temporal_voxel_layer: add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "openvdb"] swri_console: - add_build: ["${{ 'qt-main' if (build_platform != target_platform) }}"] - add_host: ["libboost-devel", "qt-main", "${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}"] - add_run: ["libboost", "qt-main"] + add_build: ["${{ 'qt6-main' if (build_platform != target_platform) }}"] + add_host: ["libboost-devel", "qt6-main", "${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}"] + add_run: ["libboost"] + remove_host: ["qt-main"] + remove_run: ["qt-main"] +turtlesim: + remove_host: ["qt-main"] + remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] # TODO unvendor?! uncrustify_vendor: add_build: ["vcstool", "setuptools <81"] @@ -193,8 +353,10 @@ ur_moveit_config: add_host: ["ros2-rclpy"] add_run: ["ros2-rclpy"] vision_msgs_rviz_plugins: - add_build: ["${{ 'qt-main' if (build_platform != target_platform) }}"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}"] + add_build: ["${{ 'qt6-main' if (build_platform != target_platform) }}"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] + remove_host: ["qt-main"] + remove_run: ["qt-main"] warehouse_ros_sqlite: add_host: ["ros2-sqlite3-vendor"] add_run: ["ros2-sqlite3-vendor"] diff --git a/distros/jazzy/patch/ros2-class-loader.patch b/distros/jazzy/patch/ros2-class-loader.patch new file mode 100644 index 000000000..168fcde0b --- /dev/null +++ b/distros/jazzy/patch/ros2-class-loader.patch @@ -0,0 +1,23 @@ +diff --git a/src/multi_library_class_loader.cpp b/src/multi_library_class_loader.cpp +index d7ba907..32a971c 100644 +--- a/src/multi_library_class_loader.cpp ++++ b/src/multi_library_class_loader.cpp +@@ -34,6 +34,8 @@ + #include + #include + ++#include "console_bridge/console.h" ++ + namespace class_loader + { + +@@ -55,6 +57,9 @@ protected: + class_loader::impl::getCurrentlyLoadingLibraryName(); + class_loader::impl::getCurrentlyActiveClassLoader(); + class_loader::impl::hasANonPurePluginLibraryBeenOpened(); ++ // ~ClassLoader() logs through console_bridge, so its output handler (a function-local ++ // static in console_bridge) has to outlive `class_loader_ptrs_` as well ++ console_bridge::getLogLevel(); + } + }; + diff --git a/distros/jazzy/patch/ros2-fuse-viz.patch b/distros/jazzy/patch/ros2-fuse-viz.patch new file mode 100644 index 000000000..c3f1172fc --- /dev/null +++ b/distros/jazzy/patch/ros2-fuse-viz.patch @@ -0,0 +1,29 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8f4f2bfb..86ebc0ff 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -23,13 +23,13 @@ find_package(tf2_geometry_msgs REQUIRED) + + find_package(Eigen3 REQUIRED) + +-find_package(Qt5 COMPONENTS Core Widgets REQUIRED) ++find_package(Qt6 COMPONENTS Core Widgets REQUIRED) + + ########### + ## Build ## + ########### + +-qt5_wrap_cpp(moc_files ++qt6_wrap_cpp(moc_files + include/fuse_viz/mapped_covariance_property.hpp + include/fuse_viz/pose_2d_stamped_property.hpp + include/fuse_viz/relative_pose_2d_stamped_constraint_property.hpp +@@ -61,7 +61,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE + target_include_directories(${PROJECT_NAME} PUBLIC + $ + $ +- ${Qt5Widgets_INCLUDE_DIRS} ++ ${Qt6Widgets_INCLUDE_DIRS} + ) + + ############# diff --git a/distros/jazzy/patch/ros2-grid-map-rviz-plugin.patch b/distros/jazzy/patch/ros2-grid-map-rviz-plugin.patch new file mode 100644 index 000000000..5e6b3228d --- /dev/null +++ b/distros/jazzy/patch/ros2-grid-map-rviz-plugin.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 92bb25b..876d525 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,7 +5,7 @@ find_package(ament_cmake REQUIRED) + find_package(grid_map_cmake_helpers REQUIRED) + find_package(grid_map_msgs REQUIRED) + find_package(grid_map_ros REQUIRED) +-find_package(Qt5 REQUIRED COMPONENTS Core Widgets) ++find_package(Qt6 REQUIRED COMPONENTS Core Widgets) + find_package(rclcpp REQUIRED) + find_package(rviz_common REQUIRED) + find_package(rviz_ogre_vendor REQUIRED) +@@ -34,7 +34,7 @@ set(INCLUDE_FILES_QT + include/grid_map_rviz_plugin/GridMapDisplay.hpp + ) + +-qt5_wrap_cpp(MOC_FILES ${INCLUDE_FILES_QT}) ++qt6_wrap_cpp(MOC_FILES ${INCLUDE_FILES_QT}) + + ## Avoid Qt signals and slots defining "emit", "slots", etc. + add_definitions(-DQT_NO_KEYWORDS) +@@ -133,7 +133,7 @@ endif() + ament_export_include_directories(include) + ament_export_targets(${PROJECT_NAME} HAS_LIBRARY_TARGET) + ament_export_dependencies( +- Qt5 ++ Qt6 + rviz_common + geometry_msgs + map_msgs diff --git a/distros/jazzy/patch/ros2-moveit-ros-visualization.patch b/distros/jazzy/patch/ros2-moveit-ros-visualization.patch index 9bd763aee..4534880a3 100644 --- a/distros/jazzy/patch/ros2-moveit-ros-visualization.patch +++ b/distros/jazzy/patch/ros2-moveit-ros-visualization.patch @@ -1,4 +1,24 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 27855877a3..d84e901490 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -38,11 +38,11 @@ find_package(rviz_ogre_vendor REQUIRED) + include(ConfigExtras.cmake) + + # Qt Stuff +-find_package(Qt5 ${rviz_QT_VERSION} REQUIRED Core Widgets) +-set(QT_LIBRARIES Qt5::Widgets) ++find_package(Qt6 ${rviz_QT_VERSION} REQUIRED Core Widgets) ++set(QT_LIBRARIES Qt6::Widgets) + # Delegate to QT5 macro + macro(QT_WRAP_UI) +- qt5_wrap_ui(${ARGN}) ++ qt6_wrap_ui(${ARGN}) + endmacro() + + set(CMAKE_INCLUDE_CURRENT_DIR ON) diff --git a/ConfigExtras.cmake b/ConfigExtras.cmake +index ddda760859..3b7b9699cd 100644 --- a/ConfigExtras.cmake +++ b/ConfigExtras.cmake @@ -1,3 +1,3 @@ @@ -6,3 +26,51 @@ diff --git a/ConfigExtras.cmake b/ConfigExtras.cmake -find_package(Boost REQUIRED thread date_time system filesystem) +find_package(Boost REQUIRED thread date_time filesystem) +diff --git a/motion_planning_rviz_plugin/CMakeLists.txt b/motion_planning_rviz_plugin/CMakeLists.txt +index 711211c89f..4e7e916bfc 100644 +--- a/motion_planning_rviz_plugin/CMakeLists.txt ++++ b/motion_planning_rviz_plugin/CMakeLists.txt +@@ -4,7 +4,7 @@ set(HEADERS + include/moveit/motion_planning_rviz_plugin/motion_planning_frame_joints_widget.hpp + include/moveit/motion_planning_rviz_plugin/motion_planning_param_widget.hpp + include/moveit/motion_planning_rviz_plugin/interactive_marker_display.hpp) +-qt5_wrap_ui(UIC_FILES src/ui/motion_planning_rviz_plugin_frame.ui ++qt6_wrap_ui(UIC_FILES src/ui/motion_planning_rviz_plugin_frame.ui + src/ui/motion_planning_rviz_plugin_frame_joints.ui) + + include_directories(${CMAKE_CURRENT_BINARY_DIR}) +@@ -38,7 +38,7 @@ ament_target_dependencies( + moveit_ros_warehouse + rviz2 + rviz_ogre_vendor +- Qt5 ++ Qt6 + pluginlib) + target_include_directories(moveit_motion_planning_rviz_plugin_core + PRIVATE "${OGRE_PREFIX_DIR}/include") +diff --git a/planning_scene_rviz_plugin/CMakeLists.txt b/planning_scene_rviz_plugin/CMakeLists.txt +index efe2dc41f4..16543a62d3 100644 +--- a/planning_scene_rviz_plugin/CMakeLists.txt ++++ b/planning_scene_rviz_plugin/CMakeLists.txt +@@ -27,7 +27,7 @@ add_library(moveit_planning_scene_rviz_plugin SHARED src/plugin_init.cpp) + set_target_properties(moveit_planning_scene_rviz_plugin + PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}") + target_link_libraries(moveit_planning_scene_rviz_plugin +- moveit_planning_scene_rviz_plugin_core Qt5::Widgets) ++ moveit_planning_scene_rviz_plugin_core Qt6::Widgets) + ament_target_dependencies(moveit_planning_scene_rviz_plugin pluginlib + rviz_ogre_vendor) + target_include_directories(moveit_planning_scene_rviz_plugin +diff --git a/rviz_plugin_render_tools/CMakeLists.txt b/rviz_plugin_render_tools/CMakeLists.txt +index 2a8c81a4dd..20dc2cfae2 100644 +--- a/rviz_plugin_render_tools/CMakeLists.txt ++++ b/rviz_plugin_render_tools/CMakeLists.txt +@@ -24,7 +24,7 @@ add_library( + set_target_properties(moveit_rviz_plugin_render_tools + PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}") + +-target_link_libraries(moveit_rviz_plugin_render_tools Qt5::Widgets) ++target_link_libraries(moveit_rviz_plugin_render_tools Qt6::Widgets) + + ament_target_dependencies( + moveit_rviz_plugin_render_tools diff --git a/distros/jazzy/patch/ros2-moveit-setup-app-plugins.patch b/distros/jazzy/patch/ros2-moveit-setup-app-plugins.patch new file mode 100644 index 000000000..35659d745 --- /dev/null +++ b/distros/jazzy/patch/ros2-moveit-setup-app-plugins.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fb10aca607..c82e0ff15a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,7 +17,7 @@ find_package(rclcpp REQUIRED) + set(CMAKE_AUTOMOC ON) + add_definitions(-DQT_NO_KEYWORDS) + +-qt5_wrap_cpp(MOC_FILES include/moveit_setup_app_plugins/launches_widget.hpp ++qt6_wrap_cpp(MOC_FILES include/moveit_setup_app_plugins/launches_widget.hpp + include/moveit_setup_app_plugins/perception_widget.hpp) + + add_library( diff --git a/distros/jazzy/patch/ros2-moveit-setup-assistant.patch b/distros/jazzy/patch/ros2-moveit-setup-assistant.patch new file mode 100644 index 000000000..4990c58fe --- /dev/null +++ b/distros/jazzy/patch/ros2-moveit-setup-assistant.patch @@ -0,0 +1,35 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6dc113eab1..6d1b9a1d00 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,8 +12,8 @@ find_package(Boost REQUIRED program_options) + find_package(moveit_setup_framework REQUIRED) + find_package(moveit_setup_srdf_plugins REQUIRED) + find_package(pluginlib REQUIRED) +-find_package(Qt5Core REQUIRED) +-find_package(Qt5Widgets REQUIRED) ++find_package(Qt6Core REQUIRED) ++find_package(Qt6Widgets REQUIRED) + find_package(rclcpp REQUIRED) + + set(THIS_PACKAGE_INCLUDE_DEPENDS +@@ -21,8 +21,8 @@ set(THIS_PACKAGE_INCLUDE_DEPENDS + moveit_setup_framework + moveit_setup_srdf_plugins + pluginlib +- Qt5Core +- Qt5Widgets ++ Qt6Core ++ Qt6Widgets + rclcpp) + + # Header files that need Qt Moc pre-processing for use with Qt signals, etc: +@@ -32,7 +32,7 @@ set(HEADERS include/moveit_setup_assistant/navigation_widget.hpp + set(CMAKE_AUTOMOC ON) + add_definitions(-DQT_NO_KEYWORDS) + +-qt5_wrap_cpp(MOC_FILES ${HEADERS}) ++qt6_wrap_cpp(MOC_FILES ${HEADERS}) + + add_executable( + moveit_setup_assistant src/main.cpp src/setup_assistant_widget.cpp diff --git a/distros/jazzy/patch/ros2-moveit-setup-controllers.patch b/distros/jazzy/patch/ros2-moveit-setup-controllers.patch new file mode 100644 index 000000000..098a95b9e --- /dev/null +++ b/distros/jazzy/patch/ros2-moveit-setup-controllers.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3e661098ba..3ccab7449c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -16,7 +16,7 @@ find_package(rclcpp REQUIRED) + set(CMAKE_AUTOMOC ON) + add_definitions(-DQT_NO_KEYWORDS) + +-qt5_wrap_cpp( ++qt6_wrap_cpp( + MOC_FILES include/moveit_setup_controllers/controller_edit_widget.hpp + include/moveit_setup_controllers/controllers_widget.hpp + include/moveit_setup_controllers/urdf_modifications_widget.hpp) diff --git a/distros/jazzy/patch/ros2-moveit-setup-core-plugins.patch b/distros/jazzy/patch/ros2-moveit-setup-core-plugins.patch new file mode 100644 index 000000000..ab4d646a1 --- /dev/null +++ b/distros/jazzy/patch/ros2-moveit-setup-core-plugins.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2610a37ea4..3c7c100d83 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -19,7 +19,7 @@ find_package(urdf REQUIRED) + set(CMAKE_AUTOMOC ON) + add_definitions(-DQT_NO_KEYWORDS) + +-qt5_wrap_cpp( ++qt6_wrap_cpp( + MOC_FILES include/moveit_setup_core_plugins/start_screen_widget.hpp + include/moveit_setup_core_plugins/configuration_files_widget.hpp + include/moveit_setup_core_plugins/author_information_widget.hpp) +diff --git a/src/configuration_files_widget.cpp b/src/configuration_files_widget.cpp +index 9e4c3484ab..4513942045 100644 +--- a/src/configuration_files_widget.cpp ++++ b/src/configuration_files_widget.cpp +@@ -44,7 +44,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + diff --git a/distros/jazzy/patch/ros2-moveit-setup-framework.patch b/distros/jazzy/patch/ros2-moveit-setup-framework.patch index 970dccd97..a9c907312 100644 --- a/distros/jazzy/patch/ros2-moveit-setup-framework.patch +++ b/distros/jazzy/patch/ros2-moveit-setup-framework.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3e3d417fb..91c15c6b2 100644 +index 3e3d417fbc..2d374f169c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,8 +12,7 @@ find_package(fmt REQUIRED) @@ -8,10 +8,19 @@ index 3e3d417fb..91c15c6b2 100644 find_package(moveit_ros_visualization REQUIRED) -find_package(Qt5Core REQUIRED) -find_package(Qt5Widgets REQUIRED) -+find_package(Qt5 COMPONENTS Core Widgets REQUIRED) ++find_package(Qt6 COMPONENTS Core Widgets REQUIRED) find_package(pluginlib REQUIRED) find_package(rclcpp REQUIRED) find_package(rviz_common REQUIRED) +@@ -23,7 +22,7 @@ find_package(urdf REQUIRED) + + set(CMAKE_INCLUDE_CURRENT_DIR ON) + +-qt5_wrap_cpp( ++qt6_wrap_cpp( + MOC_FILES + include/moveit_setup_framework/qt/helper_widgets.hpp + include/moveit_setup_framework/qt/setup_step_widget.hpp @@ -43,6 +42,10 @@ add_library( src/utilities.cpp src/xml_syntax_highlighter.cpp @@ -29,7 +38,7 @@ index 3e3d417fb..91c15c6b2 100644 pluginlib - Qt5Core - Qt5Widgets -+ Qt5 ++ Qt6 rclcpp rviz_common rviz_rendering @@ -41,8 +50,19 @@ index 3e3d417fb..91c15c6b2 100644 ament_export_targets(moveit_setup_frameworkTargets HAS_LIBRARY_TARGET) install( +@@ -80,8 +83,8 @@ install( + + ament_export_dependencies(fmt) + ament_export_dependencies(rclcpp) +-ament_export_dependencies(Qt5Core) +-ament_export_dependencies(Qt5Widgets) ++ament_export_dependencies(Qt6Core) ++ament_export_dependencies(Qt6Widgets) + ament_export_dependencies(moveit_common) + ament_export_dependencies(moveit_core) + ament_export_dependencies(moveit_ros_planning) diff --git a/include/moveit_setup_framework/qt/setup_step_widget.hpp b/include/moveit_setup_framework/qt/setup_step_widget.hpp -index f32e7b5ad..c6f472682 100644 +index f32e7b5ad3..c6f472682d 100644 --- a/include/moveit_setup_framework/qt/setup_step_widget.hpp +++ b/include/moveit_setup_framework/qt/setup_step_widget.hpp @@ -40,12 +40,14 @@ @@ -61,8 +81,21 @@ index f32e7b5ad..c6f472682 100644 { Q_OBJECT public: +diff --git a/include/moveit_setup_framework/qt/xml_syntax_highlighter.hpp b/include/moveit_setup_framework/qt/xml_syntax_highlighter.hpp +index 5a5fbdd297..494d751e44 100644 +--- a/include/moveit_setup_framework/qt/xml_syntax_highlighter.hpp ++++ b/include/moveit_setup_framework/qt/xml_syntax_highlighter.hpp +@@ -63,7 +63,7 @@ private: + using Rules = std::map; + Rules rules_; + +- Rules::const_iterator highlight(Rules::const_iterator active, QStringRef text, int start, bool search_end, int& end); ++ Rules::const_iterator highlight(Rules::const_iterator active, QStringView text, int start, bool search_end, int& end); + }; + + } // namespace moveit_setup diff --git a/include/moveit_setup_framework/templates.hpp b/include/moveit_setup_framework/templates.hpp -index 1555eee16..b02d52024 100644 +index 1555eee16b..b02d520243 100644 --- a/include/moveit_setup_framework/templates.hpp +++ b/include/moveit_setup_framework/templates.hpp @@ -38,6 +38,8 @@ @@ -84,7 +117,7 @@ index 1555eee16..b02d52024 100644 } // namespace moveit_setup diff --git a/src/urdf_config.cpp b/src/urdf_config.cpp -index 72d9bf4af..3ca176656 100644 +index eab6823260..5d17cec951 100644 --- a/src/urdf_config.cpp +++ b/src/urdf_config.cpp @@ -36,6 +36,7 @@ @@ -95,3 +128,25 @@ index 72d9bf4af..3ca176656 100644 namespace moveit_setup { +diff --git a/src/xml_syntax_highlighter.cpp b/src/xml_syntax_highlighter.cpp +index 1733943ce2..600deae8d1 100644 +--- a/src/xml_syntax_highlighter.cpp ++++ b/src/xml_syntax_highlighter.cpp +@@ -64,7 +64,7 @@ void XmlSyntaxHighlighter::addTag(const QString& tag, const QTextCharFormat& for + } + + XmlSyntaxHighlighter::Rules::const_iterator +-XmlSyntaxHighlighter::highlight(Rules::const_iterator active, QStringRef text, int start, bool search_end, int& end) ++XmlSyntaxHighlighter::highlight(Rules::const_iterator active, QStringView text, int start, bool search_end, int& end) + { + int offset = end; // when passed, end indicates the end of the opening expression + auto next = active; // return value: active rule at end of text +@@ -121,7 +121,7 @@ void XmlSyntaxHighlighter::highlightBlock(const QString& text) + { + Rules::const_iterator active = previousBlockState() < 0 ? rules_.end() : rules_.find(previousBlockState()); + int unused = 0; +- active = highlight(active, QStringRef(&text, 0, text.size()), 0, active != rules_.cend(), unused); ++ active = highlight(active, QStringView(text), 0, active != rules_.cend(), unused); + setCurrentBlockState(active != rules_.cend() ? active->first : -1); + } + diff --git a/distros/jazzy/patch/ros2-moveit-setup-srdf-plugins.patch b/distros/jazzy/patch/ros2-moveit-setup-srdf-plugins.patch new file mode 100644 index 000000000..26cd63d0e --- /dev/null +++ b/distros/jazzy/patch/ros2-moveit-setup-srdf-plugins.patch @@ -0,0 +1,57 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6e34b6346b..a0a0e4f318 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -10,7 +10,7 @@ find_package(ament_cmake_ros REQUIRED) + find_package(moveit_setup_framework REQUIRED) + find_package(pluginlib REQUIRED) + +-qt5_wrap_cpp( ++qt6_wrap_cpp( + MOC_FILES + include/moveit_setup_srdf_plugins/collision_linear_model.hpp + include/moveit_setup_srdf_plugins/collision_matrix_model.hpp +diff --git a/src/collision_linear_model.cpp b/src/collision_linear_model.cpp +index 9fb5b65d1b..90ce75c40d 100644 +--- a/src/collision_linear_model.cpp ++++ b/src/collision_linear_model.cpp +@@ -37,6 +37,7 @@ + #include + #include + ++#include + #include + #include + #include +@@ -264,8 +265,8 @@ bool SortFilterProxyModel::filterAcceptsRow(int source_row, const QModelIndex& s + m->data(m->index(source_row, 2), Qt::CheckStateRole) != Qt::Checked) + return false; // not accepted due to check state + +- const QRegExp regexp = filterRegExp(); +- if (regexp.isEmpty()) ++ const QRegularExpression regexp = filterRegularExpression(); ++ if (regexp.pattern().isEmpty()) + return true; + + return m->data(m->index(source_row, 0, source_parent), Qt::DisplayRole).toString().contains(regexp) || +diff --git a/src/collision_matrix_model.cpp b/src/collision_matrix_model.cpp +index f8de451567..0450fdcf18 100644 +--- a/src/collision_matrix_model.cpp ++++ b/src/collision_matrix_model.cpp +@@ -36,6 +36,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -197,7 +198,7 @@ void CollisionMatrixModel::setEnabled(const QModelIndexList& indexes, bool value + void CollisionMatrixModel::setFilterRegExp(const QString& filter) + { + beginResetModel(); +- QRegExp regexp(filter); ++ QRegularExpression regexp(filter); + visual_to_index_.clear(); + for (int idx = 0, end = q_names_.size(); idx != end; ++idx) + { diff --git a/distros/jazzy/patch/ros2-nav2-rviz-plugins.patch b/distros/jazzy/patch/ros2-nav2-rviz-plugins.patch index 177fb6afd..80e6ed241 100644 --- a/distros/jazzy/patch/ros2-nav2-rviz-plugins.patch +++ b/distros/jazzy/patch/ros2-nav2-rviz-plugins.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index c5f5c788a..dbb0f0d3b 100644 +index 3f6f61921..2da4f360e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ if(NOT CMAKE_CXX_STANDARD) @@ -11,12 +11,79 @@ index c5f5c788a..dbb0f0d3b 100644 endif() # Qt5 boilerplate options from http://doc.qt.io/qt-5/cmake-manual.html +@@ -22,7 +22,7 @@ find_package(nav2_lifecycle_manager REQUIRED) + find_package(nav2_msgs REQUIRED) + find_package(nav_msgs REQUIRED) + find_package(pluginlib REQUIRED) +-find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets Test Concurrent) ++find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets StateMachine Test Concurrent) + find_package(rclcpp REQUIRED) + find_package(rclcpp_lifecycle REQUIRED) + find_package(rviz_common REQUIRED) +@@ -78,7 +78,7 @@ set(dependencies + nav2_msgs + nav_msgs + pluginlib +- Qt5 ++ Qt6 + rclcpp + rclcpp_lifecycle + rviz_common +@@ -95,13 +95,14 @@ ament_target_dependencies(${library_name} + ) + + target_include_directories(${library_name} PUBLIC +- ${Qt5Widgets_INCLUDE_DIRS} ++ ${Qt6Widgets_INCLUDE_DIRS} + ${OGRE_INCLUDE_DIRS} + ${nav2_route_INCLUDE_DIRS} + ) + + target_link_libraries(${library_name} + rviz_common::rviz_common ++ Qt6::StateMachine # QStateMachine is its own module in Qt 6 + nav2_route::route_server_core + ) + +@@ -143,7 +144,7 @@ endif() + ament_export_include_directories(include) + ament_export_targets(${library_name} HAS_LIBRARY_TARGET) + ament_export_dependencies( +- Qt5 ++ Qt6 + rviz_common + geometry_msgs + map_msgs +diff --git a/include/nav2_rviz_plugins/docking_panel.hpp b/include/nav2_rviz_plugins/docking_panel.hpp +index fe4acfff3..6cbc14b56 100644 +--- a/include/nav2_rviz_plugins/docking_panel.hpp ++++ b/include/nav2_rviz_plugins/docking_panel.hpp +@@ -16,6 +16,7 @@ + #define NAV2_RVIZ_PLUGINS__DOCKING_PANEL_HPP_ + + // QT ++#include // QStateMachine, QState, QSignalTransition: their own module in Qt 6 + #include + #include + +diff --git a/include/nav2_rviz_plugins/nav2_panel.hpp b/include/nav2_rviz_plugins/nav2_panel.hpp +index ce4212a4b..35bd0c9a1 100644 +--- a/include/nav2_rviz_plugins/nav2_panel.hpp ++++ b/include/nav2_rviz_plugins/nav2_panel.hpp +@@ -15,6 +15,7 @@ + #ifndef NAV2_RVIZ_PLUGINS__NAV2_PANEL_HPP_ + #define NAV2_RVIZ_PLUGINS__NAV2_PANEL_HPP_ + ++#include // QStateMachine, QState, QSignalTransition: their own module in Qt 6 + #include + #include + #undef NO_ERROR diff --git a/src/costmap_cost_tool.cpp b/src/costmap_cost_tool.cpp -index f25a71cd8..93d234043 100644 +index 0f0a9adb8..847d29fb0 100644 --- a/src/costmap_cost_tool.cpp +++ b/src/costmap_cost_tool.cpp @@ -50,6 +50,10 @@ void CostmapCostTool::onInitialize() - node_->create_client("/global_costmap/get_cost_global_costmap"); + node_->create_client("global_costmap/get_cost_global_costmap"); } +void CostmapCostTool::updateAutoDeactivate() { diff --git a/distros/jazzy/patch/ros2-octomap-rviz-plugins.patch b/distros/jazzy/patch/ros2-octomap-rviz-plugins.patch index 8b5bf64db..aa842f760 100644 --- a/distros/jazzy/patch/ros2-octomap-rviz-plugins.patch +++ b/distros/jazzy/patch/ros2-octomap-rviz-plugins.patch @@ -1,13 +1,38 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2bdfa4d..c16ebcc 100644 +index 2bdfa4d..68858e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -33,7 +33,7 @@ ament_auto_add_library(${PROJECT_NAME} SHARED +@@ -13,7 +13,7 @@ endif() + find_package(ament_cmake_auto REQUIRED) + ament_auto_find_build_dependencies() + +-find_package(Qt5 REQUIRED COMPONENTS Widgets) ++find_package(Qt6 REQUIRED COMPONENTS Widgets) + set(CMAKE_AUTOMOC ON) + + set(octomap_rviz_plugins_headers_to_moc +@@ -22,7 +22,7 @@ set(octomap_rviz_plugins_headers_to_moc + ) + + foreach(header "${octomap_rviz_plugins_headers_to_moc}") +- qt5_wrap_cpp(octomap_rviz_plugins_moc_files "${header}") ++ qt6_wrap_cpp(octomap_rviz_plugins_moc_files "${header}") + endforeach() + + ament_auto_add_library(${PROJECT_NAME} SHARED +@@ -32,12 +32,12 @@ ament_auto_add_library(${PROJECT_NAME} SHARED + ) target_link_libraries(${PROJECT_NAME} - Qt5::Widgets +- Qt5::Widgets - ${OCTOMAP_LIBRARIES} ++ Qt6::Widgets + octomap ) target_include_directories(${PROJECT_NAME} PUBLIC +- ${Qt5Widgets_INCLUDE_DIRS} ++ ${Qt6Widgets_INCLUDE_DIRS} + ) + + target_compile_definitions(${PROJECT_NAME} PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS") diff --git a/distros/jazzy/patch/ros2-py-trees-ros-tutorials.patch b/distros/jazzy/patch/ros2-py-trees-ros-tutorials.patch new file mode 100644 index 000000000..fe24a5ab7 --- /dev/null +++ b/distros/jazzy/patch/ros2-py-trees-ros-tutorials.patch @@ -0,0 +1,212 @@ +diff --git a/py_trees_ros_tutorials/mock/dashboard.py b/py_trees_ros_tutorials/mock/dashboard.py +index 413d3a2..dd9abbd 100644 +--- a/py_trees_ros_tutorials/mock/dashboard.py ++++ b/py_trees_ros_tutorials/mock/dashboard.py +@@ -26,8 +26,8 @@ import sys + import threading + import time + +-import PyQt5.QtCore as qt_core +-import PyQt5.QtWidgets as qt_widgets ++import PyQt6.QtCore as qt_core ++import PyQt6.QtWidgets as qt_widgets + + # To use generated files instead of loading ui's directly + from . import gui +@@ -307,7 +307,7 @@ def main(): + ros_thread = threading.Thread(target=backend.spin) + ros_thread.start() + main_window.show() +- result = app.exec_() ++ result = app.exec() + + # shutdown + backend.node.get_logger().info("joining") +diff --git a/py_trees_ros_tutorials/mock/gui/configuration_group_box.py b/py_trees_ros_tutorials/mock/gui/configuration_group_box.py +index 34f0cd6..9df5366 100644 +--- a/py_trees_ros_tutorials/mock/gui/configuration_group_box.py ++++ b/py_trees_ros_tutorials/mock/gui/configuration_group_box.py +@@ -15,8 +15,8 @@ Launch a qt dashboard for the tutorials. + # Imports + ############################################################################## + +-import PyQt5.QtWidgets as qt_widgets +-import PyQt5.QtCore as qt_core ++import PyQt6.QtWidgets as qt_widgets ++import PyQt6.QtCore as qt_core + + from . import configuration_group_box_ui + +diff --git a/py_trees_ros_tutorials/mock/gui/configuration_group_box_ui.py b/py_trees_ros_tutorials/mock/gui/configuration_group_box_ui.py +index 6b355c2..599b0e8 100644 +--- a/py_trees_ros_tutorials/mock/gui/configuration_group_box_ui.py ++++ b/py_trees_ros_tutorials/mock/gui/configuration_group_box_ui.py +@@ -2,11 +2,11 @@ + + # Form implementation generated from reading ui file 'configuration_group_box.ui' + # +-# Created by: PyQt5 UI code generator 5.10.1 ++# Created by: PyQt6 UI code generator 5.10.1 + # + # WARNING! All changes made in this file will be lost! + +-from PyQt5 import QtCore, QtGui, QtWidgets ++from PyQt6 import QtCore, QtGui, QtWidgets + + class Ui_ConfigurationGroupBox(object): + def setupUi(self, ConfigurationGroupBox): +@@ -24,11 +24,11 @@ class Ui_ConfigurationGroupBox(object): + self.battery_percentage_slider = QtWidgets.QSlider(self.battery_group_box) + self.battery_percentage_slider.setMaximum(100) + self.battery_percentage_slider.setSliderPosition(50) +- self.battery_percentage_slider.setOrientation(QtCore.Qt.Horizontal) +- self.battery_percentage_slider.setTickPosition(QtWidgets.QSlider.NoTicks) ++ self.battery_percentage_slider.setOrientation(QtCore.Qt.Orientation.Horizontal) ++ self.battery_percentage_slider.setTickPosition(QtWidgets.QSlider.TickPosition.NoTicks) + self.battery_percentage_slider.setObjectName("battery_percentage_slider") + self.verticalLayout.addWidget(self.battery_percentage_slider) +- spacerItem = QtWidgets.QSpacerItem(20, 41, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) ++ spacerItem = QtWidgets.QSpacerItem(20, 41, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.verticalLayout.addItem(spacerItem) + self.verticalLayout_2.addWidget(self.battery_group_box) + self.safety_sensors_group_box = QtWidgets.QGroupBox(ConfigurationGroupBox) +@@ -38,7 +38,7 @@ class Ui_ConfigurationGroupBox(object): + self.safety_sensors_enabled_check_box = QtWidgets.QCheckBox(self.safety_sensors_group_box) + self.safety_sensors_enabled_check_box.setObjectName("safety_sensors_enabled_check_box") + self.verticalLayout_3.addWidget(self.safety_sensors_enabled_check_box) +- spacerItem1 = QtWidgets.QSpacerItem(20, 97, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) ++ spacerItem1 = QtWidgets.QSpacerItem(20, 97, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) + self.verticalLayout_3.addItem(spacerItem1) + self.verticalLayout_2.addWidget(self.safety_sensors_group_box) + +diff --git a/py_trees_ros_tutorials/mock/gui/dashboard_group_box.py b/py_trees_ros_tutorials/mock/gui/dashboard_group_box.py +index 8c63710..4d81a9a 100644 +--- a/py_trees_ros_tutorials/mock/gui/dashboard_group_box.py ++++ b/py_trees_ros_tutorials/mock/gui/dashboard_group_box.py +@@ -15,8 +15,8 @@ Launch a qt dashboard for the tutorials. + # Imports + ############################################################################## + +-import PyQt5.QtCore as qt_core +-import PyQt5.QtWidgets as qt_widgets ++import PyQt6.QtCore as qt_core ++import PyQt6.QtWidgets as qt_widgets + import threading + + from . import dashboard_group_box_ui +diff --git a/py_trees_ros_tutorials/mock/gui/dashboard_group_box_ui.py b/py_trees_ros_tutorials/mock/gui/dashboard_group_box_ui.py +index 6fb75bd..7b522e3 100644 +--- a/py_trees_ros_tutorials/mock/gui/dashboard_group_box_ui.py ++++ b/py_trees_ros_tutorials/mock/gui/dashboard_group_box_ui.py +@@ -2,11 +2,11 @@ + + # Form implementation generated from reading ui file 'dashboard_group_box.ui' + # +-# Created by: PyQt5 UI code generator 5.10.1 ++# Created by: PyQt6 UI code generator 5.10.1 + # + # WARNING! All changes made in this file will be lost! + +-from PyQt5 import QtCore, QtGui, QtWidgets ++from PyQt6 import QtCore, QtGui, QtWidgets + + class Ui_DashboardGroupBox(object): + def setupUi(self, DashboardGroupBox): +@@ -15,7 +15,7 @@ class Ui_DashboardGroupBox(object): + self.verticalLayout = QtWidgets.QVBoxLayout(DashboardGroupBox) + self.verticalLayout.setObjectName("verticalLayout") + self.scan_push_button = QtWidgets.QPushButton(DashboardGroupBox) +- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.MinimumExpanding) ++ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.MinimumExpanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.scan_push_button.sizePolicy().hasHeightForWidth()) +@@ -24,7 +24,7 @@ class Ui_DashboardGroupBox(object): + self.scan_push_button.setObjectName("scan_push_button") + self.verticalLayout.addWidget(self.scan_push_button) + self.cancel_push_button = QtWidgets.QPushButton(DashboardGroupBox) +- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.MinimumExpanding) ++ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.MinimumExpanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.cancel_push_button.sizePolicy().hasHeightForWidth()) +@@ -35,16 +35,16 @@ class Ui_DashboardGroupBox(object): + self.cancel_push_button.setObjectName("cancel_push_button") + self.verticalLayout.addWidget(self.cancel_push_button) + self.led_strip_label = QtWidgets.QLabel(DashboardGroupBox) +- sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding) ++ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.MinimumExpanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.led_strip_label.sizePolicy().hasHeightForWidth()) + self.led_strip_label.setSizePolicy(sizePolicy) + self.led_strip_label.setAutoFillBackground(False) + self.led_strip_label.setStyleSheet("font-size: 30pt;") +- self.led_strip_label.setFrameShape(QtWidgets.QFrame.StyledPanel) +- self.led_strip_label.setFrameShadow(QtWidgets.QFrame.Raised) +- self.led_strip_label.setAlignment(QtCore.Qt.AlignCenter) ++ self.led_strip_label.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel) ++ self.led_strip_label.setFrameShadow(QtWidgets.QFrame.Shadow.Raised) ++ self.led_strip_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignCenter) + self.led_strip_label.setObjectName("led_strip_label") + self.verticalLayout.addWidget(self.led_strip_label) + +diff --git a/py_trees_ros_tutorials/mock/gui/main_window.py b/py_trees_ros_tutorials/mock/gui/main_window.py +index 286c606..4e5f072 100644 +--- a/py_trees_ros_tutorials/mock/gui/main_window.py ++++ b/py_trees_ros_tutorials/mock/gui/main_window.py +@@ -15,8 +15,8 @@ Launch a qt dashboard for the tutorials. + # Imports + ############################################################################## + +-import PyQt5.QtCore as qt_core +-import PyQt5.QtWidgets as qt_widgets ++import PyQt6.QtCore as qt_core ++import PyQt6.QtWidgets as qt_widgets + + from . import main_window_ui + +diff --git a/py_trees_ros_tutorials/mock/gui/main_window_rc.py b/py_trees_ros_tutorials/mock/gui/main_window_rc.py +index 45ce91f..d117f6f 100644 +--- a/py_trees_ros_tutorials/mock/gui/main_window_rc.py ++++ b/py_trees_ros_tutorials/mock/gui/main_window_rc.py +@@ -2,11 +2,11 @@ + + # Resource object code + # +-# Created by: The Resource Compiler for PyQt5 (Qt v5.9.5) ++# Created by: The Resource Compiler for PyQt6 (Qt v5.9.5) + # + # WARNING! All changes made in this file will be lost! + +-from PyQt5 import QtCore ++from PyQt6 import QtCore + + qt_resource_data = b"\ + \x00\x00\x1b\xe0\ +diff --git a/py_trees_ros_tutorials/mock/gui/main_window_ui.py b/py_trees_ros_tutorials/mock/gui/main_window_ui.py +index d9a661a..970e899 100644 +--- a/py_trees_ros_tutorials/mock/gui/main_window_ui.py ++++ b/py_trees_ros_tutorials/mock/gui/main_window_ui.py +@@ -2,18 +2,18 @@ + + # Form implementation generated from reading ui file 'main_window.ui' + # +-# Created by: PyQt5 UI code generator 5.10.1 ++# Created by: PyQt6 UI code generator 5.10.1 + # + # WARNING! All changes made in this file will be lost! + +-from PyQt5 import QtCore, QtGui, QtWidgets ++from PyQt6 import QtCore, QtGui, QtWidgets + + class Ui_MainWindow(object): + def setupUi(self, MainWindow): + MainWindow.setObjectName("MainWindow") + MainWindow.resize(551, 356) + icon = QtGui.QIcon() +- icon.addPixmap(QtGui.QPixmap(":/images/tuxrobot.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) ++ icon.addPixmap(QtGui.QPixmap(":/images/tuxrobot.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off) + MainWindow.setWindowIcon(icon) + self.central_layout = QtWidgets.QWidget(MainWindow) + self.central_layout.setObjectName("central_layout") diff --git a/distros/jazzy/patch/ros2-python-qt-binding.patch b/distros/jazzy/patch/ros2-python-qt-binding.patch index 3c5d8d9e7..bce766a86 100644 --- a/distros/jazzy/patch/ros2-python-qt-binding.patch +++ b/distros/jazzy/patch/ros2-python-qt-binding.patch @@ -1,24 +1,59 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 919969e..2bf015a 100644 +index 919969e..1f6b885 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -11,6 +11,7 @@ install(FILES +@@ -11,6 +11,8 @@ install(FILES cmake/shiboken_helper.cmake cmake/sip_configure.py cmake/sip_helper.cmake + cmake/pyproject.toml.in ++ cmake/fixup_sip_module_name.py DESTINATION share/${PROJECT_NAME}/cmake) if(BUILD_TESTING) +diff --git a/cmake/fixup_sip_module_name.py b/cmake/fixup_sip_module_name.py +new file mode 100644 +index 0000000..934af4e +--- /dev/null ++++ b/cmake/fixup_sip_module_name.py +@@ -0,0 +1,31 @@ ++#!/usr/bin/env python3 ++"""Copy PyQt-builder's ABI-tagged sip module to the plain name CMake expects. ++ ++PyQt-builder's pip-based wheel install places the compiled module under a ++Python-ABI-tagged filename using Python's own extension suffix (e.g. ++libfoo.cpython-312-x86_64-linux-gnu.so -- always .so, even on macOS, since ++that's the suffix CPython's import machinery requires for C extensions) ++rather than the plain lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} that ++build_sip_binding()'s callers (and the install() step) expect -- which on ++macOS is .dylib, not .so. So the match can't assume the same extension as ++`want`; only the base name is reliable. Searches recursively since pip ++--target layout can nest the module in a subdirectory, and fails loudly ++(rather than leaving a confusing later "file INSTALL cannot find" CMake ++error) when nothing matches. ++""" ++import glob ++import os ++import shutil ++import sys ++ ++library_dir, want = sys.argv[1], sys.argv[2] ++base = os.path.splitext(want)[0] ++pattern = base + '.*' ++hits = [ ++ f for f in glob.glob(os.path.join(library_dir, '**', pattern), recursive=True) ++ if os.path.basename(f) != want ++] ++if hits: ++ shutil.copyfile(hits[0], os.path.join(library_dir, want)) ++else: ++ available = [] diff --git a/cmake/pyproject.toml.in b/cmake/pyproject.toml.in new file mode 100644 -index 0000000..cf4f57f +index 0000000..e6263dc --- /dev/null +++ b/cmake/pyproject.toml.in -@@ -0,0 +1,34 @@ -+[project] -+name = "lib@PROJECT_NAME@" -+ +@@ -0,0 +1,27 @@ +# Specify sip v5 as the build system for the package. +[build-system] +requires = ["PyQt-builder >=1, <2"] @@ -29,16 +64,11 @@ index 0000000..cf4f57f + +[tool.sip.builder] +qmake = "@QMAKE_EXECUTABLE@" -+qmake-settings = [ -+ "macx:QMAKE_MACOSX_DEPLOYMENT_TARGET = @MACOS_MINIMUM_VERSION@", -+ "CONFIG += c++17", -+] + +[tool.sip.project] +sip-files-dir = "@SIP_FILES_DIR@" +build-dir = "@SIP_BUILD_DIR@" +verbose = true -+minimum-macos-version = "@MACOS_MINIMUM_VERSION@" +# Specify the PEP 566 metadata for the project. +[tool.sip.metadata] +name = "lib@PROJECT_NAME@" @@ -50,23 +80,193 @@ index 0000000..cf4f57f +library-dirs = [@SIP_LIBRARY_DIRS@] +qmake-QT = ["widgets"] +exceptions = true ++ diff --git a/cmake/sip_configure.py b/cmake/sip_configure.py -index 5210ee5..7bafe73 100644 +index 5210ee5..5620533 100644 --- a/cmake/sip_configure.py +++ b/cmake/sip_configure.py -@@ -215,6 +215,7 @@ if sys.platform == 'win32': +@@ -1,10 +1,9 @@ +-import copy ++from copy import copy ++from distutils.spawn import find_executable + import os + import re +-import shutil + import subprocess + import sys +-import tempfile + + import PyQt5 + from PyQt5 import QtCore +@@ -16,9 +15,9 @@ libqt5_rename = False + class Configuration(sipconfig.Configuration): + + def __init__(self): +- env = copy.copy(os.environ) ++ env = copy(os.environ) + env['QT_SELECT'] = '5' +- qmake_exe = 'qmake-qt5' if shutil.which('qmake-qt5') else 'qmake' ++ qmake_exe = 'qmake-qt5' if find_executable('qmake-qt5') else 'qmake' + qtconfig = subprocess.check_output( + [qmake_exe, '-query'], env=env, universal_newlines=True) + qtconfig = dict(line.split(':', 1) for line in qtconfig.splitlines()) +@@ -44,7 +43,7 @@ class Configuration(sipconfig.Configuration): + macros = sipconfig._default_macros.copy() + macros['INCDIR_QT'] = qtconfig['QT_INSTALL_HEADERS'] + macros['LIBDIR_QT'] = qtconfig['QT_INSTALL_LIBS'] +- macros['MOC'] = 'moc-qt5' if shutil.which('moc-qt5') else 'moc' ++ macros['MOC'] = 'moc-qt5' if find_executable('moc-qt5') else 'moc' + self.set_build_macros(macros) + + +@@ -60,30 +59,25 @@ def get_sip_dir_flags(config): + sip_flags = config.pyqt_sip_flags + return sip_dir, sip_flags + except AttributeError: +- pass ++ # sipconfig.Configuration does not have a pyqt_sip_dir or pyqt_sip_flags AttributeError ++ sip_flags = QtCore.PYQT_CONFIGURATION['sip_flags'] + +- # We didn't find the sip_dir and sip_flags from the config, continue looking ++ # Archlinux installs sip files here by default ++ default_sip_dir = os.path.join(PyQt5.__path__[0], 'bindings') ++ if os.path.exists(default_sip_dir): ++ return default_sip_dir, sip_flags + +- # sipconfig.Configuration does not have a pyqt_sip_dir or pyqt_sip_flags AttributeError +- sip_flags = QtCore.PYQT_CONFIGURATION['sip_flags'] ++ # sip4 installs here by default ++ default_sip_dir = os.path.join(sipconfig._pkg_config['default_sip_dir'], 'PyQt5') ++ if os.path.exists(default_sip_dir): ++ return default_sip_dir, sip_flags + +- candidate_sip_dirs = [] +- +- # Archlinux installs sip files here by default +- candidate_sip_dirs.append(os.path.join(PyQt5.__path__[0], 'bindings')) +- +- # sip4 installs here by default +- candidate_sip_dirs.append(os.path.join(sipconfig._pkg_config['default_sip_dir'], 'PyQt5')) +- +- # Homebrew installs sip files here by default +- candidate_sip_dirs.append(os.path.join(sipconfig._pkg_config['default_sip_dir'], 'Qt5')) +- +- for sip_dir in candidate_sip_dirs: +- if os.path.exists(sip_dir): +- return sip_dir, sip_flags +- +- raise FileNotFoundError('The sip directory for PyQt5 could not be located. Please ensure' + +- ' that PyQt5 is installed') ++ # Homebrew installs sip files here by default ++ default_sip_dir = os.path.join(sipconfig._pkg_config['default_sip_dir'], 'Qt5') ++ if os.path.exists(default_sip_dir): ++ return default_sip_dir, sip_flags ++ raise FileNotFoundError('The sip directory for PyQt5 could not be located. Please ensure' + ++ ' that PyQt5 is installed') + + + if len(sys.argv) != 8: +@@ -117,43 +111,16 @@ sip_bin = config.sip_bin + if sys.platform == 'win32' and os.path.isdir(sip_bin): + sip_bin += '.exe' + +-# SIP4 has an incompatibility with Qt 5.15.6. In particular, Qt 5.15.6 uses a new SIP directive +-# called py_ssize_t_clean in QtCoremod.sip that SIP4 does not understand. +-# +-# Unfortunately, the combination of SIP4 and Qt 5.15.6 is common. Archlinux, Ubuntu 22.04 +-# and RHEL-9 all have this combination. On Ubuntu 22.04, there is a custom patch to SIP4 +-# to make it understand the py_ssize_t_clean tag, so the combination works. But on most +-# other platforms, it fails. +-# +-# To workaround this, copy all of the SIP files into a temporary directory, remove the offending +-# line, and then use that temporary directory as the include path. This is unnecessary on +-# Ubuntu 22.04, but shouldn't hurt anything there. +-with tempfile.TemporaryDirectory() as tmpdirname: +- shutil.copytree(sip_dir, tmpdirname, dirs_exist_ok=True) +- +- output = '' +- with open(os.path.join(tmpdirname, 'QtCore', 'QtCoremod.sip'), 'r') as infp: +- for line in infp: +- if line.startswith('%Module(name='): +- result = re.sub(r', py_ssize_t_clean=True', '', line) +- output += result +- else: +- output += line +- +- with open(os.path.join(tmpdirname, 'QtCore', 'QtCoremod.sip'), 'w') as outfp: +- outfp.write(output) +- +- cmd = [ +- sip_bin, +- '-c', build_dir, +- '-b', os.path.join(build_dir, build_file), +- '-I', tmpdirname, +- '-w' +- ] +- cmd += sip_flags.split(' ') +- cmd.append(sip_file) +- +- subprocess.check_call(cmd) ++cmd = [ ++ sip_bin, ++ '-c', build_dir, ++ '-b', os.path.join(build_dir, build_file), ++ '-I', sip_dir, ++ '-w' ++] ++cmd += sip_flags.split(' ') ++cmd.append(sip_file) ++subprocess.check_call(cmd) + + # Create the Makefile. The QtModuleMakefile class provided by the + # pyqtconfig module takes care of all the extra preprocessor, compiler and +@@ -209,14 +176,15 @@ for ldflag in ldflags.split('\\ '): + # redirect location of generated library + makefile._target = '"%s"' % os.path.join(output_dir, makefile._target) + +-# Force c++17 ++# Force c++14 + if sys.platform == 'win32': +- makefile.extra_cxxflags.append('/std:c++17') ++ makefile.extra_cxxflags.append('/std:c++14') ++ makefile.extra_cxxflags.append('/DROS_BUILD_SHARED_LIBS=1') # The __cplusplus flag is not properly set on Windows for backwards # compatibilty. This flag sets it correctly makefile.CXXFLAGS.append('/Zc:__cplusplus') -+ makefile.extra_cxxflags.append('/DROS_BUILD_SHARED_LIBS=1') else: - makefile.extra_cxxflags.append('-std=c++17') +- makefile.extra_cxxflags.append('-std=c++17') ++ makefile.extra_cxxflags.append('-std=c++14') + # Finalise the Makefile, preparing it to be saved to disk + makefile.finalise() diff --git a/cmake/sip_helper.cmake b/cmake/sip_helper.cmake -index a5ac3c2..fdc9c18 100644 +index a5ac3c2..b02ab90 100644 --- a/cmake/sip_helper.cmake +++ b/cmake/sip_helper.cmake -@@ -31,7 +31,7 @@ execute_process( +@@ -5,22 +5,6 @@ set(__PYTHON_QT_BINDING_SIP_HELPER_INCLUDED TRUE) + + set(__PYTHON_QT_BINDING_SIP_HELPER_DIR ${CMAKE_CURRENT_LIST_DIR}) + +-# By default, without the settings below, find_package(Python3) will attempt +-# to find the newest python version it can, and additionally will find the +-# most specific version. For instance, on a system that has +-# /usr/bin/python3.10, /usr/bin/python3.11, and /usr/bin/python3, it will find +-# /usr/bin/python3.11, even if /usr/bin/python3 points to /usr/bin/python3.10. +-# The behavior we want is to prefer the "system" installed version unless the +-# user specifically tells us othewise through the Python3_EXECUTABLE hint. +-# Setting CMP0094 to NEW means that the search will stop after the first +-# python version is found. Setting Python3_FIND_UNVERSIONED_NAMES means that +-# the search will prefer /usr/bin/python3 over /usr/bin/python3.11. And that +-# latter functionality is only available in CMake 3.20 or later, so we need +-# at least that version. +-cmake_minimum_required(VERSION 3.20) +-cmake_policy(SET CMP0094 NEW) +-set(Python3_FIND_UNVERSIONED_NAMES FIRST) +- + find_package(Python3 ${Python3_VERSION} REQUIRED COMPONENTS Interpreter Development) + + execute_process( +@@ -31,17 +15,40 @@ execute_process( if(PYTHON_SIP_EXECUTABLE) string(STRIP ${PYTHON_SIP_EXECUTABLE} SIP_EXECUTABLE) else() @@ -75,7 +275,11 @@ index a5ac3c2..fdc9c18 100644 endif() if(SIP_EXECUTABLE) -@@ -42,6 +42,15 @@ else() + message(STATUS "SIP binding generator available at: ${SIP_EXECUTABLE}") + set(sip_helper_FOUND TRUE) + else() +- message(STATUS "SIP binding generator NOT available.") ++ message(WARNING "SIP binding generator NOT available.") set(sip_helper_NOTFOUND TRUE) endif() @@ -84,14 +288,28 @@ index a5ac3c2..fdc9c18 100644 + COMMAND ${SIP_EXECUTABLE} -V + OUTPUT_VARIABLE SIP_VERSION + ERROR_QUIET) -+ string(STRIP ${SIP_VERSION} SIP_VERSION) -+ message(STATUS "SIP binding generator version: ${SIP_VERSION}") ++ # string(STRIP ${SIP_VERSION} SIP_VERSION) ++ # message(STATUS "SIP binding generator version: ${SIP_VERSION}") ++endif() ++ ++# The sip toolchain always compiles the binding as a CPython C extension, so ++# it always uses Python's own extension suffix (.so on both Linux and macOS, ++# .pyd on Windows) -- never CMAKE_SHARED_LIBRARY_SUFFIX, which is .dylib on ++# macOS and .dll on Windows and would produce a file CPython can't import. ++# This matches the LIBQT_GUI_CPP_SIP_SUFFIX convention qt_gui_cpp_sip's own ++# CMakeLists.txt already uses for its install() rule. ++if(APPLE) ++ set(SIP_MODULE_SUFFIX .so) ++elseif(WIN32) ++ set(SIP_MODULE_SUFFIX .pyd) ++else() ++ set(SIP_MODULE_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}) +endif() + # # Run the SIP generator and compile the generated code into a library. # -@@ -93,34 +102,116 @@ function(build_sip_binding PROJECT_NAME SIP_FILE) +@@ -93,37 +100,114 @@ function(build_sip_binding PROJECT_NAME SIP_FILE) set(LIBRARY_DIRS ${${PROJECT_NAME}_LIBRARY_DIRS}) set(LDFLAGS_OTHER ${${PROJECT_NAME}_LDFLAGS_OTHER}) @@ -106,10 +324,10 @@ index a5ac3c2..fdc9c18 100644 + if(${SIP_VERSION} VERSION_GREATER_EQUAL "5.0.0") + # Since v5, SIP implements the backend per PEP 517, PEP 518 + # Here we synthesize `pyproject.toml` and run `pip install` ++ ++ find_program(QMAKE_EXECUTABLE NAMES qmake6 qmake REQUIRED) - if(NOT EXISTS "${sip_LIBRARY_DIR}") -+ find_program(QMAKE_EXECUTABLE NAMES qmake REQUIRED) -+ + file(REMOVE_RECURSE ${SIP_BUILD_DIR}) file(MAKE_DIRECTORY ${sip_LIBRARY_DIR}) - endif() @@ -162,18 +380,6 @@ index a5ac3c2..fdc9c18 100644 + endforeach() + string(REGEX REPLACE "^," "" SIP_LIBRARY_DIRS ${SIP_LIBRARY_DIRS}) + message(WARNING "test lib dir: ${SIP_LIBRARY_DIRS}") -+ -+ set(MACOS_MINIMUM_VERSION ${CMAKE_OSX_DEPLOYMENT_TARGET}) -+ if(APPLE AND NOT MACOS_MINIMUM_VERSION) -+ if(DEFINED ENV{MACOSX_DEPLOYMENT_TARGET} AND NOT "$ENV{MACOSX_DEPLOYMENT_TARGET}" STREQUAL "") -+ set(MACOS_MINIMUM_VERSION "$ENV{MACOSX_DEPLOYMENT_TARGET}") -+ elseif(DEFINED ENV{OSX_DEPLOYMENT_TARGET} AND NOT "$ENV{OSX_DEPLOYMENT_TARGET}" STREQUAL "") -+ set(MACOS_MINIMUM_VERSION "$ENV{OSX_DEPLOYMENT_TARGET}") -+ else() -+ set(MACOS_MINIMUM_VERSION "12.0") -+ endif() -+ endif() -+ + # TODO: + # I don't know what to do about LDFLAGS_OTHER + # what's the equivalent construct in sip5? @@ -183,8 +389,15 @@ index a5ac3c2..fdc9c18 100644 + ${sip_BINARY_DIR}/sip/pyproject.toml + ) + add_custom_command( -+ OUTPUT ${sip_LIBRARY_DIR}/lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} ++ OUTPUT ${sip_LIBRARY_DIR}/lib${PROJECT_NAME}${SIP_MODULE_SUFFIX} + COMMAND ${Python3_EXECUTABLE} -m pip install . --target ${sip_LIBRARY_DIR} --no-deps --verbose --upgrade ++ # PyQt-builder's wheel install places the compiled module under a ++ # Python ABI-tagged name (e.g. lib${PROJECT_NAME}.cpython-312-x86_64-linux-gnu.so) ++ # rather than the plain lib${PROJECT_NAME}${SIP_MODULE_SUFFIX} this ++ # macro's callers expect, so ninja never sees this OUTPUT get created and ++ # the subsequent install() step fails with "file INSTALL cannot find ...". ++ # Copy whatever tagged variant was actually installed to the expected name. ++ COMMAND ${Python3_EXECUTABLE} ${__PYTHON_QT_BINDING_SIP_HELPER_DIR}/fixup_sip_module_name.py ${sip_LIBRARY_DIR} lib${PROJECT_NAME}${SIP_MODULE_SUFFIX} + DEPENDS ${sip_SIP_CONFIGURE} ${SIP_FILE} ${sip_DEPENDS} + WORKING_DIRECTORY ${sip_BINARY_DIR}/sip + COMMENT "Running SIP-build generator for ${PROJECT_NAME} Python bindings..." @@ -221,7 +434,7 @@ index a5ac3c2..fdc9c18 100644 + endif() + + add_custom_command( -+ OUTPUT ${sip_LIBRARY_DIR}/lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} ++ OUTPUT ${sip_LIBRARY_DIR}/lib${PROJECT_NAME}${SIP_MODULE_SUFFIX} + COMMAND ${MAKE_EXECUTABLE} + DEPENDS ${SIP_BUILD_DIR}/Makefile + WORKING_DIRECTORY ${SIP_BUILD_DIR} @@ -230,9 +443,13 @@ index a5ac3c2..fdc9c18 100644 + endif() add_custom_target(lib${PROJECT_NAME} ALL - DEPENDS ${sip_LIBRARY_DIR}/lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} +- DEPENDS ${sip_LIBRARY_DIR}/lib${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} ++ DEPENDS ${sip_LIBRARY_DIR}/lib${PROJECT_NAME}${SIP_MODULE_SUFFIX} + COMMENT "Meta target for ${PROJECT_NAME} Python bindings..." + ) + add_dependencies(lib${PROJECT_NAME} ${sip_DEPENDENCIES}) diff --git a/src/python_qt_binding/__init__.py b/src/python_qt_binding/__init__.py -index 1e209de..6b55f35 100644 +index 1e209de..6b789a1 100644 --- a/src/python_qt_binding/__init__.py +++ b/src/python_qt_binding/__init__.py @@ -66,3 +66,11 @@ for module_name, module in QT_BINDING_MODULES.items(): @@ -241,14 +458,14 @@ index 1e209de..6b55f35 100644 del sys + +import os -+from PyQt5.QtGui import QIcon ++from PyQt6.QtGui import QIcon +current_theme_path = QIcon.themeSearchPaths() +conda_path = os.environ['CONDA_PREFIX'] +QIcon.setThemeSearchPaths(current_theme_path + [os.path.join(conda_path, 'share/icons/')]) +QIcon.setThemeName('Adwaita') +del os diff --git a/src/python_qt_binding/binding_helper.py b/src/python_qt_binding/binding_helper.py -index 27c3237..781fe62 100644 +index 27c3237..854b21c 100644 --- a/src/python_qt_binding/binding_helper.py +++ b/src/python_qt_binding/binding_helper.py @@ -50,11 +50,7 @@ QT_BINDING_VERSION = None @@ -264,3 +481,339 @@ index 27c3237..781fe62 100644 binding_order = binding_order or DEFAULT_BINDING_ORDER +@@ -95,6 +91,8 @@ def _select_qt_binding(binding_name=None, binding_order=None): + 'QtTest', + 'QtWebChannel', + 'QtWebEngine', # Qt 5.6 and higher ++ 'QtOpenGLWidgets', # Qt 6 ++ 'QtSvgWidgets', # Qt 6 + 'QtWebEngineCore', + 'QtWebEngineWidgets', + 'QtWebKitWidgets', # Qt 5.0 - 5.5 +@@ -151,34 +149,314 @@ def _named_optional_import(name): + + def _load_pyqt(required_modules, optional_modules): + # set environment variable QT_API for matplotlib +- os.environ['QT_API'] = 'pyqt' ++ os.environ['QT_API'] = 'pyqt6' + + # register required and optional PyQt modules + for module_name in required_modules: +- _named_import('PyQt5.%s' % module_name) ++ _named_import('PyQt6.%s' % module_name) + for module_name in optional_modules: +- _named_optional_import('PyQt5.%s' % module_name) ++ _named_optional_import('PyQt6.%s' % module_name) + + # set some names for compatibility with PySide + sys.modules['QtCore'].Signal = sys.modules['QtCore'].pyqtSignal + sys.modules['QtCore'].Slot = sys.modules['QtCore'].pyqtSlot + sys.modules['QtCore'].Property = sys.modules['QtCore'].pyqtProperty + +- # try to register Qwt module +- try: +- import PyQt5.Qwt5 +- _register_binding_module('Qwt', PyQt5.Qwt5) +- except ImportError: +- pass ++ _qt5_compatibility() + + global _loadUi + + def _loadUi(uifile, baseinstance=None, custom_widgets_=None): +- from PyQt5 import uic ++ from PyQt6 import uic + return uic.loadUi(uifile, baseinstance=baseinstance) + +- import PyQt5.QtCore +- return PyQt5.QtCore.PYQT_VERSION_STR ++ import PyQt6.QtCore ++ return PyQt6.QtCore.PYQT_VERSION_STR ++ ++ ++def _make_qregexp(QtCore): ++ """Qt 5's QRegExp, on QRegularExpression (the parts plugins use).""" ++ QRegularExpression = QtCore.QRegularExpression ++ CaseInsensitive = QtCore.Qt.CaseSensitivity.CaseInsensitive ++ ++ class QRegExp(QRegularExpression): ++ RegExp, Wildcard, FixedString, RegExp2, WildcardUnix, W3CXmlSchema11 = range(6) ++ # QRegExp.PatternSyntax(n): the syntax values are plain ints here ++ PatternSyntax = int ++ ++ def __init__(self, pattern='', cs=QtCore.Qt.CaseSensitivity.CaseSensitive, syntax=0): ++ if isinstance(pattern, QRegularExpression): ++ pattern = pattern.pattern() ++ self._source, self._syntax, self._captures = pattern, syntax, [] ++ if syntax in (QRegExp.Wildcard, QRegExp.WildcardUnix): ++ pattern = QRegularExpression.wildcardToRegularExpression(pattern) ++ elif syntax == QRegExp.FixedString: ++ pattern = QRegularExpression.escape(pattern) ++ options = QRegularExpression.PatternOption.NoPatternOption ++ if cs == CaseInsensitive: ++ options = QRegularExpression.PatternOption.CaseInsensitiveOption ++ super(QRegExp, self).__init__(pattern, options) ++ ++ def _keep(self, match): ++ self._captures = list(match.capturedTexts()) if match.hasMatch() else [] ++ return match ++ ++ def exactMatch(self, text): ++ whole = QRegularExpression( ++ QRegularExpression.anchoredPattern(self.pattern()), self.patternOptions()) ++ return self._keep(whole.match(text)).hasMatch() ++ ++ def indexIn(self, text, offset=0): ++ match = self._keep(self.match(text, offset)) ++ return match.capturedStart(0) if match.hasMatch() else -1 ++ ++ def cap(self, n=0): ++ return self._captures[n] if n < len(self._captures) else '' ++ ++ def capturedTexts(self): ++ return list(self._captures) ++ ++ def matchedLength(self): ++ return len(self._captures[0]) if self._captures else -1 ++ ++ def isEmpty(self): ++ return not self._source ++ ++ def setCaseSensitivity(self, cs): ++ options = self.patternOptions() ++ if cs == CaseInsensitive: ++ options |= QRegularExpression.PatternOption.CaseInsensitiveOption ++ else: ++ options &= ~QRegularExpression.PatternOption.CaseInsensitiveOption ++ self.setPatternOptions(options) ++ ++ def caseSensitivity(self): ++ if self.patternOptions() & QRegularExpression.PatternOption.CaseInsensitiveOption: ++ return CaseInsensitive ++ return QtCore.Qt.CaseSensitivity.CaseSensitive ++ ++ return QRegExp ++ ++ ++def _qt5_compatibility(): ++ """Let code written for PyQt5 (most rqt plugins) run on PyQt6 (RoboStack). ++ ++ - enum values also as attributes of their class (Qt.AlignLeft, not only ++ Qt.AlignmentFlag.AlignLeft), as PyQt5 had them ++ - exec_() next to exec() ++ - the classes Qt 6 moved from QtWidgets to QtGui also in QtWidgets ++ - a few Qt 5 methods Qt 6 dropped, as their replacements ++ """ ++ import enum ++ ++ modules = [sys.modules[name] for name in ('QtCore', 'QtGui', 'QtWidgets', 'QtSvg', ++ 'QtOpenGL', 'QtOpenGLWidgets', 'QtNetwork', 'QtPrintSupport') if name in sys.modules] ++ for module in modules: ++ for class_name in dir(module): ++ if not class_name.startswith('Q'): ++ continue ++ cls = getattr(module, class_name) ++ # module-level enums (QtCore.QtMsgType: QtCore.QtCriticalMsg, ...) ++ if isinstance(cls, enum.EnumMeta): ++ for name, member in cls.__members__.items(): ++ if not hasattr(module, name): ++ setattr(module, name, member) ++ continue ++ if not isinstance(cls, type): ++ continue ++ for attr_name in dir(cls): ++ if not attr_name[:1].isupper(): ++ continue ++ attr = getattr(cls, attr_name, None) ++ if isinstance(attr, enum.EnumMeta): ++ # int(enum value), as with PyQt5's int-like enums ++ if not issubclass(attr, int) and '__int__' not in attr.__dict__: ++ try: ++ attr.__int__ = lambda self: int(self.value) ++ attr.__index__ = lambda self: int(self.value) ++ except (AttributeError, TypeError): ++ pass ++ # __members__: also aliases and flag combinations (Qt.AllDockWidgetAreas) ++ for name, member in attr.__members__.items(): ++ if name not in cls.__dict__: ++ try: ++ setattr(cls, name, member) ++ except (AttributeError, TypeError): ++ pass ++ if 'exec' in dir(cls) and 'exec_' not in dir(cls): ++ try: ++ cls.exec_ = cls.exec ++ except (AttributeError, TypeError): ++ pass ++ ++ QtCore = sys.modules.get('QtCore') ++ QtGui = sys.modules.get('QtGui') ++ QtWidgets = sys.modules.get('QtWidgets') ++ if QtCore is not None: ++ if not hasattr(QtCore.Qt, 'MidButton'): ++ QtCore.Qt.MidButton = QtCore.Qt.MouseButton.MiddleButton ++ # Qt.CTRL + Qt.Key_S (Qt 5 ints): Qt 6 combines a modifier and a key into a ++ # QKeyCombination (Qt.ControlModifier | Qt.Key_S), which QKeySequence and QShortcut take ++ if hasattr(QtCore, 'QKeyCombination'): ++ Qt = QtCore.Qt ++ ++ def _key_add(self, other): ++ if isinstance(other, (Qt.Modifier, Qt.KeyboardModifier)): ++ return Qt.KeyboardModifier(int(self.value) | int(other.value)) ++ if isinstance(other, Qt.Key): ++ return QtCore.QKeyCombination(Qt.KeyboardModifier(int(self.value)), other) ++ return NotImplemented ++ for modifier_enum in (Qt.Modifier, Qt.KeyboardModifier): ++ try: ++ modifier_enum.__add__ = _key_add ++ modifier_enum.__radd__ = _key_add ++ except (AttributeError, TypeError): ++ pass ++ # QMutex(QMutex.Recursive): Qt 6 has QRecursiveMutex instead ++ if not hasattr(QtCore.QMutex, 'Recursive') and hasattr(QtCore, 'QRecursiveMutex'): ++ class QMutex(QtCore.QMutex): ++ NonRecursive = 0 ++ Recursive = 1 ++ ++ def __new__(cls, mode=0): ++ if mode == 1: ++ return QtCore.QRecursiveMutex() ++ return super().__new__(cls) ++ ++ def __init__(self, mode=0): ++ super().__init__() ++ QtCore.QMutex = QMutex ++ # QRegExp (gone from Qt 6's QtCore): a QRegularExpression with QRegExp's API, so that ++ # it also works where Qt 6 takes a QRegularExpression (findChildren, validators) ++ if not hasattr(QtCore, 'QRegExp'): ++ QtCore.QRegExp = _make_qregexp(QtCore) ++ # QModelIndex.child(row, column), removed in Qt 6 ++ if not hasattr(QtCore.QModelIndex, 'child'): ++ def _child(self, row, column): ++ model = self.model() ++ return model.index(row, column, self) if model is not None else QtCore.QModelIndex() ++ QtCore.QModelIndex.child = _child ++ # QSortFilterProxyModel.filterRegExp / setFilterRegExp: Qt 6 only has the ++ # QRegularExpression variants (the QRegExp above is one) ++ proxy = getattr(QtCore, 'QSortFilterProxyModel', None) ++ if proxy is not None and not hasattr(proxy, 'filterRegExp'): ++ def _filter_regexp(self): ++ regex = self.filterRegularExpression() ++ return QtCore.QRegExp(regex.pattern(), self.filterCaseSensitivity()) ++ ++ def _set_filter_regexp(self, regex): ++ if not isinstance(regex, QtCore.QRegularExpression): ++ regex = QtCore.QRegExp(regex) ++ self.setFilterRegularExpression(regex) ++ proxy.filterRegExp = _filter_regexp ++ proxy.setFilterRegExp = _set_filter_regexp ++ # QSignalMapper.mapped[int / str / QObject]: Qt 6 has mappedInt, mappedString, mappedObject ++ if hasattr(QtCore, 'QSignalMapper') and not hasattr(QtCore.QSignalMapper, 'mapped'): ++ class _Mapped(object): ++ def __init__(self, mapper): ++ self._mapper = mapper ++ ++ def __getitem__(self, signal_type): ++ if signal_type is int: ++ return self._mapper.mappedInt ++ if signal_type is str: ++ return self._mapper.mappedString ++ return self._mapper.mappedObject ++ ++ def connect(self, slot): ++ return self._mapper.mappedInt.connect(slot) ++ ++ def disconnect(self, *args): ++ return self._mapper.mappedInt.disconnect(*args) ++ QtCore.QSignalMapper.mapped = property(lambda self: _Mapped(self)) ++ if QtWidgets is not None and hasattr(QtWidgets, 'QComboBox'): ++ # QComboBox.currentIndexChanged[str], activated[str], highlighted[str]: Qt 6 has ++ # currentTextChanged, textActivated, textHighlighted instead ++ def _combo_overloads(name, text_name): ++ signal = getattr(QtWidgets.QComboBox, name) ++ ++ class _Overloads(object): ++ def __init__(self, combo): ++ self._bound = signal.__get__(combo, type(combo)) ++ self._combo = combo ++ ++ def __getitem__(self, signal_type): ++ if signal_type is str: ++ return getattr(self._combo, text_name) ++ return self._bound ++ ++ def __getattr__(self, attr): ++ return getattr(self._bound, attr) ++ return property(lambda self: _Overloads(self)) ++ for name, text_name in (('currentIndexChanged', 'currentTextChanged'), ++ ('activated', 'textActivated'), ++ ('highlighted', 'textHighlighted')): ++ if hasattr(QtWidgets.QComboBox, text_name): ++ setattr(QtWidgets.QComboBox, name, _combo_overloads(name, text_name)) ++ # removed in Qt 6 (also used in .ui files: QComboBox::AdjustToMinimumContentsLength) ++ policy = QtWidgets.QComboBox.SizeAdjustPolicy ++ if not hasattr(QtWidgets.QComboBox, 'AdjustToMinimumContentsLength'): ++ QtWidgets.QComboBox.AdjustToMinimumContentsLength = \ ++ policy.AdjustToMinimumContentsLengthWithIcon ++ if QtGui is not None and QtWidgets is not None: ++ for name in ('QAction', 'QActionGroup', 'QShortcut', 'QUndoCommand', 'QUndoGroup', ++ 'QUndoStack', 'QFileSystemModel'): ++ if hasattr(QtGui, name) and not hasattr(QtWidgets, name): ++ setattr(QtWidgets, name, getattr(QtGui, name)) ++ # Qt 5's QtWebEngine module (QWebEngineView, QWebEnginePage), e.g. for rqt_web ++ if 'QtWebEngine' not in sys.modules and 'QtWebEngineWidgets' in sys.modules: ++ import types ++ web_engine = types.ModuleType('QtWebEngine') ++ for module_name in ('QtWebEngineCore', 'QtWebEngineWidgets'): ++ module = sys.modules.get(module_name) ++ if module is not None: ++ for name in dir(module): ++ if name.startswith('Q'): ++ setattr(web_engine, name, getattr(module, name)) ++ _register_binding_module('QtWebEngine', web_engine) ++ if QtGui is not None and not hasattr(QtGui, 'QRegExpValidator') and hasattr(QtGui, 'QRegularExpressionValidator'): ++ QtGui.QRegExpValidator = QtGui.QRegularExpressionValidator ++ QtSvg, QtSvgWidgets = sys.modules.get('QtSvg'), sys.modules.get('QtSvgWidgets') ++ if QtSvg is not None and QtSvgWidgets is not None: ++ for name in ('QGraphicsSvgItem', 'QSvgWidget'): ++ if hasattr(QtSvgWidgets, name) and not hasattr(QtSvg, name): ++ setattr(QtSvg, name, getattr(QtSvgWidgets, name)) ++ if QtGui is not None: ++ # icon themes: conda-forge's Adwaita (>= 41) has only the -symbolic icons (its other ++ # icons moved to AdwaitaLegacy), so fall back to them (RoboStack/ros-noetic#225) ++ if not getattr(QtGui.QIcon.fromTheme, '_robostack', False): ++ _from_theme = QtGui.QIcon.fromTheme ++ ++ def from_theme(name, *fallback): ++ icon = _from_theme(name) ++ if icon.isNull() and not name.endswith('-symbolic'): ++ icon = _from_theme(name + '-symbolic') ++ if icon.isNull() and fallback: ++ return fallback[0] ++ return icon ++ from_theme._robostack = True ++ QtGui.QIcon.fromTheme = staticmethod(from_theme) ++ if not hasattr(QtGui.QPainter, 'HighQualityAntialiasing'): ++ QtGui.QPainter.HighQualityAntialiasing = QtGui.QPainter.RenderHint.Antialiasing ++ if not hasattr(QtGui.QFontMetrics, 'width'): ++ QtGui.QFontMetrics.width = QtGui.QFontMetrics.horizontalAdvance ++ if not hasattr(QtGui.QFontMetricsF, 'width'): ++ QtGui.QFontMetricsF.width = QtGui.QFontMetricsF.horizontalAdvance ++ for event in (QtGui.QMouseEvent, QtGui.QWheelEvent, QtGui.QDropEvent): ++ if hasattr(event, 'position'): ++ if not hasattr(event, 'pos'): ++ event.pos = lambda self: self.position().toPoint() ++ if not hasattr(event, 'posF'): ++ event.posF = lambda self: self.position() ++ if not hasattr(event, 'x'): ++ event.x = lambda self: int(self.position().x()) ++ if not hasattr(event, 'y'): ++ event.y = lambda self: int(self.position().y()) ++ if hasattr(event, 'globalPosition'): ++ if not hasattr(event, 'globalPos'): ++ event.globalPos = lambda self: self.globalPosition().toPoint() ++ if not hasattr(QtGui.QWheelEvent, 'delta'): ++ QtGui.QWheelEvent.delta = lambda self: self.angleDelta().y() + + + def _load_pyside(required_modules, optional_modules): diff --git a/distros/jazzy/patch/ros2-qt-gui-cpp.patch b/distros/jazzy/patch/ros2-qt-gui-cpp.patch index 74af82e37..e330787a0 100644 --- a/distros/jazzy/patch/ros2-qt-gui-cpp.patch +++ b/distros/jazzy/patch/ros2-qt-gui-cpp.patch @@ -1,5 +1,192 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1e8121a..3e8188e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,7 +20,7 @@ if(WIN32) + endif() + + find_package(pluginlib REQUIRED) +-find_package(Qt5 REQUIRED COMPONENTS Widgets) ++find_package(Qt6 REQUIRED COMPONENTS Widgets) + find_package(tinyxml2_vendor REQUIRED) + find_package(TinyXML2 REQUIRED) + +@@ -44,7 +44,7 @@ set(qt_gui_cpp_HDRS + include/qt_gui_cpp/plugin_context.h + ) + +-qt5_wrap_cpp(qt_gui_cpp_MOCS ${qt_gui_cpp_HDRS}) ++qt6_wrap_cpp(qt_gui_cpp_MOCS ${qt_gui_cpp_HDRS}) + + add_library(${PROJECT_NAME} SHARED ${qt_gui_cpp_SRCS} ${qt_gui_cpp_MOCS}) + target_include_directories(${PROJECT_NAME} PUBLIC +@@ -54,7 +54,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC + target_link_libraries(${PROJECT_NAME} + ${QT_QTCORE_LIBRARY} + ${QT_QTGUI_LIBRARY} +- Qt5::Widgets ++ Qt6::Widgets + pluginlib::pluginlib + tinyxml2::tinyxml2) + +diff --git a/cmake/qt_gui_cpp-extras.cmake b/cmake/qt_gui_cpp-extras.cmake +index e5d13da..ae2919c 100644 +--- a/cmake/qt_gui_cpp-extras.cmake ++++ b/cmake/qt_gui_cpp-extras.cmake +@@ -1 +1,2 @@ +-set(qt_gui_cpp_USE_QT_MAJOR_VERSION 5) ++# RoboStack: built with Qt 6 (ros2-qt-gui-cpp.patch) ++set(qt_gui_cpp_USE_QT_MAJOR_VERSION 6) +diff --git a/include/qt_gui_cpp/generic_proxy.h b/include/qt_gui_cpp/generic_proxy.h +index 1405748..f5c9384 100644 +--- a/include/qt_gui_cpp/generic_proxy.h ++++ b/include/qt_gui_cpp/generic_proxy.h +@@ -35,6 +35,13 @@ + + #include + ++// Q_ARG/Q_RETURN_ARG now build QMetaMethodArgument/QTemplatedMetaMethodReturnArgument ++// for Qt's templated invokeMethod overloads, which are no longer QGenericArgument/ ++// QGenericReturnArgument themselves. This proxy predates that change and still ++// trades in the old generic types, so build those directly instead. ++#define QGC_ARG(Type, data) QArgument(#Type, data) ++#define QGC_RETURN_ARG(Type, data) QGenericReturnArgument(#Type, static_cast(&(data))) ++ + namespace qt_gui_cpp + { + +diff --git a/src/qt_gui_cpp/plugin_context.cpp b/src/qt_gui_cpp/plugin_context.cpp +index 225c248..bb53855 100644 +--- a/src/qt_gui_cpp/plugin_context.cpp ++++ b/src/qt_gui_cpp/plugin_context.cpp +@@ -62,13 +62,13 @@ const QStringList& PluginContext::argv() const + + void PluginContext::addWidget(QWidget* widget) + { +- bool rc = proxy_.invokeMethod("add_widget", Q_ARG(QWidget*, widget)); ++ bool rc = proxy_.invokeMethod("add_widget", QGC_ARG(QWidget*, widget)); + if (!rc) throw std::runtime_error("PluginContext::addWidget() invoke method failed"); + } + + void PluginContext::removeWidget(QWidget* widget) + { +- bool rc = proxy_.invokeMethod("remove_widget", Q_ARG(QWidget*, widget)); ++ bool rc = proxy_.invokeMethod("remove_widget", QGC_ARG(QWidget*, widget)); + if (!rc) throw std::runtime_error("PluginContext::removeWidget() invoke method failed"); + } + +diff --git a/src/qt_gui_cpp/plugin_provider.cpp b/src/qt_gui_cpp/plugin_provider.cpp +index 0ba8312..1804390 100644 +--- a/src/qt_gui_cpp/plugin_provider.cpp ++++ b/src/qt_gui_cpp/plugin_provider.cpp +@@ -49,10 +49,18 @@ QMap PluginProvider::discover(QObject* discovery_data) + // extract plugin descriptor dictionary + PluginDescriptor* descriptor = *it; + QMap plugin = descriptor->toDictionary(); +- plugins.unite(plugin); ++ for (auto it = plugin.constBegin(); it != plugin.constEnd(); ++it) ++ { ++ plugins.insert(it.key(), it.value()); ++ } + delete descriptor; + } +- return plugins; ++ QMap result; ++ for (auto it = plugins.constBegin(); it != plugins.constEnd(); ++it) ++ { ++ result.insert(it.key(), it.value()); ++ } ++ return result; + } + + QList PluginProvider::discover_descriptors(QObject* discovery_data) +diff --git a/src/qt_gui_cpp/settings.cpp b/src/qt_gui_cpp/settings.cpp +index 166d159..e86d1f9 100644 +--- a/src/qt_gui_cpp/settings.cpp ++++ b/src/qt_gui_cpp/settings.cpp +@@ -43,7 +43,7 @@ Settings::Settings(QObject* obj) + Settings Settings::getSettings(const QString& prefix) + { + Settings settings(proxy_.proxiedObject()); +- bool rc = proxy_.invokeMethodWithReturn("get_settings", Q_RETURN_ARG(Settings, settings), Q_ARG(QString, prefix)); ++ bool rc = proxy_.invokeMethodWithReturn("get_settings", QGC_RETURN_ARG(Settings, settings), QGC_ARG(QString, prefix)); + if (!rc) throw std::runtime_error("Settings::get_settings() invoke method failed"); + return settings; + } +@@ -51,7 +51,7 @@ Settings Settings::getSettings(const QString& prefix) + QStringList Settings::allKeys() const + { + QStringList list; +- bool rc = const_cast(this)->proxy_.invokeMethodWithReturn("all_keys", Q_RETURN_ARG(QStringList, list)); ++ bool rc = const_cast(this)->proxy_.invokeMethodWithReturn("all_keys", QGC_RETURN_ARG(QStringList, list)); + if (!rc) throw std::runtime_error("Settings::all_keys() invoke method failed"); + return list; + } +@@ -59,7 +59,7 @@ QStringList Settings::allKeys() const + QStringList Settings::childGroups() const + { + QStringList list; +- bool rc = const_cast(this)->proxy_.invokeMethodWithReturn("child_groups", Q_RETURN_ARG(QStringList, list)); ++ bool rc = const_cast(this)->proxy_.invokeMethodWithReturn("child_groups", QGC_RETURN_ARG(QStringList, list)); + if (!rc) throw std::runtime_error("Settings::child_groups() invoke method failed"); + return list; + } +@@ -67,7 +67,7 @@ QStringList Settings::childGroups() const + QStringList Settings::childKeys() const + { + QStringList list; +- bool rc = const_cast(this)->proxy_.invokeMethodWithReturn("child_keys", Q_RETURN_ARG(QStringList, list)); ++ bool rc = const_cast(this)->proxy_.invokeMethodWithReturn("child_keys", QGC_RETURN_ARG(QStringList, list)); + if (!rc) throw std::runtime_error("Settings::child_keys() invoke method failed"); + return list; + } +@@ -75,27 +75,27 @@ QStringList Settings::childKeys() const + bool Settings::contains(const QString& key) const + { + bool flag = false; +- bool rc = const_cast(this)->proxy_.invokeMethodWithReturn("contains", Q_RETURN_ARG(bool, flag), Q_ARG(QString, key)); ++ bool rc = const_cast(this)->proxy_.invokeMethodWithReturn("contains", QGC_RETURN_ARG(bool, flag), QGC_ARG(QString, key)); + if (!rc) throw std::runtime_error("Settings::contains() invoke method failed"); + return flag; + } + + void Settings::remove(const QString& key) + { +- bool rc = proxy_.invokeMethod("remove", Q_ARG(QString, key)); ++ bool rc = proxy_.invokeMethod("remove", QGC_ARG(QString, key)); + if (!rc) throw std::runtime_error("Settings::remove() invoke method failed"); + } + + void Settings::setValue(const QString& key, const QVariant& value) + { +- bool rc = proxy_.invokeMethod("set_value", Q_ARG(QString, key), Q_ARG(QVariant, value)); ++ bool rc = proxy_.invokeMethod("set_value", QGC_ARG(QString, key), QGC_ARG(QVariant, value)); + if (!rc) throw std::runtime_error("Settings::set_value() invoke method failed"); + } + + QVariant Settings::value(const QString& key, const QVariant& defaultValue) const + { + QVariant val; +- bool rc = const_cast(this)->proxy_.invokeMethodWithReturn("value", Q_RETURN_ARG(QVariant, val), Q_ARG(QString, key), Q_ARG(QVariant, defaultValue)); ++ bool rc = const_cast(this)->proxy_.invokeMethodWithReturn("value", QGC_RETURN_ARG(QVariant, val), QGC_ARG(QString, key), QGC_ARG(QVariant, defaultValue)); + if (!rc) throw std::runtime_error("Settings::value() invoke method failed"); + return val; + } +diff --git a/src/qt_gui_cpp_shiboken/CMakeLists.txt b/src/qt_gui_cpp_shiboken/CMakeLists.txt +index e19e12f..fb87e50 100644 +--- a/src/qt_gui_cpp_shiboken/CMakeLists.txt ++++ b/src/qt_gui_cpp_shiboken/CMakeLists.txt +@@ -1,3 +1,8 @@ ++# PySide2 has no python 3.14 build (and upstream itself disabled this binding due to ++# known PySide bugs, see https://bugs.launchpad.net/ubuntu/+source/pyside6/+bug/2146611); ++# the qt_gui_cpp_sip binding (PyQt6) below is used instead. ++return() ++ + find_package(Qt5Widgets REQUIRED) + set(qt_gui_cpp_shiboken_QT_COMPONENTS + QtCore diff --git a/src/qt_gui_cpp_sip/CMakeLists.txt b/src/qt_gui_cpp_sip/CMakeLists.txt -index 47c24958..d5a95d48 100644 +index 47c2495..cc68fea 100644 --- a/src/qt_gui_cpp_sip/CMakeLists.txt +++ b/src/qt_gui_cpp_sip/CMakeLists.txt @@ -28,7 +28,7 @@ set(qt_gui_cpp_sip_DEPENDENT_FILES @@ -14,7 +201,7 @@ index 47c24958..d5a95d48 100644 @@ -51,16 +51,28 @@ cmake_minimum_required(VERSION 3.20) cmake_policy(SET CMP0094 NEW) set(Python3_FIND_UNVERSIONED_NAMES FIRST) - + -find_package(Python3 REQUIRED COMPONENTS Development) +find_package(Python REQUIRED COMPONENTS Development) +# Prefer legacy libGL.so over the modular libOpenGL.so so that OpenGL::GL is @@ -43,7 +230,7 @@ index 47c24958..d5a95d48 100644 if(TARGET ${_lib_name}) # Use a nifty cmake generator expression to resolve the target location list(APPEND qt_gui_cpp_sip_LIBRARIES $) -@@ -84,6 +96,20 @@ if(sip_helper_FOUND) +@@ -83,6 +95,20 @@ if(sip_helper_FOUND) list(APPEND qt_gui_cpp_BINDINGS "sip") set(qt_gui_cpp_BINDINGS "${qt_gui_cpp_BINDINGS}" PARENT_SCOPE) @@ -86,3 +273,16 @@ index 47c24958..d5a95d48 100644 endif() install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libqt_gui_cpp_sip${LIBQT_GUI_CPP_SIP_SUFFIX} +diff --git a/src/qt_gui_cpp_sip/qt_gui_cpp.sip b/src/qt_gui_cpp_sip/qt_gui_cpp.sip +index cd02078..38ed997 100644 +--- a/src/qt_gui_cpp_sip/qt_gui_cpp.sip ++++ b/src/qt_gui_cpp_sip/qt_gui_cpp.sip +@@ -4,7 +4,7 @@ + %Import QtGui/QtGuimod.sip + %Import QtWidgets/QtWidgetsmod.sip + +-%DefaultSupertype sip.simplewrapper ++%DefaultSupertype PyQt6.sip.simplewrapper + + %Include composite_plugin_provider.sip + %Include generic_proxy.sip diff --git a/distros/jazzy/patch/ros2-ros-image-to-qimage.patch b/distros/jazzy/patch/ros2-ros-image-to-qimage.patch new file mode 100644 index 000000000..ab578def2 --- /dev/null +++ b/distros/jazzy/patch/ros2-ros-image-to-qimage.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 73439fc..9d8f73c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,7 +9,7 @@ endif() + find_package(ament_cmake REQUIRED) + find_package(ament_cmake_python REQUIRED) + find_package(sensor_msgs REQUIRED) +-find_package(Qt5Widgets REQUIRED) ++find_package(Qt6Widgets REQUIRED) + find_package(cv_bridge REQUIRED) + find_package(python_qt_binding REQUIRED) + find_package(ament_cmake_pytest REQUIRED) +@@ -20,7 +20,7 @@ target_include_directories(ros_image_to_qimage PUBLIC + $) + ament_target_dependencies(ros_image_to_qimage + sensor_msgs +- Qt5Widgets ++ Qt6Widgets + cv_bridge) + + install( +@@ -42,7 +42,7 @@ ament_export_include_directories( + ament_export_libraries( + ros_image_to_qimage + ) +-ament_export_dependencies(Qt5Widgets) ++ament_export_dependencies(Qt6Widgets) + ament_export_dependencies(sensor_msgs) + ament_export_dependencies(cv_bridge) + ament_export_dependencies(python_qt_binding) diff --git a/distros/jazzy/patch/ros2-rqt-gui-cpp.linux.patch b/distros/jazzy/patch/ros2-rqt-gui-cpp.linux.patch new file mode 100644 index 000000000..a099ace10 --- /dev/null +++ b/distros/jazzy/patch/ros2-rqt-gui-cpp.linux.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index df6a3ac..debc486 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -28,6 +28,22 @@ find_package(rclcpp REQUIRED) + find_package(qt_gui REQUIRED) + find_package(qt_gui_cpp REQUIRED) + ++# A dumb change to remove the last item from Qt6Widgets include directories as it ++# points to the `_build_env/...` Gl. This folder doesn't stay constant across builds! ++foreach(ICDIR ${Qt6Widgets_INCLUDE_DIRS}) ++ if (ICDIR MATCHES _build_env/x86_64-conda-linux-gnu/sysroot/usr/include OR ++ ICDIR MATCHES _build_env/aarch64-conda-linux-gnu/sysroot/usr/include) ++ message("REMOVING ${ICDIR}") ++ list(REMOVE_ITEM Qt6Widgets_INCLUDE_DIRS ${ICDIR}) ++ break() ++ endif() ++endforeach() ++if(Qt6Widgets_INCLUDE_DIRS) ++ message(${Qt6Widgets_INCLUDE_DIRS}) ++endif() ++# find_path(GL_PATH GL/gl.h) ++# list(REMOVE_ITEM Qt6Widgets_INCLUDE_DIRS GL_PATH) ++ + ament_export_dependencies( + Qt6Widgets + pluginlib diff --git a/distros/jazzy/patch/ros2-rqt-gui-cpp.patch b/distros/jazzy/patch/ros2-rqt-gui-cpp.patch new file mode 100644 index 000000000..731d39f9c --- /dev/null +++ b/distros/jazzy/patch/ros2-rqt-gui-cpp.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2b039be..30ebeba 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -24,7 +24,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) + set(CMAKE_AUTOMOC ON) + + find_package(pluginlib REQUIRED) +-find_package(Qt5 REQUIRED COMPONENTS Widgets) ++find_package(Qt6 REQUIRED COMPONENTS Widgets) + find_package(rclcpp REQUIRED) + find_package(qt_gui_cpp REQUIRED) + +@@ -52,7 +52,7 @@ target_link_libraries(${PROJECT_NAME} PUBLIC + + target_link_libraries(${PROJECT_NAME} PRIVATE + pluginlib::pluginlib +- Qt5::Widgets ++ Qt6::Widgets + ) + + install( diff --git a/distros/jazzy/patch/ros2-rqt-image-overlay-layer.patch b/distros/jazzy/patch/ros2-rqt-image-overlay-layer.patch new file mode 100644 index 000000000..6d9ac16a0 --- /dev/null +++ b/distros/jazzy/patch/ros2-rqt-image-overlay-layer.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 338d2ed..e50d872 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -10,7 +10,7 @@ find_package(rclcpp REQUIRED) + find_package(rosidl_runtime_cpp REQUIRED) + find_package(rcpputils REQUIRED) + find_package(pluginlib REQUIRED) +-find_package(Qt5Widgets REQUIRED) ++find_package(Qt6Widgets REQUIRED) + find_package(message_filters REQUIRED) + + install( +@@ -31,7 +31,7 @@ ament_export_dependencies(rclcpp) + ament_export_dependencies(rosidl_runtime_cpp) + ament_export_dependencies(rcpputils) + ament_export_dependencies(pluginlib) +-ament_export_dependencies(Qt5Widgets) ++ament_export_dependencies(Qt6Widgets) + ament_export_dependencies(message_filters) + + ament_package() diff --git a/distros/jazzy/patch/ros2-rqt-image-overlay.patch b/distros/jazzy/patch/ros2-rqt-image-overlay.patch new file mode 100644 index 000000000..d51cd9fbe --- /dev/null +++ b/distros/jazzy/patch/ros2-rqt-image-overlay.patch @@ -0,0 +1,39 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9ca7c70..94de143 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -14,7 +14,7 @@ find_package(rclcpp REQUIRED) + find_package(pluginlib REQUIRED) + find_package(rqt_gui_cpp REQUIRED) + find_package(image_transport REQUIRED) +-find_package(Qt5Widgets REQUIRED) ++find_package(Qt6Widgets REQUIRED) + find_package(ros_image_to_qimage REQUIRED) + find_package(rqt_image_overlay_layer REQUIRED) + +@@ -29,14 +29,14 @@ set(SOURCES + src/list_image_topics.cpp + src/color_dialog_delegate.cpp + src/overlay_manager_view.cpp) +-qt5_wrap_cpp(SOURCES # Must do this for qt's Meta-Object Compiler. ++qt6_wrap_cpp(SOURCES # Must do this for qt's Meta-Object Compiler. + src/image_overlay.hpp + src/composition_frame.hpp + src/compositor.hpp + src/image_manager.hpp + src/color_dialog_delegate.hpp + src/overlay_manager_view.hpp) +-qt5_wrap_ui(UIS resource/image_overlay.ui resource/configuration_dialog.ui) ++qt6_wrap_ui(UIS resource/image_overlay.ui resource/configuration_dialog.ui) + add_library(rqt_image_overlay SHARED + ${SOURCES} + ${UIS}) +@@ -47,7 +47,7 @@ ament_target_dependencies(rqt_image_overlay + rclcpp + rqt_gui_cpp + image_transport +- Qt5Widgets ++ Qt6Widgets + ros_image_to_qimage + rqt_image_overlay_layer) + diff --git a/distros/jazzy/patch/ros2-rqt-image-view.patch b/distros/jazzy/patch/ros2-rqt-image-view.patch index fede12eba..16c1f6722 100644 --- a/distros/jazzy/patch/ros2-rqt-image-view.patch +++ b/distros/jazzy/patch/ros2-rqt-image-view.patch @@ -1,7 +1,62 @@ -diff -ruN a/src/rqt_image_view/image_view.cpp b/src/rqt_image_view/image_view.cpp +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5cba001..bb01974 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -29,7 +29,7 @@ find_package(image_transport REQUIRED) + find_package(sensor_msgs REQUIRED) + find_package(geometry_msgs REQUIRED) + find_package(cv_bridge REQUIRED) +-find_package(Qt5Widgets REQUIRED) ++find_package(Qt6Widgets REQUIRED) + find_package(ament_cmake_python REQUIRED) + + set(rqt_image_view_SRCS +@@ -46,9 +46,9 @@ set(rqt_image_view_UIS + src/rqt_image_view/image_view.ui + ) + +-qt5_wrap_cpp(rqt_image_view_MOCS ${rqt_image_view_HDRS}) ++qt6_wrap_cpp(rqt_image_view_MOCS ${rqt_image_view_HDRS}) + +-qt5_wrap_ui(rqt_image_view_UIS_H ${rqt_image_view_UIS}) ++qt6_wrap_ui(rqt_image_view_UIS_H ${rqt_image_view_UIS}) + + add_library(${PROJECT_NAME} SHARED + ${rqt_image_view_SRCS} +@@ -67,7 +67,7 @@ target_link_libraries(${PROJECT_NAME} PUBLIC + image_transport::image_transport + ${sensor_msgs_TARGETS} + ${geometry_msgs_TARGETS} +- Qt5::Widgets ++ Qt6::Widgets + ) + target_link_libraries(${PROJECT_NAME} PRIVATE + cv_bridge::cv_bridge) +diff --git a/src/rqt_image_view/image_view.cpp b/src/rqt_image_view/image_view.cpp +index d311017..ae3de22 100644 --- a/src/rqt_image_view/image_view.cpp +++ b/src/rqt_image_view/image_view.cpp -@@ -571,7 +571,7 @@ +@@ -38,6 +38,8 @@ + #include + #include + ++#include ++#include + #include + #include + #include +@@ -91,8 +93,8 @@ void ImageView::initPlugin(qt_gui_cpp::PluginContext& context) + + ui_.image_frame->setOuterLayout(ui_.image_layout); + +- QRegExp rx("([a-zA-Z/][a-zA-Z0-9_/]*)?"); //see http://www.ros.org/wiki/ROS/Concepts#Names.Valid_Names (but also accept an empty field) +- ui_.publish_click_location_topic_line_edit->setValidator(new QRegExpValidator(rx, this)); ++ QRegularExpression rx("([a-zA-Z/][a-zA-Z0-9_/]*)?"); //see http://www.ros.org/wiki/ROS/Concepts#Names.Valid_Names (but also accept an empty field) ++ ui_.publish_click_location_topic_line_edit->setValidator(new QRegularExpressionValidator(rx, this)); + connect(ui_.publish_click_location_check_box, SIGNAL(toggled(bool)), this, SLOT(onMousePublish(bool))); + connect(ui_.image_frame, SIGNAL(mouseLeft(int, int)), this, SLOT(onMouseLeft(int, int))); + connect(ui_.publish_click_location_topic_line_edit, SIGNAL(editingFinished()), this, SLOT(onPubTopicChanged())); +@@ -571,7 +573,7 @@ void ImageView::callbackImage(const sensor_msgs::msg::Image::ConstSharedPtr& msg conversion_mat_ = cv_ptr->image; } else if (msg->encoding == "8UC1") { // convert gray to rgb @@ -10,7 +65,7 @@ diff -ruN a/src/rqt_image_view/image_view.cpp b/src/rqt_image_view/image_view.cp } else if (msg->encoding == "16UC1" || msg->encoding == "32FC1") { // scale / quantify double min = 0; -@@ -589,7 +589,7 @@ +@@ -589,7 +591,7 @@ void ImageView::callbackImage(const sensor_msgs::msg::Image::ConstSharedPtr& msg } cv::Mat img_scaled_8u; cv::Mat(cv_ptr->image-min).convertTo(img_scaled_8u, CV_8UC1, 255. / (max - min)); diff --git a/distros/jazzy/patch/ros2-rqt-msg.patch b/distros/jazzy/patch/ros2-rqt-msg.patch new file mode 100644 index 000000000..dd911453f --- /dev/null +++ b/distros/jazzy/patch/ros2-rqt-msg.patch @@ -0,0 +1,44 @@ +diff --git a/src/rqt_msg/messages_tree_model.py b/src/rqt_msg/messages_tree_model.py +index 0622b8c..4e5fbda 100644 +--- a/src/rqt_msg/messages_tree_model.py ++++ b/src/rqt_msg/messages_tree_model.py +@@ -33,7 +33,38 @@ + + from python_qt_binding.QtGui import QStandardItem + +-from rqt_py_common.message_helpers import get_message_constants_from_class ++try: ++ from rqt_py_common.message_helpers import get_message_constants_from_class ++except ImportError: ++ # RoboStack: no released rqt_py_common has this helper yet ++ # (https://github.com/ros-visualization/rqt_msg/issues/37) ++ import os ++ import re ++ ++ def get_message_constants_from_class(message): ++ """Return [(type, name, value)] of the constants of a message (instance or class).""" ++ msg_class = message if isinstance(message, type) else type(message) ++ metaclass = type(msg_class) ++ constants = getattr(metaclass, '_%s__constants' % metaclass.__name__, None) or {} ++ if not constants: ++ return [] ++ # the constant types are only in the interface file ++ types = {} ++ package = msg_class.__module__.split('.')[0] ++ kind = msg_class.__module__.split('.')[1] if '.' in msg_class.__module__ else 'msg' ++ name = re.sub(r'_(Request|Response|Event|Goal|Result|Feedback)$', '', msg_class.__name__) ++ try: ++ from ament_index_python.packages import get_package_share_directory ++ path = os.path.join(get_package_share_directory(package), kind, '%s.%s' % (name, kind)) ++ with open(path) as f: ++ for line in f: ++ match = re.match(r'\s*([\w/\[\]<=]+)\s+([A-Z][A-Z0-9_]*)\s*=', line) ++ if match: ++ types.setdefault(match.group(2), match.group(1)) ++ except Exception: # noqa: B902 (no interface file: fall back to the Python types) ++ pass ++ return [(types.get(n, type(v).__name__), n, v) for n, v in constants.items()] ++ + from rqt_py_common.message_tree_model import MessageTreeModel + + diff --git a/distros/jazzy/patch/ros2-rtabmap-rviz-plugins.patch b/distros/jazzy/patch/ros2-rtabmap-rviz-plugins.patch new file mode 100644 index 000000000..3c3c1230a --- /dev/null +++ b/distros/jazzy/patch/ros2-rtabmap-rviz-plugins.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4e47a684a..9e071e0b8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -15,7 +15,7 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") + endif() + + # Make sure it is first to prevent Qt6 from claiming the generic versionless targets first +-find_package(Qt5 QUIET COMPONENTS Widgets) ++find_package(Qt6 QUIET COMPONENTS Widgets) + + find_package(ament_cmake_ros REQUIRED) + find_package(pcl_conversions REQUIRED) diff --git a/distros/jazzy/patch/ros2-rviz-common.patch b/distros/jazzy/patch/ros2-rviz-common.patch new file mode 100644 index 000000000..a04d03ce3 --- /dev/null +++ b/distros/jazzy/patch/ros2-rviz-common.patch @@ -0,0 +1,340 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a1ac6f0a..56f5848a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -31,7 +31,14 @@ find_package(ament_cmake REQUIRED) + # do find_package(rviz_ogre_vendor) first to make sure the custom OGRE is found + find_package(rviz_ogre_vendor REQUIRED) + +-find_package(Qt5 REQUIRED COMPONENTS Widgets) ++find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets) ++find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets) ++if(${QT_VERSION} VERSION_LESS 5.15.0) ++ function(qt_wrap_cpp out) ++ qt5_wrap_cpp(_sources ${ARGN}) ++ set("${out}" ${_sources} PARENT_SCOPE) ++ endfunction() ++endif() + + find_package(geometry_msgs REQUIRED) + find_package(pluginlib REQUIRED) +@@ -132,7 +139,7 @@ set(rviz_common_headers_to_moc + ) + + foreach(header "${rviz_common_headers_to_moc}") +- qt5_wrap_cpp(rviz_common_moc_files "${header}") ++ qt_wrap_cpp(rviz_common_moc_files "${header}") + endforeach() + + set(rviz_common_source_files +@@ -241,7 +248,7 @@ target_link_libraries(rviz_common PUBLIC + ${geometry_msgs_TARGETS} + message_filters::message_filters + pluginlib::pluginlib +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + rclcpp::rclcpp + rviz_ogre_vendor::OgreMain + rviz_ogre_vendor::OgreOverlay +@@ -267,7 +274,7 @@ ament_export_dependencies( + geometry_msgs + message_filters + pluginlib +- Qt5 ++ Qt${QT_VERSION_MAJOR} + rclcpp + rviz_ogre_vendor + rviz_rendering +@@ -326,10 +333,10 @@ if(BUILD_TESTING) + find_package(ament_cmake_gmock REQUIRED) + find_package(ament_cmake_gtest REQUIRED) + +- qt5_wrap_cpp(rviz_common_test_moc_files test/mock_display.hpp) +- qt5_wrap_cpp(rviz_common_test_moc_files test/mock_property_change_receiver.hpp) ++ qt_wrap_cpp(rviz_common_test_moc_files test/mock_display.hpp) ++ qt_wrap_cpp(rviz_common_test_moc_files test/mock_property_change_receiver.hpp) + +- qt5_wrap_cpp(rviz_common_test_frame_manager_moc src/rviz_common/frame_manager.hpp) ++ qt_wrap_cpp(rviz_common_test_frame_manager_moc src/rviz_common/frame_manager.hpp) + + ament_add_gmock(display_factory_test + test/display_factory_test.cpp +@@ -338,7 +345,7 @@ if(BUILD_TESTING) + if(TARGET display_factory_test) + target_compile_definitions(display_factory_test PUBLIC + -D_TEST_PLUGIN_DESCRIPTIONS="${CMAKE_CURRENT_SOURCE_DIR}") +- target_link_libraries(display_factory_test rviz_common Qt5::Widgets) ++ target_link_libraries(display_factory_test rviz_common Qt${QT_VERSION_MAJOR}::Widgets) + endif() + + ament_add_gmock(frame_manager_test +@@ -447,7 +454,7 @@ if(BUILD_TESTING) + test/mock_property_change_receiver.cpp + ${SKIP_DISPLAY_TESTS}) + if(TARGET rviz_common_display_test) +- target_link_libraries(rviz_common_display_test rviz_common Qt5::Widgets yaml-cpp::yaml-cpp) ++ target_link_libraries(rviz_common_display_test rviz_common Qt${QT_VERSION_MAJOR}::Widgets yaml-cpp::yaml-cpp) + endif() + endif() + +diff --git a/include/rviz_common/properties/ros_action_property.hpp b/include/rviz_common/properties/ros_action_property.hpp +index a47d9793..39e77d77 100644 +--- a/include/rviz_common/properties/ros_action_property.hpp ++++ b/include/rviz_common/properties/ros_action_property.hpp +@@ -30,7 +30,7 @@ + #define RVIZ_COMMON__PROPERTIES__ROS_ACTION_PROPERTY_HPP_ + + #include +-#include ++#include + #include + + #include +@@ -90,20 +90,20 @@ public: + const QString & default_value = QString(), + const QString & action_type = QString(), + const QString & description = QString(), +- const QRegExp & filter = QRegExp(), ++ const QRegularExpression & filter = QRegularExpression(), + Property * parent = 0, + const char * changed_slot = 0, + QObject * receiver = 0); + + void enableFilter(bool enabled); + +- QRegExp filter() const; ++ QRegularExpression filter() const; + + protected Q_SLOTS: + void fillActionList() override; + + private: +- QRegExp filter_; ++ QRegularExpression filter_; + bool filter_enabled_; + }; + +diff --git a/include/rviz_common/properties/ros_topic_property.hpp b/include/rviz_common/properties/ros_topic_property.hpp +index c55303e6..76c546b9 100644 +--- a/include/rviz_common/properties/ros_topic_property.hpp ++++ b/include/rviz_common/properties/ros_topic_property.hpp +@@ -31,6 +31,9 @@ + + #include + ++#include // NOLINT: cpplint is unable to handle the include order here ++#include // NOLINT: cpplint is unable to handle the include order here ++ + #include "rviz_common/properties/editable_enum_property.hpp" + #include "rviz_common/ros_integration/ros_node_abstraction_iface.hpp" + #include "rviz_common/visibility_control.hpp" +@@ -89,20 +92,20 @@ public: + const QString & default_value = QString(), + const QString & message_type = QString(), + const QString & description = QString(), +- const QRegExp & filter = QRegExp(), ++ const QRegularExpression & filter = QRegularExpression(), + Property * parent = 0, + const char * changed_slot = 0, + QObject * receiver = 0); + + void enableFilter(bool enabled); + +- QRegExp filter() const; ++ QRegularExpression filter() const; + + protected Q_SLOTS: + void fillTopicList() override; + + private: +- QRegExp filter_; ++ QRegularExpression filter_; + bool filter_enabled_; + }; + +diff --git a/rviz_common-extras.cmake b/rviz_common-extras.cmake +index 5a719eda..f3c88a8d 100644 +--- a/rviz_common-extras.cmake ++++ b/rviz_common-extras.cmake +@@ -27,4 +27,5 @@ + + # find package Qt5 because otherwise using the rviz_common::rviz_common + # exported target will complain that the Qt5::Widgets target does not exist +-find_package(Qt5 REQUIRED QUIET COMPONENTS Widgets) ++find_package(QT NAMES Qt6 Qt5 QUIET COMPONENTS Widgets) ++find_package(Qt${QT_VERSION_MAJOR} QUIET COMPONENTS Widgets) +diff --git a/src/rviz_common/add_display_dialog.cpp b/src/rviz_common/add_display_dialog.cpp +index 8ad916dc..4eba8994 100644 +--- a/src/rviz_common/add_display_dialog.cpp ++++ b/src/rviz_common/add_display_dialog.cpp +@@ -46,6 +46,8 @@ + #include // NOLINT: cpplint is unable to handle the include order here + #include // NOLINT: cpplint is unable to handle the include order here + #include // NOLINT: cpplint is unable to handle the include order here ++#include // NOLINT: cpplint is unable to handle the include order here ++#include // NOLINT: cpplint is unable to handle the include order here + #include // NOLINT: cpplint is unable to handle the include order here + #include // NOLINT: cpplint is unable to handle the include order here + #include // NOLINT: cpplint is unable to handle the include order here +@@ -648,7 +650,7 @@ void TopicDisplayWidget::findPlugins(DisplayFactory * factory) + // For now, we assume that all types supported by plugins have the form + // "/msg/", though in the future zero or more namespaces may be + // permitted. +- QRegExp delim("/"); ++ QRegularExpression delim("/"); + QStringList topic_type_parts = topic_type.split(delim); + if (topic_type_parts.size() == 2) { + topic_type = topic_type_parts.at(0) + "/msg/" + topic_type_parts.at(1); +diff --git a/src/rviz_common/properties/editable_enum_property.cpp b/src/rviz_common/properties/editable_enum_property.cpp +index 85d1589f..ce81a3f2 100644 +--- a/src/rviz_common/properties/editable_enum_property.cpp ++++ b/src/rviz_common/properties/editable_enum_property.cpp +@@ -77,9 +77,17 @@ QWidget * EditableEnumProperty::createEditor(QWidget * parent, const QStyleOptio + EditableComboBox * cb = new EditableComboBox(parent); + cb->addItems(strings_); + cb->setEditText(getValue().toString() ); ++ #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) + QObject::connect( + cb, SIGNAL(currentIndexChanged(const QString&)), this, + SLOT(setString(const QString&))); ++ #else ++ QObject::connect( ++ cb, &QComboBox::currentIndexChanged, this, ++ [this, cb](int index) { ++ this->setString(cb->itemText(index)); ++ }); ++ #endif + + // TODO(unknown): need to better handle string value which is not in list. + return cb; +diff --git a/src/rviz_common/properties/enum_property.cpp b/src/rviz_common/properties/enum_property.cpp +index 0c8dd60a..abc2407f 100644 +--- a/src/rviz_common/properties/enum_property.cpp ++++ b/src/rviz_common/properties/enum_property.cpp +@@ -86,9 +86,17 @@ QWidget * EnumProperty::createEditor(QWidget * parent, const QStyleOptionViewIte + ComboBox * cb = new ComboBox(parent); + cb->addItems(strings_); + cb->setCurrentIndex(strings_.indexOf(getValue().toString() )); ++ #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) + QObject::connect( + cb, SIGNAL(currentIndexChanged(const QString&)), this, + SLOT(setString(const QString&))); ++ #else ++ QObject::connect( ++ cb, &QComboBox::currentIndexChanged, this, ++ [this, cb](int index) { ++ this->setString(cb->itemText(index)); ++ }); ++ #endif + + // TODO(anyone): need to better handle string value which is not in list. + return cb; +diff --git a/src/rviz_common/properties/property_tree_model.cpp b/src/rviz_common/properties/property_tree_model.cpp +index da7b04ff..76172141 100644 +--- a/src/rviz_common/properties/property_tree_model.cpp ++++ b/src/rviz_common/properties/property_tree_model.cpp +@@ -32,6 +32,7 @@ + + #include + ++#include // NOLINT: cpplint is unable to handle the include order here + #include // NOLINT: cpplint is unable to handle the include order here + #include // NOLINT: cpplint is unable to handle the include order here + +diff --git a/src/rviz_common/properties/ros_action_property.cpp b/src/rviz_common/properties/ros_action_property.cpp +index c187eb4b..91f1ec6a 100644 +--- a/src/rviz_common/properties/ros_action_property.cpp ++++ b/src/rviz_common/properties/ros_action_property.cpp +@@ -34,7 +34,7 @@ + + #include // NOLINT: cpplint can't handle Qt imports + #include // NOLINT: cpplint can't handle Qt imports +-#include // NOLINT: cpplint can't handle Qt imports ++#include // NOLINT: cpplint can't handle Qt imports + #include // NOLINT: cpplint can't handle Qt imports + #include // NOLINT: cpplint can't handle Qt imports + +@@ -121,7 +121,7 @@ RosFilteredActionProperty::RosFilteredActionProperty( + const QString & default_value, + const QString & action_type, + const QString & description, +- const QRegExp & filter, ++ const QRegularExpression & filter, + Property * parent, + const char * changed_slot, + QObject * receiver) +@@ -137,7 +137,7 @@ void RosFilteredActionProperty::enableFilter(bool enabled) + fillActionList(); + } + +-QRegExp RosFilteredActionProperty::filter() const ++QRegularExpression RosFilteredActionProperty::filter() const + { + return filter_; + } +diff --git a/src/rviz_common/properties/ros_topic_property.cpp b/src/rviz_common/properties/ros_topic_property.cpp +index 6a1fab39..a3b56cdc 100644 +--- a/src/rviz_common/properties/ros_topic_property.cpp ++++ b/src/rviz_common/properties/ros_topic_property.cpp +@@ -94,7 +94,7 @@ RosFilteredTopicProperty::RosFilteredTopicProperty( + const QString & default_value, + const QString & message_type, + const QString & description, +- const QRegExp & filter, ++ const QRegularExpression & filter, + Property * parent, + const char * changed_slot, + QObject * receiver) +@@ -110,7 +110,7 @@ void RosFilteredTopicProperty::enableFilter(bool enabled) + fillTopicList(); + } + +-QRegExp RosFilteredTopicProperty::filter() const ++QRegularExpression RosFilteredTopicProperty::filter() const + { + return filter_; + } +diff --git a/src/rviz_common/tool_manager.cpp b/src/rviz_common/tool_manager.cpp +index 500b2a3b..6d432c6b 100644 +--- a/src/rviz_common/tool_manager.cpp ++++ b/src/rviz_common/tool_manager.cpp +@@ -35,7 +35,8 @@ + + #include // NOLINT: cpplint is unable to handle the include order here + #include // NOLINT: cpplint is unable to handle the include order here +-#include // NOLINT: cpplint is unable to handle the include order here ++#include // NOLINT: cpplint is unable to handle the include order here ++#include // NOLINT: cpplint is unable to handle the include order here + + #include "rviz_common/logging.hpp" + +@@ -52,7 +53,7 @@ using rviz_common::properties::PropertyTreeModel; + + QString addSpaceToCamelCase(QString input) + { +- QRegExp re = QRegExp("([A-Z])([a-z]*)"); ++ QRegularExpression re = QRegularExpression("([A-Z])([a-z]*)"); + input.replace(re, " \\1\\2"); + return input.trimmed(); + } +diff --git a/src/rviz_common/visualization_frame.cpp b/src/rviz_common/visualization_frame.cpp +index b53f21c4..a8227bbe 100644 +--- a/src/rviz_common/visualization_frame.cpp ++++ b/src/rviz_common/visualization_frame.cpp +@@ -42,6 +42,7 @@ + #include + #include + ++#include // NOLINT cpplint cannot handle include order here + #include // NOLINT cpplint cannot handle include order here + #include // NOLINT cpplint cannot handle include order here + #include // NOLINT cpplint cannot handle include order here +@@ -262,7 +263,7 @@ void VisualizationFrame::initialize( + QWidget * central_widget = new QWidget(this); + QHBoxLayout * central_layout = new QHBoxLayout; + central_layout->setSpacing(0); +- central_layout->setMargin(0); ++ central_layout->setContentsMargins(0, 0, 0, 0); + + render_panel_ = new RenderPanel(central_widget); + diff --git a/distros/jazzy/patch/ros2-rviz-default-plugins.patch b/distros/jazzy/patch/ros2-rviz-default-plugins.patch new file mode 100644 index 000000000..eae5bd1b5 --- /dev/null +++ b/distros/jazzy/patch/ros2-rviz-default-plugins.patch @@ -0,0 +1,421 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f5f0c0cd..c75b4d54 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -57,7 +57,14 @@ find_package(rviz_common REQUIRED) + find_package(rviz_rendering REQUIRED) + find_package(rviz_ogre_vendor REQUIRED) + +-find_package(Qt5 REQUIRED COMPONENTS Widgets Test) ++find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Test Widgets) ++find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Test Widgets) ++if(${QT_VERSION} VERSION_LESS 5.15.0) ++ function(qt_wrap_cpp out) ++ qt5_wrap_cpp(_sources ${ARGN}) ++ set("${out}" ${_sources} PARENT_SCOPE) ++ endfunction() ++endif() + + find_package(geometry_msgs REQUIRED) + +@@ -136,7 +143,7 @@ set(rviz_default_plugins_headers_to_moc + ) + + foreach(header "${rviz_default_plugins_headers_to_moc}") +- qt5_wrap_cpp(rviz_default_plugins_moc_files "${header}") ++ qt_wrap_cpp(rviz_default_plugins_moc_files "${header}") + endforeach() + + set(rviz_default_plugins_source_files +@@ -252,6 +259,7 @@ target_link_libraries(rviz_default_plugins PUBLIC + ${map_msgs_TARGETS} + ${nav_msgs_TARGETS} + point_cloud_transport::point_cloud_transport ++ Qt${QT_VERSION_MAJOR}::Widgets + rclcpp::rclcpp + rviz_common::rviz_common + rviz_ogre_vendor::OgreMain +@@ -263,7 +271,6 @@ target_link_libraries(rviz_default_plugins PUBLIC + tf2_ros::tf2_ros + urdf::urdf + ${visualization_msgs_TARGETS} +- Qt5::Widgets + ) + + target_link_libraries(rviz_default_plugins PRIVATE +@@ -291,6 +298,7 @@ ament_export_dependencies( + map_msgs + nav_msgs + point_cloud_transport ++ Qt${QT_VERSION_MAJOR} + rclcpp + rviz_common + rviz_ogre_vendor +@@ -384,7 +392,7 @@ if(BUILD_TESTING) + target_link_libraries(fps_view_controller_test + ${TEST_FIXTURE_WITH_MOCK_LIBRARIES} + rviz_default_plugins +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + ogre_testing_environment + ) + endif() +@@ -398,7 +406,7 @@ if(BUILD_TESTING) + target_link_libraries(frame_view_controller_test + ${TEST_FIXTURE_WITH_MOCK_LIBRARIES} + rviz_default_plugins +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + ogre_testing_environment + ) + endif() +@@ -435,7 +443,12 @@ if(BUILD_TESTING) + ${SKIP_DISPLAY_TESTS}) + if(TARGET image_display_test) + target_include_directories(image_display_test PRIVATE test) +- target_link_libraries(image_display_test ${TEST_FIXTURE_WITH_MOCK_LIBRARIES} Qt5::Widgets rviz_default_plugins ogre_testing_environment) ++ target_link_libraries(image_display_test ++ ${TEST_FIXTURE_WITH_MOCK_LIBRARIES} ++ Qt${QT_VERSION_MAJOR}::Widgets ++ rviz_default_plugins ++ ogre_testing_environment ++ ) + endif() + + add_library(marker_messages STATIC test/rviz_default_plugins/displays/marker/marker_messages.cpp) +@@ -528,7 +541,7 @@ if(BUILD_TESTING) + target_include_directories(orbit_view_controller_test PRIVATE test) + target_link_libraries(orbit_view_controller_test + ${TEST_FIXTURE_WITH_MOCK_LIBRARIES} +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + rviz_default_plugins + ogre_testing_environment + ) +@@ -542,7 +555,7 @@ if(BUILD_TESTING) + target_include_directories(ortho_view_controller_test PRIVATE test) + target_link_libraries(ortho_view_controller_test + ${TEST_FIXTURE_WITH_MOCK_LIBRARIES} +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + rviz_default_plugins + ogre_testing_environment + ) +@@ -635,7 +648,7 @@ if(BUILD_TESTING) + target_include_directories(point_cloud_transformers_test PRIVATE test) + target_link_libraries(point_cloud_transformers_test + ${TEST_FIXTURE_WITH_MOCK_LIBRARIES} +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + rviz_default_plugins + pointcloud_messages + ogre_testing_environment +@@ -692,7 +705,7 @@ if(BUILD_TESTING) + target_link_libraries(robot_test + ${TEST_FIXTURE_WITH_MOCK_LIBRARIES} + resource_retriever::resource_retriever +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + rviz_default_plugins + ogre_testing_environment + ) +@@ -729,7 +742,7 @@ if(BUILD_TESTING) + target_include_directories(xy_orbit_view_controller_test PRIVATE test) + target_link_libraries(xy_orbit_view_controller_test + ${TEST_FIXTURE_WITH_MOCK_LIBRARIES} +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + rviz_default_plugins + ogre_testing_environment + ) +@@ -806,7 +819,11 @@ if(BUILD_TESTING) + endif() + + add_library(point_cloud_common_page_object STATIC test/rviz_default_plugins/page_objects/point_cloud_common_page_object.cpp) +- target_link_libraries(point_cloud_common_page_object PRIVATE Qt5::Test rviz_visual_testing_framework::rviz_visual_testing_framework) ++ target_link_libraries(point_cloud_common_page_object ++ PRIVATE ++ Qt${QT_VERSION_MAJOR}::Test ++ rviz_visual_testing_framework::rviz_visual_testing_framework ++ ) + + ament_add_gtest(camera_display_visual_test + test/rviz_default_plugins/displays/camera/camera_display_visual_test.cpp +@@ -820,7 +837,7 @@ if(BUILD_TESTING) + rclcpp::rclcpp + ${sensor_msgs_TARGETS} + ${std_msgs_TARGETS} +- Qt5::Test ++ Qt${QT_VERSION_MAJOR}::Test + ${geometry_msgs_TARGETS} + tf2::tf2 + point_cloud_common_page_object +@@ -863,7 +880,7 @@ if(BUILD_TESTING) + target_include_directories(fluid_pressure_display_visual_test PRIVATE test) + target_link_libraries(fluid_pressure_display_visual_test + rviz_visual_testing_framework::rviz_visual_testing_framework +- Qt5::Test ++ Qt${QT_VERSION_MAJOR}::Test + rclcpp::rclcpp + pointcloud_messages + point_cloud_common_page_object +@@ -878,7 +895,7 @@ if(BUILD_TESTING) + if(TARGET grid_display_visual_test) + target_include_directories(grid_display_visual_test PRIVATE test) + target_link_libraries(grid_display_visual_test +- Qt5::Test ++ Qt${QT_VERSION_MAJOR}::Test + rviz_visual_testing_framework::rviz_visual_testing_framework + ) + endif() +@@ -903,7 +920,7 @@ if(BUILD_TESTING) + if(TARGET illuminance_display_visual_test) + target_include_directories(illuminance_display_visual_test PRIVATE test) + target_link_libraries(illuminance_display_visual_test +- Qt5::Test ++ Qt${QT_VERSION_MAJOR}::Test + rviz_visual_testing_framework::rviz_visual_testing_framework + pointcloud_messages + point_cloud_common_page_object +@@ -918,7 +935,7 @@ if(BUILD_TESTING) + if(TARGET image_display_visual_test) + target_include_directories(image_display_visual_test PRIVATE test) + target_link_libraries(image_display_visual_test +- Qt5::Test ++ Qt${QT_VERSION_MAJOR}::Test + rviz_visual_testing_framework::rviz_visual_testing_framework + rclcpp::rclcpp + ${sensor_msgs_TARGETS} +@@ -934,7 +951,7 @@ if(BUILD_TESTING) + target_include_directories(interactive_marker_namespace_property_test PRIVATE test) + target_link_libraries(interactive_marker_namespace_property_test + rviz_default_plugins +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + ogre_testing_environment + ) + endif() +@@ -947,13 +964,17 @@ if(BUILD_TESTING) + target_include_directories(laser_scan_display_visual_test PRIVATE test) + target_link_libraries(laser_scan_display_visual_test + rviz_visual_testing_framework::rviz_visual_testing_framework +- Qt5::Test ++ Qt${QT_VERSION_MAJOR}::Test + point_cloud_common_page_object + ) + endif() + + add_library(marker_display_page_object STATIC test/rviz_default_plugins/page_objects/marker_display_page_object.cpp) +- target_link_libraries(marker_display_page_object PRIVATE Qt5::Widgets rviz_visual_testing_framework::rviz_visual_testing_framework) ++ target_link_libraries(marker_display_page_object ++ PRIVATE ++ Qt${QT_VERSION_MAJOR}::Widgets ++ rviz_visual_testing_framework::rviz_visual_testing_framework ++ ) + + ament_add_gtest(map_display_visual_test + test/rviz_default_plugins/displays/map/map_display_visual_test.cpp +@@ -964,7 +985,7 @@ if(BUILD_TESTING) + target_include_directories(map_display_visual_test PRIVATE test) + target_link_libraries(map_display_visual_test + rviz_visual_testing_framework::rviz_visual_testing_framework +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + rclcpp::rclcpp + ${std_msgs_TARGETS} + ${geometry_msgs_TARGETS} +@@ -983,7 +1004,7 @@ if(BUILD_TESTING) + target_include_directories(marker_array_display_visual_test PRIVATE test) + target_link_libraries(marker_array_display_visual_test + rviz_visual_testing_framework::rviz_visual_testing_framework +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + rclcpp::rclcpp + ${std_msgs_TARGETS} + ${visualization_msgs_TARGETS} +@@ -999,7 +1020,7 @@ if(BUILD_TESTING) + target_include_directories(marker_display_visual_test PRIVATE test) + target_link_libraries(marker_display_visual_test + rviz_visual_testing_framework::rviz_visual_testing_framework +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + rclcpp::rclcpp + ${std_msgs_TARGETS} + ${visualization_msgs_TARGETS} +@@ -1016,7 +1037,7 @@ if(BUILD_TESTING) + target_include_directories(odometry_display_visual_test PRIVATE test) + target_link_libraries(odometry_display_visual_test + rviz_visual_testing_framework::rviz_visual_testing_framework +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + rclcpp::rclcpp + ${std_msgs_TARGETS} + ${geometry_msgs_TARGETS} +@@ -1033,7 +1054,7 @@ if(BUILD_TESTING) + if(TARGET path_display_visual_test) + target_include_directories(path_display_visual_test PRIVATE test) + target_link_libraries(path_display_visual_test +- Qt5::Test ++ Qt${QT_VERSION_MAJOR}::Test + rviz_visual_testing_framework::rviz_visual_testing_framework + rclcpp::rclcpp + ${std_msgs_TARGETS} +@@ -1051,7 +1072,7 @@ if(BUILD_TESTING) + target_include_directories(point_display_visual_test PRIVATE test) + target_link_libraries(point_display_visual_test + rviz_visual_testing_framework::rviz_visual_testing_framework +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + ${geometry_msgs_TARGETS} + rclcpp::rclcpp + ${std_msgs_TARGETS} +@@ -1065,7 +1086,7 @@ if(BUILD_TESTING) + if(TARGET point_cloud_display_visual_test) + target_include_directories(point_cloud_display_visual_test PRIVATE test) + target_link_libraries(point_cloud_display_visual_test +- Qt5::Test ++ Qt${QT_VERSION_MAJOR}::Test + rviz_visual_testing_framework::rviz_visual_testing_framework + ${geometry_msgs_TARGETS} + tf2::tf2 +@@ -1083,7 +1104,7 @@ if(BUILD_TESTING) + if(TARGET point_cloud2_display_visual_test) + target_include_directories(point_cloud2_display_visual_test PRIVATE test) + target_link_libraries(point_cloud2_display_visual_test +- Qt5::Test ++ Qt${QT_VERSION_MAJOR}::Test + rviz_visual_testing_framework::rviz_visual_testing_framework + pointcloud_messages + point_cloud_common_page_object +@@ -1091,7 +1112,11 @@ if(BUILD_TESTING) + endif() + + add_library(pose_display_page_object STATIC test/rviz_default_plugins/page_objects/pose_display_page_object.cpp) +- target_link_libraries(pose_display_page_object PRIVATE Qt5::Widgets rviz_visual_testing_framework::rviz_visual_testing_framework) ++ target_link_libraries(pose_display_page_object ++ PRIVATE ++ Qt${QT_VERSION_MAJOR}::Widgets ++ rviz_visual_testing_framework::rviz_visual_testing_framework ++ ) + + ament_add_gtest(pose_array_display_visual_test + test/rviz_default_plugins/displays/pose_array/pose_array_display_visual_test.cpp +@@ -1102,7 +1127,7 @@ if(BUILD_TESTING) + target_include_directories(pose_array_display_visual_test PRIVATE test) + target_link_libraries(pose_array_display_visual_test + rviz_visual_testing_framework::rviz_visual_testing_framework +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + rclcpp::rclcpp + ${std_msgs_TARGETS} + ${geometry_msgs_TARGETS} +@@ -1118,7 +1143,7 @@ if(BUILD_TESTING) + target_include_directories(pose_display_visual_test PRIVATE test) + target_link_libraries(pose_display_visual_test + rviz_visual_testing_framework::rviz_visual_testing_framework +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + ${geometry_msgs_TARGETS} + rclcpp::rclcpp + ${std_msgs_TARGETS} +@@ -1135,7 +1160,7 @@ if(BUILD_TESTING) + target_include_directories(pose_with_covariance_display_visual_test PRIVATE test) + target_link_libraries(pose_with_covariance_display_visual_test + rviz_visual_testing_framework::rviz_visual_testing_framework +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + ${geometry_msgs_TARGETS} + rclcpp::rclcpp + ${std_msgs_TARGETS} +@@ -1152,7 +1177,7 @@ if(BUILD_TESTING) + target_include_directories(range_display_visual_test PRIVATE test) + target_link_libraries(range_display_visual_test + rviz_visual_testing_framework::rviz_visual_testing_framework +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + ) + endif() + +@@ -1163,7 +1188,7 @@ if(BUILD_TESTING) + if(TARGET relative_humidity_display_visual_test) + target_include_directories(relative_humidity_display_visual_test PRIVATE test) + target_link_libraries(relative_humidity_display_visual_test +- Qt5::Test ++ Qt${QT_VERSION_MAJOR}::Test + rviz_visual_testing_framework::rviz_visual_testing_framework + point_cloud_common_page_object + ) +@@ -1189,7 +1214,7 @@ if(BUILD_TESTING) + if(TARGET temperature_display_visual_test) + target_include_directories(temperature_display_visual_test PRIVATE test) + target_link_libraries(temperature_display_visual_test +- Qt5::Test ++ Qt${QT_VERSION_MAJOR}::Test + rviz_visual_testing_framework::rviz_visual_testing_framework + point_cloud_common_page_object + ) +@@ -1204,7 +1229,7 @@ if(BUILD_TESTING) + target_include_directories(tf_display_visual_test PRIVATE test) + target_link_libraries(tf_display_visual_test + rviz_visual_testing_framework::rviz_visual_testing_framework +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + ) + endif() + +@@ -1232,7 +1257,7 @@ if(BUILD_TESTING) + target_include_directories(wrench_display_visual_test PRIVATE test) + target_link_libraries(wrench_display_visual_test + rviz_visual_testing_framework::rviz_visual_testing_framework +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + ) + endif() + endif() +diff --git a/rviz_default_plugins-extras.cmake b/rviz_default_plugins-extras.cmake +index c3c89008..a24df762 100644 +--- a/rviz_default_plugins-extras.cmake ++++ b/rviz_default_plugins-extras.cmake +@@ -27,4 +27,5 @@ + + # find package Qt5 because otherwise using the rviz_default_plugins::rviz_default_plugins + # exported target will complain that the Qt5::Widgets target does not exist +-find_package(Qt5 REQUIRED QUIET COMPONENTS Widgets) ++find_package(QT NAMES Qt6 Qt5 QUIET COMPONENTS Widgets) ++find_package(Qt${QT_VERSION_MAJOR} QUIET COMPONENTS Widgets) +diff --git a/src/rviz_default_plugins/displays/depth_cloud/depth_cloud_display.cpp b/src/rviz_default_plugins/displays/depth_cloud/depth_cloud_display.cpp +index 1b09e0b9..e477db52 100644 +--- a/src/rviz_default_plugins/displays/depth_cloud/depth_cloud_display.cpp ++++ b/src/rviz_default_plugins/displays/depth_cloud/depth_cloud_display.cpp +@@ -33,7 +33,8 @@ + #include + #include + +-#include ++#include ++#include + + #include + #include +@@ -81,8 +82,8 @@ DepthCloudDisplay::DepthCloudDisplay() + { + ml_depth_data_ = std::make_unique(); + // Depth map properties +- QRegExp depth_filter("depth"); +- depth_filter.setCaseSensitivity(Qt::CaseInsensitive); ++ QRegularExpression depth_filter("depth"); ++ depth_filter.setPatternOptions(QRegularExpression::CaseInsensitiveOption); + + reliability_policy_property_ = new rviz_common::properties::EditableEnumProperty( + "Reliability Policy", +@@ -123,8 +124,8 @@ DepthCloudDisplay::DepthCloudDisplay() + depth_transport_property_->setStdString("raw"); + + // color image properties +- QRegExp color_filter("color|rgb|bgr|gray|mono"); +- color_filter.setCaseSensitivity(Qt::CaseInsensitive); ++ QRegularExpression color_filter("color|rgb|bgr|gray|mono"); ++ color_filter.setPatternOptions(QRegularExpression::CaseInsensitiveOption); + + color_topic_property_ = new rviz_common::properties::RosFilteredTopicProperty( + "Color Image Topic", "", diff --git a/distros/jazzy/patch/ros2-rviz-imu-plugin.patch b/distros/jazzy/patch/ros2-rviz-imu-plugin.patch new file mode 100644 index 000000000..b08adb15d --- /dev/null +++ b/distros/jazzy/patch/ros2-rviz-imu-plugin.patch @@ -0,0 +1,45 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 993a835..3ca9997 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,7 +12,7 @@ endif() + + find_package(ament_cmake REQUIRED COMPONENTS rviz) + find_package(message_filters REQUIRED) +-find_package(Qt5 REQUIRED COMPONENTS Widgets Test) ++find_package(Qt6 REQUIRED COMPONENTS Widgets Test) + find_package(rviz_common REQUIRED) + find_package(rviz_ogre_vendor REQUIRED) + find_package(rviz_rendering REQUIRED) +@@ -34,7 +34,7 @@ include_directories(include) + + set(dependencies + message_filters +- Qt5 ++ Qt6 + rviz_common + rviz_ogre_vendor + rviz_rendering +@@ -59,11 +59,11 @@ add_library(${PROJECT_NAME} SHARED ${SRC_FILES}) + + ## Link the library with whatever Qt libraries have been defined by + ## the ``find_package(Qt4 ...)`` line above, or by the +-## ``set(QT_LIBRARIES Qt5::Widgets)``, and with whatever libraries ++## ``set(QT_LIBRARIES Qt6::Widgets)``, and with whatever libraries + ## catkin has included. + ament_target_dependencies(${PROJECT_NAME} PUBLIC ${dependencies}) + +-target_link_libraries(${PROJECT_NAME} PUBLIC rviz_ogre_vendor::OgreMain rviz_ogre_vendor::OgreOverlay Qt5::Widgets) ++target_link_libraries(${PROJECT_NAME} PUBLIC rviz_ogre_vendor::OgreMain rviz_ogre_vendor::OgreOverlay Qt6::Widgets) + + # prevent pluginlib from using boost + target_compile_definitions(${PROJECT_NAME} PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS") +@@ -74,7 +74,7 @@ pluginlib_export_plugin_description_file(rviz_common plugin_description.xml) + ament_export_include_directories(include) + ament_export_libraries(${PROJECT_NAME}) + ament_export_dependencies( +- Qt5 ++ Qt6 + rviz_common + sensor_msgs + tf2 diff --git a/distros/jazzy/patch/ros2-rviz-rendering-tests.patch b/distros/jazzy/patch/ros2-rviz-rendering-tests.patch new file mode 100644 index 000000000..94d1a6775 --- /dev/null +++ b/distros/jazzy/patch/ros2-rviz-rendering-tests.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3b593ddc..a1997764 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -32,7 +32,14 @@ find_package(ament_cmake REQUIRED) + if(BUILD_TESTING) + # do find_package(rviz_ogre_vendor) first to make sure the custom OGRE is found + find_package(rviz_ogre_vendor REQUIRED) +- find_package(Qt5 REQUIRED COMPONENTS Widgets) ++ find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets) ++ find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets) ++ if(${QT_VERSION} VERSION_LESS 5.15.0) ++ function(qt_wrap_cpp out) ++ qt5_wrap_cpp(_sources ${ARGN}) ++ set("${out}" ${_sources} PARENT_SCOPE) ++ endfunction() ++ endif() + find_package(rviz_rendering REQUIRED) + find_package(resource_retriever REQUIRED) + diff --git a/distros/jazzy/patch/ros2-rviz-rendering.patch b/distros/jazzy/patch/ros2-rviz-rendering.patch new file mode 100644 index 000000000..89b741cf1 --- /dev/null +++ b/distros/jazzy/patch/ros2-rviz-rendering.patch @@ -0,0 +1,195 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fee1258b..77880dc2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -33,7 +33,14 @@ find_package(ament_cmake_ros REQUIRED) + find_package(rviz_ogre_vendor REQUIRED) + find_package(rviz_assimp_vendor REQUIRED) + +-find_package(Qt5 REQUIRED COMPONENTS Widgets) ++find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets) ++find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets) ++if(${QT_VERSION} VERSION_LESS 5.15.0) ++ function(qt_wrap_cpp out) ++ qt5_wrap_cpp(_sources ${ARGN}) ++ set("${out}" ${_sources} PARENT_SCOPE) ++ endfunction() ++endif() + + find_package(ament_index_cpp REQUIRED) + find_package(eigen3_cmake_module REQUIRED) +@@ -41,29 +48,29 @@ find_package(Eigen3 REQUIRED) + find_package(resource_retriever REQUIRED) + + # TODO(wjwwood): this block is to setup the windeployqt tool, could be removed later. +-if(Qt5_FOUND AND WIN32 AND TARGET Qt5::qmake AND NOT TARGET Qt5::windeployqt) +- get_target_property(_qt5_qmake_location Qt5::qmake IMPORTED_LOCATION) ++if(Qt${QT_VERSION_MAJOR}_FOUND AND WIN32 AND TARGET Qt${QT_VERSION_MAJOR}::qmake AND NOT TARGET Qt${QT_VERSION_MAJOR}::windeployqt) ++ get_target_property(_qt_qmake_location Qt${QT_VERSION_MAJOR}::qmake IMPORTED_LOCATION) + + execute_process( +- COMMAND "${_qt5_qmake_location}" -query QT_INSTALL_PREFIX ++ COMMAND "${_qt_qmake_location}" -query Qt${QT_VERSION_MAJOR}_INSTALL_PREFIX + RESULT_VARIABLE return_code +- OUTPUT_VARIABLE qt5_install_prefix ++ OUTPUT_VARIABLE qt_install_prefix + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + +- set(imported_location "${qt5_install_prefix}/bin/windeployqt.exe") ++ set(imported_location "${qt_install_prefix}/bin/windeployqt.exe") + + if(EXISTS ${imported_location}) +- add_executable(Qt5::windeployqt IMPORTED) ++ add_executable(Qt${QT_VERSION_MAJOR}::windeployqt IMPORTED) + +- set_target_properties(Qt5::windeployqt PROPERTIES ++ set_target_properties(Qt${QT_VERSION_MAJOR}::windeployqt PROPERTIES + IMPORTED_LOCATION ${imported_location} + ) + endif() + endif() + + # These need to be added in the add_library() call +-qt5_wrap_cpp(rviz_rendering_moc_files include/rviz_rendering/render_window.hpp) ++qt_wrap_cpp(rviz_rendering_moc_files include/rviz_rendering/render_window.hpp) + + add_library(rviz_rendering SHARED + ${rviz_rendering_moc_files} +@@ -100,7 +107,7 @@ add_library(rviz_rendering SHARED + ) + + target_link_libraries(rviz_rendering PUBLIC +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + rviz_ogre_vendor::OgreMain + rviz_ogre_vendor::OgreOverlay + ) +@@ -128,7 +135,7 @@ target_compile_definitions(rviz_rendering PRIVATE "RVIZ_RENDERING_BUILDING_LIBRA + + ament_export_dependencies( + Eigen3 +- Qt5 ++ Qt${QT_VERSION_MAJOR} + rviz_ogre_vendor + ) + +@@ -194,7 +201,7 @@ if(BUILD_TESTING) + rviz_ogre_vendor::OgreMain + rviz_rendering + rviz_rendering_test_utils +- Qt5::Widgets # explicitly do this for include directories (not necessary for external use) ++ Qt${QT_VERSION_MAJOR}::Widgets # explicitly do this for include directories (not necessary for external use) + ) + endif() + +@@ -206,7 +213,7 @@ if(BUILD_TESTING) + rviz_ogre_vendor::OgreMain + rviz_rendering + rviz_rendering_test_utils +- Qt5::Widgets # explicitly do this for include directories (not necessary for external use) ++ Qt${QT_VERSION_MAJOR}::Widgets # explicitly do this for include directories (not necessary for external use) + ) + endif() + +@@ -218,7 +225,7 @@ if(BUILD_TESTING) + rviz_ogre_vendor::OgreMain + rviz_rendering + rviz_rendering_test_utils +- Qt5::Widgets # explicitly do this for include directories (not necessary for external use) ++ Qt${QT_VERSION_MAJOR}::Widgets # explicitly do this for include directories (not necessary for external use) + ) + endif() + +@@ -230,7 +237,7 @@ if(BUILD_TESTING) + rviz_ogre_vendor::OgreMain + rviz_rendering + rviz_rendering_test_utils +- Qt5::Widgets # explicitly do this for include directories (not necessary for external use) ++ Qt${QT_VERSION_MAJOR}::Widgets # explicitly do this for include directories (not necessary for external use) + ) + endif() + +@@ -242,7 +249,7 @@ if(BUILD_TESTING) + rviz_ogre_vendor::OgreMain + rviz_rendering + rviz_rendering_test_utils +- Qt5::Widgets # explicitly do this for include directories (not necessary for external use) ++ Qt${QT_VERSION_MAJOR}::Widgets # explicitly do this for include directories (not necessary for external use) + ) + endif() + +@@ -254,7 +261,7 @@ if(BUILD_TESTING) + rviz_ogre_vendor::OgreMain + rviz_rendering + rviz_rendering_test_utils +- Qt5::Widgets # explicitly do this for include directories (not necessary for external use) ++ Qt${QT_VERSION_MAJOR}::Widgets # explicitly do this for include directories (not necessary for external use) + ) + endif() + +@@ -267,7 +274,7 @@ if(BUILD_TESTING) + rviz_ogre_vendor::OgreOverlay + rviz_rendering + rviz_rendering_test_utils +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + ) + endif() + +@@ -279,7 +286,7 @@ if(BUILD_TESTING) + rviz_ogre_vendor::OgreMain + rviz_rendering + rviz_rendering_test_utils +- Qt5::Widgets # explicitly do this for include directories (not necessary for external use) ++ Qt${QT_VERSION_MAJOR}::Widgets # explicitly do this for include directories (not necessary for external use) + ) + endif() + +@@ -291,7 +298,7 @@ if(BUILD_TESTING) + rviz_ogre_vendor::OgreMain + rviz_rendering + rviz_rendering_test_utils +- Qt5::Widgets # explicitly do this for include directories (not necessary for external use) ++ Qt${QT_VERSION_MAJOR}::Widgets # explicitly do this for include directories (not necessary for external use) + ) + endif() + +@@ -303,7 +310,7 @@ if(BUILD_TESTING) + rviz_ogre_vendor::OgreMain + rviz_rendering + rviz_rendering_test_utils +- Qt5::Widgets # explicitly do this for include directories (not necessary for external use) ++ Qt${QT_VERSION_MAJOR}::Widgets # explicitly do this for include directories (not necessary for external use) + ) + endif() + +@@ -315,7 +322,7 @@ if(BUILD_TESTING) + rviz_ogre_vendor::OgreMain + rviz_rendering + rviz_rendering_test_utils +- Qt5::Widgets # explicitly do this for include directories (not necessary for external use) ++ Qt${QT_VERSION_MAJOR}::Widgets # explicitly do this for include directories (not necessary for external use) + ) + endif() + +@@ -327,7 +334,7 @@ if(BUILD_TESTING) + rviz_ogre_vendor::OgreMain + rviz_rendering + rviz_rendering_test_utils +- Qt5::Widgets # explicitly do this for include directories (not necessary for external use) ++ Qt${QT_VERSION_MAJOR}::Widgets # explicitly do this for include directories (not necessary for external use) + ) + endif() + endif() +diff --git a/rviz_rendering-extras.cmake b/rviz_rendering-extras.cmake +index 93684581..05e19f9a 100644 +--- a/rviz_rendering-extras.cmake ++++ b/rviz_rendering-extras.cmake +@@ -27,4 +27,5 @@ + + # find package Qt5 because otherwise using the rviz_rendering::rviz_rendering + # exported target will complain that the Qt5::Widgets target does not exist +-find_package(Qt5 REQUIRED QUIET COMPONENTS Widgets) ++find_package(QT NAMES Qt6 Qt5 QUIET COMPONENTS Widgets) ++find_package(Qt${QT_VERSION_MAJOR} QUIET COMPONENTS Widgets) diff --git a/distros/jazzy/patch/ros2-rviz-satellite.patch b/distros/jazzy/patch/ros2-rviz-satellite.patch new file mode 100644 index 000000000..e83cf7d67 --- /dev/null +++ b/distros/jazzy/patch/ros2-rviz-satellite.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c49365b..4aa25dc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -18,7 +18,8 @@ find_package(pluginlib REQUIRED) + find_package(angles REQUIRED) + + # rviz switched to Qt6: https://github.com/ros2/rviz/pull/1635 +-if(rviz_common_VERSION_MAJOR GREATER_EQUAL 15 AND rviz_common_VERSION_MINOR GREATER_EQUAL 1) ++# RoboStack: rviz_common built with Qt 6 (its extras import Qt6::Widgets) ++if(rviz_common_VERSION_MAJOR GREATER_EQUAL 15 AND rviz_common_VERSION_MINOR GREATER_EQUAL 1 OR TARGET Qt6::Widgets) + find_package(Qt6 COMPONENTS Network REQUIRED) + set(QT_VERSION_MAJOR 6) + else() diff --git a/distros/jazzy/patch/ros2-rviz-visual-testing-framework.patch b/distros/jazzy/patch/ros2-rviz-visual-testing-framework.patch new file mode 100644 index 000000000..af8023345 --- /dev/null +++ b/distros/jazzy/patch/ros2-rviz-visual-testing-framework.patch @@ -0,0 +1,63 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f393ec72..2ffa5c9b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -25,7 +25,8 @@ endif() + + find_package(ament_cmake REQUIRED) + find_package(geometry_msgs REQUIRED) +-find_package(Qt5 REQUIRED COMPONENTS Widgets Test) ++find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Test Widgets) ++find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Test Widgets) + find_package(rclcpp REQUIRED) + find_package(rcutils REQUIRED) + find_package(rviz_common REQUIRED) +@@ -39,13 +40,13 @@ find_package(ament_cmake_gtest REQUIRED) + ament_find_gtest() + + # TODO(wjwwood): this block is to setup the windeployqt tool, could be removed later. +-if(Qt5_FOUND AND WIN32 AND TARGET Qt5::qmake AND NOT TARGET Qt5::windeployqt) +- get_target_property(_qt5_qmake_location Qt5::qmake IMPORTED_LOCATION) ++if(Qt${QT_VERSION_MAJOR}_FOUND AND WIN32 AND TARGET Qt${QT_VERSION_MAJOR}::qmake AND NOT TARGET Qt${QT_VERSION_MAJOR}::windeployqt) ++ get_target_property(_qt_qmake_location Qt${QT_VERSION_MAJOR}::qmake IMPORTED_LOCATION) + + execute_process( +- COMMAND "${_qt5_qmake_location}" -query QT_INSTALL_PREFIX ++ COMMAND "${_qt_qmake_location}" -query QT${QT_VERSION_MAJOR}_INSTALL_PREFIX + RESULT_VARIABLE return_code +- OUTPUT_VARIABLE qt5_install_prefix ++ OUTPUT_VARIABLE qt_install_prefix + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + endif() +@@ -71,8 +72,8 @@ target_include_directories(rviz_visual_testing_framework + + target_link_libraries(rviz_visual_testing_framework PUBLIC + ${geometry_msgs_TARGETS} +- Qt5::Test +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Test ++ Qt${QT_VERSION_MAJOR}::Widgets + rclcpp::rclcpp + rcutils::rcutils + rviz_common::rviz_common +@@ -84,7 +85,18 @@ target_link_libraries(rviz_visual_testing_framework PUBLIC + ) + + # export information to downstream packages +-ament_export_dependencies(geometry_msgs Qt5 rclcpp rcutils rviz_common rviz_ogre_vendor rviz_rendering std_msgs tf2 tf2_ros) ++ament_export_dependencies( ++ geometry_msgs ++ Qt${QT_VERSION_MAJOR} ++ rclcpp ++ rcutils ++ rviz_common ++ rviz_ogre_vendor ++ rviz_rendering ++ std_msgs ++ tf2 ++ tf2_ros ++) + + # Export old-style CMake variables + ament_export_include_directories("include/${PROJECT_NAME}") diff --git a/distros/jazzy/patch/ros2-rviz-visual-tools.patch b/distros/jazzy/patch/ros2-rviz-visual-tools.patch new file mode 100644 index 000000000..8abf82ea8 --- /dev/null +++ b/distros/jazzy/patch/ros2-rviz-visual-tools.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index de15d1b..fe4fc55 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -44,7 +44,8 @@ find_package(rviz_default_plugins REQUIRED) + # land until that patch release; 15.1.13 and earlier are still Qt5). + # Gate on rviz's version rather than Qt6 availability -- Ubuntu 24.04 ships both + # Qt5 and Qt6, and linking a Qt6 build against a Qt5 rviz is an ABI mismatch. +-if(rviz_common_VERSION VERSION_GREATER_EQUAL 15.1.14) ++# RoboStack: rviz_common built with Qt 6 (its extras import Qt6::Widgets) ++if(rviz_common_VERSION VERSION_GREATER_EQUAL 15.1.14 OR TARGET Qt6::Widgets) + find_package(Qt6 REQUIRED COMPONENTS Widgets) + set(QT_VERSION_MAJOR 6) + # Hint for transitive deps that use find_package(QT NAMES Qt6 Qt5 ...) which diff --git a/distros/jazzy/patch/ros2-rviz2.patch b/distros/jazzy/patch/ros2-rviz2.patch new file mode 100644 index 000000000..650c50689 --- /dev/null +++ b/distros/jazzy/patch/ros2-rviz2.patch @@ -0,0 +1,64 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a0677c21..815df84d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -18,24 +18,25 @@ find_package(rviz_common REQUIRED) + + find_package(rviz_ogre_vendor REQUIRED) + +-find_package(Qt5 REQUIRED COMPONENTS Widgets) ++find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets) ++find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets) + # TODO(wjwwood): this block is to setup the windeployqt tool, could be removed later. +-if(Qt5_FOUND AND WIN32 AND TARGET Qt5::qmake AND NOT TARGET Qt5::windeployqt) +- get_target_property(_qt5_qmake_location Qt5::qmake IMPORTED_LOCATION) ++if(Qt${QT_VERSION_MAJOR}_FOUND AND WIN32 AND TARGET Qt${QT_VERSION_MAJOR}::qmake AND NOT TARGET Qt${QT_VERSION_MAJOR}::windeployqt) ++ get_target_property(_qt_qmake_location Qt${QT_VERSION_MAJOR}::qmake IMPORTED_LOCATION) + + execute_process( +- COMMAND "${_qt5_qmake_location}" -query QT_INSTALL_PREFIX ++ COMMAND "${_qt_qmake_location}" -query QT${QT_VERSION_MAJOR}_INSTALL_PREFIX + RESULT_VARIABLE return_code +- OUTPUT_VARIABLE qt5_install_prefix ++ OUTPUT_VARIABLE qt_install_prefix + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + +- set(imported_location "${qt5_install_prefix}/bin/windeployqt.exe") ++ set(imported_location "${qt_install_prefix}/bin/windeployqt.exe") + + if(EXISTS ${imported_location}) +- add_executable(Qt5::windeployqt IMPORTED) ++ add_executable(Qt${QT_VERSION_MAJOR}::windeployqt IMPORTED) + +- set_target_properties(Qt5::windeployqt PROPERTIES ++ set_target_properties(Qt${QT_VERSION_MAJOR}::windeployqt PROPERTIES + IMPORTED_LOCATION ${imported_location} + ) + endif() +@@ -48,21 +49,21 @@ target_link_libraries(${PROJECT_NAME} + rviz_common::rviz_common + rviz_ogre_vendor::OgreMain + rviz_ogre_vendor::OgreOverlay +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + ) + + # TODO(wjwwood): find a way to make this optional or to run without "deploying" the + # necessary dlls and stuff to the bin folder. + # see: + # https://stackoverflow.com/questions/41193584/deploy-all-qt-dependencies-when-building#41199492 +-if(TARGET Qt5::windeployqt) ++if(TARGET Qt${QT_VERSION_MAJOR}::windeployqt) + # execute windeployqt in a tmp directory after build + add_custom_command(TARGET ${PROJECT_NAME} + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/windeployqt" +- COMMAND set PATH=%PATH%$${qt5_install_prefix}/bin ++ COMMAND set PATH=%PATH%$${qt_install_prefix}/bin + COMMAND +- Qt5::windeployqt ++ Qt${QT_VERSION_MAJOR}::windeployqt + --dir "${CMAKE_CURRENT_BINARY_DIR}/windeployqt" + "$/$" + ) diff --git a/distros/jazzy/patch/ros2-slam-toolbox.patch b/distros/jazzy/patch/ros2-slam-toolbox.patch index a0978f5af..c0c7d986e 100644 --- a/distros/jazzy/patch/ros2-slam-toolbox.patch +++ b/distros/jazzy/patch/ros2-slam-toolbox.patch @@ -1,7 +1,43 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3880aa7..90ee2a6 100644 +index 3880aa7..5dd3501 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt +@@ -34,7 +34,7 @@ find_package(rviz_default_plugins REQUIRED) + find_package(rviz_ogre_vendor REQUIRED) + find_package(rviz_rendering REQUIRED) + find_package(interactive_markers REQUIRED) +-find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets Test Concurrent) ++find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets Test Concurrent) + find_package(rclcpp_components REQUIRED) + + #karto_sdk lib +@@ -66,7 +66,7 @@ set(dependencies + rviz_ogre_vendor + rviz_rendering + interactive_markers +- Qt5 ++ Qt6 + rclcpp_components + ) + +@@ -91,7 +91,7 @@ find_package(Ceres REQUIRED COMPONENTS SuiteSparse) + + set(CMAKE_INCLUDE_CURRENT_DIR ON) + add_definitions(-DQT_NO_KEYWORDS) +-find_package(Boost REQUIRED system serialization filesystem thread) ++find_package(Boost REQUIRED serialization filesystem thread) + + include_directories(include lib/karto_sdk/include + ${EIGEN3_INCLUDE_DIRS} +@@ -118,7 +118,7 @@ rosidl_generate_interfaces(${PROJECT_NAME} + ) + + #### rviz Plugin +-qt5_wrap_cpp(MOC_FILES rviz_plugin/slam_toolbox_rviz_plugin.hpp) ++qt6_wrap_cpp(MOC_FILES rviz_plugin/slam_toolbox_rviz_plugin.hpp) + add_library(SlamToolboxPlugin SHARED + rviz_plugin/slam_toolbox_rviz_plugin.cpp + ${MOC_FILES}) @@ -147,6 +147,11 @@ rosidl_get_typesupport_target(cpp_typesupport_target ${PROJECT_NAME} "rosidl_typ target_link_libraries(ceres_solver_plugin "${cpp_typesupport_target}") pluginlib_export_plugin_description_file(slam_toolbox solver_plugins.xml) @@ -73,7 +109,7 @@ index 95c9931..c159ab8 100644 #include #include diff --git a/include/slam_toolbox/slam_toolbox_common.hpp b/include/slam_toolbox/slam_toolbox_common.hpp -index 96bd049..d6e9630 100644 +index 04f8446..f0c0e5d 100644 --- a/include/slam_toolbox/slam_toolbox_common.hpp +++ b/include/slam_toolbox/slam_toolbox_common.hpp @@ -19,7 +19,9 @@ @@ -96,10 +132,10 @@ index 96bd049..d6e9630 100644 #include "tf2_ros/transform_listener.h" #include "tf2_ros/create_timer_ros.h" diff --git a/lib/karto_sdk/CMakeLists.txt b/lib/karto_sdk/CMakeLists.txt -index a620bfd..196aab5 100644 +index a620bfd..b59b516 100644 --- a/lib/karto_sdk/CMakeLists.txt +++ b/lib/karto_sdk/CMakeLists.txt -@@ -5,7 +5,9 @@ if(NOT CMAKE_CXX_STANDARD) +@@ -5,13 +5,15 @@ if(NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 17) endif() set(CMAKE_BUILD_TYPE Release) #None, Debug, Release, RelWithDebInfo, MinSizeRel @@ -110,13 +146,14 @@ index a620bfd..196aab5 100644 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") find_package(ament_cmake REQUIRED) -@@ -12,4 +14,4 @@ find_package(ament_cmake REQUIRED) find_package(rclcpp REQUIRED) find_package(Eigen3 REQUIRED) -find_package(Boost REQUIRED system serialization filesystem thread) +find_package(Boost REQUIRED serialization filesystem thread) find_package(TBB REQUIRED NO_CMAKE_PACKAGE_REGISTRY) -@@ -29,6 +31,7 @@ add_definitions(${EIGEN3_DEFINITIONS}) + + set(dependencies +@@ -29,8 +31,9 @@ add_definitions(${EIGEN3_DEFINITIONS}) include_directories(include ${EIGEN3_INCLUDE_DIRS} ${TBB_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}) add_library(kartoSlamToolbox SHARED src/Karto.cpp src/Mapper.cpp) @@ -125,8 +162,10 @@ index a620bfd..196aab5 100644 -target_link_libraries(kartoSlamToolbox ${Boost_LIBRARIES} TBB::tbb) +target_link_libraries(kartoSlamToolbox Eigen3::Eigen ${Boost_LIBRARIES} TBB::tbb) + install(DIRECTORY include/ + DESTINATION include/ diff --git a/lib/karto_sdk/src/Mapper.cpp b/lib/karto_sdk/src/Mapper.cpp -index e969404..d87d33f 100644 +index 6ef0688..d42fb55 100644 --- a/lib/karto_sdk/src/Mapper.cpp +++ b/lib/karto_sdk/src/Mapper.cpp @@ -405,7 +405,7 @@ void MapperSensorManager::SetRunningScanBufferSize(kt_int32u rScanBufferSize) @@ -156,7 +195,7 @@ index e969404..d87d33f 100644 rtn_vertices.push_back(vertices_to_search[ret_matches[i].first]); } return rtn_vertices; -@@ -2984,7 +2984,7 @@ void Mapper::ClearLocalizationBuffer() +@@ -2989,7 +2989,7 @@ void Mapper::ClearLocalizationBuffer() } std::vector names = m_pMapperSensorManager->GetSensorNames(); @@ -194,10 +233,10 @@ index 3ee0bde..cc8e505 100644 nav_msgs::srv::GetMap::Response map; nav_msgs::msg::OccupancyGrid & og = map.map; diff --git a/src/slam_toolbox_common.cpp b/src/slam_toolbox_common.cpp -index 916a207..18c2fa2 100644 +index 89bc024..f08f556 100644 --- a/src/slam_toolbox_common.cpp +++ b/src/slam_toolbox_common.cpp -@@ -52,6 +52,11 @@ SlamToolbox::SlamToolbox(rclcpp::NodeOptions options) +@@ -51,6 +51,11 @@ SlamToolbox::SlamToolbox(rclcpp::NodeOptions options) this->declare_parameter( "stack_size_to_use", rclcpp::ParameterType::PARAMETER_INTEGER, descriptor); if (this->get_parameter("stack_size_to_use", stack_size)) { @@ -209,7 +248,7 @@ index 916a207..18c2fa2 100644 RCLCPP_INFO(get_logger(), "Node using stack size %i", (int)stack_size); const rlim_t max_stack_size = stack_size; struct rlimit stack_limit; -@@ -60,6 +65,7 @@ SlamToolbox::SlamToolbox(rclcpp::NodeOptions options) +@@ -59,6 +64,7 @@ SlamToolbox::SlamToolbox(rclcpp::NodeOptions options) stack_limit.rlim_cur = stack_size; } setrlimit(RLIMIT_STACK, &stack_limit); @@ -217,10 +256,3 @@ index 916a207..18c2fa2 100644 } } // server side never times out from lifecycle manager -diff --git a/CMakeLists.txt b/CMakeLists.txt ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -93,2 +93,2 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) - add_definitions(-DQT_NO_KEYWORDS) --find_package(Boost REQUIRED system serialization filesystem thread) -+find_package(Boost REQUIRED serialization filesystem thread) diff --git a/distros/jazzy/patch/ros2-turtlesim.patch b/distros/jazzy/patch/ros2-turtlesim.patch new file mode 100644 index 000000000..e55861556 --- /dev/null +++ b/distros/jazzy/patch/ros2-turtlesim.patch @@ -0,0 +1,40 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bad9423..b69886b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -13,7 +13,7 @@ endif() + find_package(ament_cmake REQUIRED) + find_package(ament_index_cpp REQUIRED) + find_package(geometry_msgs REQUIRED) +-find_package(Qt5 REQUIRED COMPONENTS Widgets) ++find_package(Qt6 REQUIRED COMPONENTS Widgets) + find_package(rcl_interfaces REQUIRED) + find_package(rclcpp REQUIRED) + find_package(rclcpp_action REQUIRED) +@@ -21,7 +21,7 @@ find_package(rosidl_default_generators REQUIRED) + find_package(std_msgs REQUIRED) + find_package(std_srvs REQUIRED) + +-include_directories(include ${Qt5Widgets_INCLUDE_DIRS}) ++include_directories(include ${Qt6Widgets_INCLUDE_DIRS}) + + rosidl_generate_interfaces(${PROJECT_NAME} + "action/RotateAbsolute.action" +@@ -33,7 +33,7 @@ rosidl_generate_interfaces(${PROJECT_NAME} + "srv/TeleportAbsolute.srv" + "srv/TeleportRelative.srv") + +-qt5_wrap_cpp(turtlesim_node_MOCS include/turtlesim/turtle_frame.hpp) ++qt6_wrap_cpp(turtlesim_node_MOCS include/turtlesim/turtle_frame.hpp) + + rosidl_get_typesupport_target(cpp_typesupport_target "${PROJECT_NAME}" "rosidl_typesupport_cpp") + +@@ -47,7 +47,7 @@ target_link_libraries(turtlesim_node PRIVATE + ament_index_cpp::ament_index_cpp + ${cpp_typesupport_target} + ${geometry_msgs_TARGETS} +- Qt5::Widgets ++ Qt6::Widgets + ${rcl_interfaces_TARGETS} + rclcpp::rclcpp + rclcpp_action::rclcpp_action diff --git a/distros/jazzy/patch/ros2-vision-msgs-rviz-plugins.patch b/distros/jazzy/patch/ros2-vision-msgs-rviz-plugins.patch new file mode 100644 index 000000000..c10f41b91 --- /dev/null +++ b/distros/jazzy/patch/ros2-vision-msgs-rviz-plugins.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d199135..7e55b13 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -16,7 +16,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + endif() + + # find dependencies +-find_package(Qt5 REQUIRED COMPONENTS Widgets Core) ++find_package(Qt6 REQUIRED COMPONENTS Widgets Core) + find_package(yaml_cpp_vendor REQUIRED) + + find_package(ament_cmake REQUIRED) +@@ -46,7 +46,7 @@ set(vision_msgs_rviz_plugins_headers_to_moc + ) + + foreach(header "${vision_msgs_rviz_plugins_headers_to_moc}") +- qt5_wrap_cpp(vision_msgs_rviz_plugins_moc_files "${header}") ++ qt6_wrap_cpp(vision_msgs_rviz_plugins_moc_files "${header}") + endforeach() + + +@@ -68,7 +68,7 @@ add_library(${PROJECT_NAME} SHARED + target_include_directories(${PROJECT_NAME} PUBLIC + $ + $ +- ${Qt5Widgets_INCLUDE_DIRS} ++ ${Qt6Widgets_INCLUDE_DIRS} + ) + + target_link_libraries(${PROJECT_NAME} PUBLIC diff --git a/distros/jazzy/pkg_additional_info.yaml b/distros/jazzy/pkg_additional_info.yaml index cc35392a8..ae1b3f49a 100644 --- a/distros/jazzy/pkg_additional_info.yaml +++ b/distros/jazzy/pkg_additional_info.yaml @@ -156,5 +156,87 @@ zenoh_cpp_vendor: cartographer_ros: additional_cmake_args: "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON" build_number: 32 # offline_node.cpp out of the shared library (duplicate gflags abort) +class_loader: # console_bridge outlives the loaders at exit (macOS exit abort) + build_number: 32 +fuse_viz: # rviz on Qt 6 + build_number: 32 +grid_map_rviz_plugin: # rviz on Qt 6 + build_number: 32 +moveit_ros_visualization: # rviz on Qt 6 + build_number: 32 +moveit_setup_app_plugins: # rviz on Qt 6 + build_number: 32 +moveit_setup_assistant: # rviz on Qt 6 + build_number: 32 +moveit_setup_controllers: # rviz on Qt 6 + build_number: 32 +moveit_setup_core_plugins: # rviz on Qt 6 + build_number: 32 +moveit_setup_framework: # rviz on Qt 6 + build_number: 32 +moveit_setup_srdf_plugins: # rviz on Qt 6 + build_number: 32 +moveit_task_constructor_visualization: # rviz on Qt 6 + build_number: 32 +nav2_rviz_plugins: # rviz on Qt 6 + build_number: 32 +navmap_rviz_plugin: # rviz on Qt 6 + build_number: 32 +octomap_rviz_plugins: # rviz on Qt 6 + build_number: 32 +plansys2_tools: # rqt on PyQt6 / Qt 6 + build_number: 32 +py_trees_ros_tutorials: # rqt on PyQt6 / Qt 6 + build_number: 32 +python_qt_binding: # rqt on PyQt6 / Qt 6 + build_number: 32 +qt_gui: # rqt on PyQt6 / Qt 6 + build_number: 32 +qt_gui_cpp: # rqt on PyQt6 / Qt 6 + build_number: 32 rmf_utils: # its DLL moved from lib to bin (Windows) build_number: 32 +ros_image_to_qimage: # rqt on PyQt6 / Qt 6 + build_number: 32 +rqt_gui_cpp: # rqt on PyQt6 / Qt 6 + build_number: 32 +rqt_image_overlay: # rqt on PyQt6 / Qt 6 + build_number: 32 +rqt_image_overlay_layer: # rqt on PyQt6 / Qt 6 + build_number: 32 +rqt_image_view: # rqt on PyQt6 / Qt 6 + build_number: 32 +rqt_msg: # rqt_msg#37 (constants helper) + build_number: 32 +rqt_py_common: # rqt on PyQt6 / Qt 6 + build_number: 32 +rtabmap_rviz_plugins: # rviz on Qt 6 + build_number: 32 +rviz2: # rviz on Qt 6 + build_number: 32 +rviz_2d_overlay_plugins: # rviz on Qt 6 + build_number: 32 +rviz_common: # rviz on Qt 6 + build_number: 32 +rviz_default_plugins: # rviz on Qt 6 + build_number: 32 +rviz_imu_plugin: # rviz on Qt 6 + build_number: 32 +rviz_rendering: # rviz on Qt 6 + build_number: 32 +rviz_rendering_tests: # rviz on Qt 6 + build_number: 32 +rviz_satellite: # rviz on Qt 6 + build_number: 32 +rviz_visual_testing_framework: # rviz on Qt 6 + build_number: 32 +rviz_visual_tools: # rviz on Qt 6 + build_number: 32 +slam_toolbox: # rviz on Qt 6 + build_number: 32 +swri_console: # Qt 6 + build_number: 32 +turtlesim: # Qt 6 + build_number: 32 +vision_msgs_rviz_plugins: # rviz on Qt 6 + build_number: 32 From 5bddeb6941fe821de7401e0d3c08809dfe841b8c Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Sun, 22 Nov 2026 08:14:19 +0000 Subject: [PATCH 03/10] humble, jazzy: Qt rosdep keys on Qt 6; humble rviz on Qt 6; macOS rviz repaint loop - Drop distros/{humble,jazzy}/robostack.yaml: the Qt 5 rosdep keys now resolve through shared/robostack.yaml to Qt 6 as in lyrical/rolling, and the per-package qt-main -> qt6-main swaps in patch/dependencies.yaml go away (they also hid shared's rviz_rendering glew and rviz2 GL entries on jazzy). Packages that are still Qt 5 only get qt-main explicitly, as in lyrical: plotjuggler, plotjuggler_ros, and on jazzy gz_gui_vendor/gz_sim_vendor (Gazebo Harmonic's gz-gui8). mrpt_gui uses the shared entry; MRPT only looks for Qt 5, so its optional Qt support is off, as in lyrical/rolling. - humble rviz 11.2.29: upstream's Qt 6 support (ros2/rviz#1187, #1475, #1592, #1596) merged with humble's older CMake, and every package built on rviz moved along: grid_map_rviz_plugin, moveit_ros_visualization, the moveit_setup_* packages (QStringRef, QRegExp), nav2_rviz_plugins (QStateMachine from Qt 6's StateMachine module, qt6-scxml), octomap_rviz_plugins, rtabmap_rviz_plugins, rviz_imu_plugin, rviz_satellite, rviz_visual_tools, slam_toolbox, vision_msgs_rviz_plugins, as2_rviz_plugins. - humble, jazzy: ros2-rviz-rendering.osx.patch from lyrical. With Qt 6 every expose event re-ran Ogre's windowMovedOrResized -> [NSOpenGLContext update], which triggers another expose: rviz2 hung (not responding) right after start. Co-Authored-By: Claude Opus 5.5 --- distros/humble/distro.yaml | 3 +- distros/humble/patch/dependencies.yaml | 76 +--- .../humble/patch/ros2-as2-rviz-plugins.patch | 22 ++ .../patch/ros2-grid-map-rviz-plugin.patch | 31 ++ .../patch/ros2-moveit-ros-visualization.patch | 67 ++++ .../patch/ros2-moveit-setup-app-plugins.patch | 13 + .../patch/ros2-moveit-setup-assistant.patch | 35 ++ .../patch/ros2-moveit-setup-controllers.patch | 13 + .../ros2-moveit-setup-core-plugins.patch | 26 ++ .../patch/ros2-moveit-setup-framework.patch | 65 +++- .../ros2-moveit-setup-srdf-plugins.patch | 57 +++ .../humble/patch/ros2-nav2-rviz-plugins.patch | 62 +++- .../patch/ros2-octomap-rviz-plugins.patch | 37 ++ .../patch/ros2-rtabmap-rviz-plugins.patch | 13 + distros/humble/patch/ros2-rviz-common.patch | 331 ++++++++++++++++++ .../patch/ros2-rviz-default-plugins.patch | 96 ++++- .../humble/patch/ros2-rviz-imu-plugin.patch | 45 +++ .../patch/ros2-rviz-rendering-tests.patch | 20 ++ .../patch/ros2-rviz-rendering.osx.patch | 46 +++ .../humble/patch/ros2-rviz-rendering.patch | 168 ++++++++- .../humble/patch/ros2-rviz-satellite.patch | 22 ++ .../ros2-rviz-visual-testing-framework.patch | 47 +++ .../humble/patch/ros2-rviz-visual-tools.patch | 14 + distros/humble/patch/ros2-rviz2.patch | 120 +++---- distros/humble/patch/ros2-slam-toolbox.patch | 41 ++- .../patch/ros2-vision-msgs-rviz-plugins.patch | 27 +- distros/humble/pkg_additional_info.yaml | 52 +++ distros/humble/robostack.yaml | 69 ---- distros/humble/vinca.yaml | 2 - distros/jazzy/distro.yaml | 3 +- distros/jazzy/patch/dependencies.yaml | 206 ++--------- .../jazzy/patch/ros2-rviz-rendering.osx.patch | 46 +++ distros/jazzy/pkg_additional_info.yaml | 2 + distros/jazzy/robostack.yaml | 69 ---- distros/jazzy/vinca.yaml | 2 - 35 files changed, 1463 insertions(+), 485 deletions(-) create mode 100644 distros/humble/patch/ros2-as2-rviz-plugins.patch create mode 100644 distros/humble/patch/ros2-grid-map-rviz-plugin.patch create mode 100644 distros/humble/patch/ros2-moveit-setup-app-plugins.patch create mode 100644 distros/humble/patch/ros2-moveit-setup-assistant.patch create mode 100644 distros/humble/patch/ros2-moveit-setup-controllers.patch create mode 100644 distros/humble/patch/ros2-moveit-setup-core-plugins.patch create mode 100644 distros/humble/patch/ros2-moveit-setup-srdf-plugins.patch create mode 100644 distros/humble/patch/ros2-octomap-rviz-plugins.patch create mode 100644 distros/humble/patch/ros2-rtabmap-rviz-plugins.patch create mode 100644 distros/humble/patch/ros2-rviz-common.patch create mode 100644 distros/humble/patch/ros2-rviz-imu-plugin.patch create mode 100644 distros/humble/patch/ros2-rviz-rendering-tests.patch create mode 100644 distros/humble/patch/ros2-rviz-rendering.osx.patch create mode 100644 distros/humble/patch/ros2-rviz-satellite.patch create mode 100644 distros/humble/patch/ros2-rviz-visual-testing-framework.patch create mode 100644 distros/humble/patch/ros2-rviz-visual-tools.patch delete mode 100644 distros/humble/robostack.yaml create mode 100644 distros/jazzy/patch/ros2-rviz-rendering.osx.patch delete mode 100644 distros/jazzy/robostack.yaml diff --git a/distros/humble/distro.yaml b/distros/humble/distro.yaml index 5736c93d4..8ffbb60a3 100644 --- a/distros/humble/distro.yaml +++ b/distros/humble/distro.yaml @@ -7,7 +7,8 @@ upload_to: [anaconda] read_from: anaconda pinning_overrides: # wxwidgets >= 3.3.2 (and the newest 3.3.1 builds) need gst-plugins-base 1.28 on Linux, - # which no qt-main 5.15 accepts; mrpt_gui links both + # which no qt-main 5.15 accepts; keeps wxWidgets users (mrpt_gui) installable next to the + # packages still on Qt5 (plotjuggler) wxwidgets: [3.3.1] # nav2_mppi_controller lists xsimd before xtensor: unpinned, the solver takes the newest # xsimd (14), which no xtensor >= 0.25 accepts, and falls back to xtensor 0.23.9, whose diff --git a/distros/humble/patch/dependencies.yaml b/distros/humble/patch/dependencies.yaml index 510d5481c..ee9dfdd2e 100644 --- a/distros/humble/patch/dependencies.yaml +++ b/distros/humble/patch/dependencies.yaml @@ -62,13 +62,11 @@ mimick_vendor: add_build: ["vcstool"] moveit_visual_tools: add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}"] -mrpt_gui: - # Overrides shared/: this distribution maps Qt to qt-main 5.15, whose builds need - # gstreamer <1.27, while the pinned wxwidgets (3.3.3) needs gstreamer 1.28. A version - # spec bypasses that pin, so the solver picks a wxwidgets that coexists with qt-main. - add_host: ["wxwidgets >=3.2", "${{ 'glad' if win }}"] # glad: as in shared/ nav2_constrained_smoother: add_host: ["${{ 'openblas' if win }}"] +nav2_rviz_plugins: + # QStateMachine: Qt 6's StateMachine module + add_host: ["qt6-scxml"] nav2_util: add_host: ["libboost-devel"] opennav_coverage: @@ -84,13 +82,18 @@ parameter_traits: add_run: ["cpp-expected"] pcl_conversions: add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "libboost-devel"] -plansys2_tools: - # rqt plugin: Qt 6 like rqt_gui_cpp - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] plotjuggler: - add_host: ["libxcb", "${{ 'elfutils' if linux }}", "ros2-ros-workspace", "git-lfs"] + # PlotJuggler 3.17 is Qt5-only (find_package(Qt5 ...)); the Qt rosdep keys map to Qt6 + remove_host: ["qt6-main"] + remove_run: ["qt6-main"] + add_host: ["libxcb", "${{ 'elfutils' if linux }}", "ros2-ros-workspace", "git-lfs", "qt-main"] + add_run: ["qt-main"] +plotjuggler_ros: + # Qt5-only like plotjuggler, which it links + remove_host: ["qt6-main"] + remove_run: ["qt6-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt-main"] # GL: as in shared/ + add_run: ["qt-main"] polygon_rviz_plugins: add_host: ["libgl-devel"] add_run: ["libgl-devel"] @@ -99,27 +102,15 @@ py_trees: py_trees_js: add_host: ["hatchling"] py_trees_ros_tutorials: - # the mock GUI is ported to PyQt6 (patch/ros2-py-trees-ros-tutorials.patch): PyQt5 and - # PyQt6 (the rqt stack) can't be installed together - remove_run: ["pyqt", "pyqt-builder"] add_run: ["pyqt6"] python_qt_binding: - # pyside2 has no python 3.14 build; port to PyQt6 instead. - remove_host: ["qt-main", "pyqt"] - remove_run: ["qt-main", "pyqt"] # sip <6.16: 6.16.x regressed ABI targeting for PyQt-based bindings. add_host: ["pyqt-builder", "pep517", "qt6-main", "pyqt6", "sip <6.16"] add_run: ["pyqt-builder", "pep517", "qt6-main", "pyqt6"] qt_gui: - # Same PyQt6 port as python_qt_binding/qt_gui_cpp below. - remove_host: ["qt-main", "pyqt"] - remove_run: ["qt-main", "pyqt"] add_host: ["qt6-main", "pyqt6"] add_run: ["qt6-main", "pyqt6"] qt_gui_cpp: - # Ported to PyQt6, see patch/ros2-qt-gui-cpp.patch. - remove_host: ["qt-main", "pyqt"] - remove_run: ["qt-main", "pyqt"] add_build: ["${{ 'pyqt6' if (build_platform != target_platform) }}", "${{ 'qt6-main' if (build_platform != target_platform) }}"] # sip pinned directly for the same reason as python_qt_binding above. add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "pyqt-builder", "pep517", "qt6-main", "pyqt6", "sip <6.16"] @@ -147,36 +138,6 @@ ros_ign_gazebo: add_host: ["ros2-std-msgs", "ros2-rclcpp", "${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}"] ros_ign_interfaces: add_host: ["ros2-rcl-interfaces"] -ros_image_to_qimage: - # Same PyQt6 port as qt_gui_cpp/rqt_gui_cpp above (patch/ros2-ros-image-to-qimage.patch). - remove_host: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] - remove_run: ["qt-main"] -rqt_gui_cpp: - remove_host: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] -rqt_image_overlay: - # Same PyQt6 port as qt_gui_cpp/rqt_gui_cpp above (patch/ros2-rqt-image-overlay.patch). - remove_host: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] - remove_run: ["qt-main"] -rqt_image_overlay_layer: - # Same PyQt6 port as qt_gui_cpp/rqt_gui_cpp above (patch/ros2-rqt-image-overlay-layer.patch). - remove_host: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] - remove_run: ["qt-main"] -rqt_image_view: - remove_host: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] -rqt_mocap4r2_control: - # rqt plugin: Qt 6 like rqt_gui_cpp - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] -rqt_py_common: - remove_host: ["qt-main"] - add_host: ["qt6-main"] - remove_run: ["qt-main"] rtabmap: add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "ceres-solver", "${{ 'libdc1394' if not win }}", "libusb", "vtk"] remove_host: ["ros2-qt-gui-cpp"] @@ -189,7 +150,7 @@ rviz_ogre_vendor: add_build: ["vcstool"] add_run: ["assimp"] slam_toolbox: - add_build: ["${{ 'qt-main' if (build_platform != target_platform) }}"] + add_build: ["${{ 'qt6-main' if (build_platform != target_platform) }}"] add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}"] spatio_temporal_voxel_layer: add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "openvdb"] @@ -198,11 +159,6 @@ spdlog_vendor: add_run: ["spdlog"] tracetools: remove_host: ["pkg-config"] -turtlesim: - # Qt 6 (patch/ros2-turtlesim.patch), like rqt - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] uncrustify_vendor: add_host: ["uncrustify"] add_run: ["uncrustify"] @@ -210,7 +166,7 @@ ur_moveit_config: add_host: ["ros2-rclpy"] add_run: ["ros2-rclpy"] vision_msgs_rviz_plugins: - add_build: ["${{ 'qt-main' if (build_platform != target_platform) }}"] + add_build: ["${{ 'qt6-main' if (build_platform != target_platform) }}"] add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}"] warehouse_ros_sqlite: add_host: ["ros2-sqlite3-vendor"] diff --git a/distros/humble/patch/ros2-as2-rviz-plugins.patch b/distros/humble/patch/ros2-as2-rviz-plugins.patch new file mode 100644 index 000000000..67cece52c --- /dev/null +++ b/distros/humble/patch/ros2-as2-rviz-plugins.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index deaeab8f..ef713b9f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -30,7 +30,7 @@ set(PROJECT_DEPENDENCIES + as2_motion_reference_handlers + ) + +-find_package(Qt5 REQUIRED COMPONENTS Widgets) ++find_package(Qt6 REQUIRED COMPONENTS Widgets) + + foreach(DEPENDENCY ${PROJECT_DEPENDENCIES}) + find_package(${DEPENDENCY} REQUIRED) +@@ -53,7 +53,7 @@ set(SRC_FILES + add_library(${PROJECT_NAME} SHARED ${SRC_FILES}) + ament_target_dependencies(${PROJECT_NAME} ${PROJECT_DEPENDENCIES}) + target_include_directories(${PROJECT_NAME} PUBLIC +- ${Qt5Widgets_INCLUDE_DIRS}) ++ ${Qt6Widgets_INCLUDE_DIRS}) + + ## Here we export the plugins and meshes so they can be found by RViz at runtime. + pluginlib_export_plugin_description_file(rviz_common plugin_description.xml) diff --git a/distros/humble/patch/ros2-grid-map-rviz-plugin.patch b/distros/humble/patch/ros2-grid-map-rviz-plugin.patch new file mode 100644 index 000000000..5e6b3228d --- /dev/null +++ b/distros/humble/patch/ros2-grid-map-rviz-plugin.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 92bb25b..876d525 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,7 +5,7 @@ find_package(ament_cmake REQUIRED) + find_package(grid_map_cmake_helpers REQUIRED) + find_package(grid_map_msgs REQUIRED) + find_package(grid_map_ros REQUIRED) +-find_package(Qt5 REQUIRED COMPONENTS Core Widgets) ++find_package(Qt6 REQUIRED COMPONENTS Core Widgets) + find_package(rclcpp REQUIRED) + find_package(rviz_common REQUIRED) + find_package(rviz_ogre_vendor REQUIRED) +@@ -34,7 +34,7 @@ set(INCLUDE_FILES_QT + include/grid_map_rviz_plugin/GridMapDisplay.hpp + ) + +-qt5_wrap_cpp(MOC_FILES ${INCLUDE_FILES_QT}) ++qt6_wrap_cpp(MOC_FILES ${INCLUDE_FILES_QT}) + + ## Avoid Qt signals and slots defining "emit", "slots", etc. + add_definitions(-DQT_NO_KEYWORDS) +@@ -133,7 +133,7 @@ endif() + ament_export_include_directories(include) + ament_export_targets(${PROJECT_NAME} HAS_LIBRARY_TARGET) + ament_export_dependencies( +- Qt5 ++ Qt6 + rviz_common + geometry_msgs + map_msgs diff --git a/distros/humble/patch/ros2-moveit-ros-visualization.patch b/distros/humble/patch/ros2-moveit-ros-visualization.patch index 9bd763aee..5440ae7c0 100644 --- a/distros/humble/patch/ros2-moveit-ros-visualization.patch +++ b/distros/humble/patch/ros2-moveit-ros-visualization.patch @@ -1,4 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0f4a738241..8611a910fb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -37,10 +37,10 @@ find_package(rviz_ogre_vendor REQUIRED) + include(ConfigExtras.cmake) + + # Qt Stuff +-find_package(Qt5 ${rviz_QT_VERSION} REQUIRED Core Widgets) +-set(QT_LIBRARIES Qt5::Widgets) ++find_package(Qt6 ${rviz_QT_VERSION} REQUIRED Core Widgets) ++set(QT_LIBRARIES Qt6::Widgets) + macro(qt_wrap_ui) +- qt5_wrap_ui(${ARGN}) ++ qt6_wrap_ui(${ARGN}) + endmacro() + + set(CMAKE_INCLUDE_CURRENT_DIR ON) diff --git a/ConfigExtras.cmake b/ConfigExtras.cmake +index ddda760859..3b7b9699cd 100644 --- a/ConfigExtras.cmake +++ b/ConfigExtras.cmake @@ -1,3 +1,3 @@ @@ -6,3 +25,51 @@ diff --git a/ConfigExtras.cmake b/ConfigExtras.cmake -find_package(Boost REQUIRED thread date_time system filesystem) +find_package(Boost REQUIRED thread date_time filesystem) +diff --git a/motion_planning_rviz_plugin/CMakeLists.txt b/motion_planning_rviz_plugin/CMakeLists.txt +index d93996d6af..4d7a6b6e26 100644 +--- a/motion_planning_rviz_plugin/CMakeLists.txt ++++ b/motion_planning_rviz_plugin/CMakeLists.txt +@@ -5,7 +5,7 @@ set(HEADERS + include/moveit/motion_planning_rviz_plugin/motion_planning_param_widget.h + include/moveit/motion_planning_rviz_plugin/interactive_marker_display.h + ) +-qt5_wrap_ui(UIC_FILES ++qt6_wrap_ui(UIC_FILES + src/ui/motion_planning_rviz_plugin_frame.ui + src/ui/motion_planning_rviz_plugin_frame_joints.ui + ) +@@ -39,7 +39,7 @@ ament_target_dependencies(${MOVEIT_LIB_NAME}_core + moveit_ros_warehouse + rviz2 + rviz_ogre_vendor +- Qt5 ++ Qt6 + pluginlib + rviz_ogre_vendor + ) +diff --git a/planning_scene_rviz_plugin/CMakeLists.txt b/planning_scene_rviz_plugin/CMakeLists.txt +index f71a603caa..e18759e5d7 100644 +--- a/planning_scene_rviz_plugin/CMakeLists.txt ++++ b/planning_scene_rviz_plugin/CMakeLists.txt +@@ -22,7 +22,7 @@ target_include_directories(${MOVEIT_LIB_NAME}_core PRIVATE "${OGRE_PREFIX_DIR}/i + + add_library(${MOVEIT_LIB_NAME} SHARED src/plugin_init.cpp) + set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}") +-target_link_libraries(${MOVEIT_LIB_NAME} ${MOVEIT_LIB_NAME}_core Qt5::Widgets) ++target_link_libraries(${MOVEIT_LIB_NAME} ${MOVEIT_LIB_NAME}_core Qt6::Widgets) + ament_target_dependencies(${MOVEIT_LIB_NAME} + pluginlib + rviz_ogre_vendor +diff --git a/rviz_plugin_render_tools/CMakeLists.txt b/rviz_plugin_render_tools/CMakeLists.txt +index fc5d381e5f..b95c62f0df 100644 +--- a/rviz_plugin_render_tools/CMakeLists.txt ++++ b/rviz_plugin_render_tools/CMakeLists.txt +@@ -27,7 +27,7 @@ add_library(${MOVEIT_LIB_NAME} SHARED + set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}") + + target_link_libraries(${MOVEIT_LIB_NAME} +- Qt5::Widgets ++ Qt6::Widgets + ) + + ament_target_dependencies(${MOVEIT_LIB_NAME} diff --git a/distros/humble/patch/ros2-moveit-setup-app-plugins.patch b/distros/humble/patch/ros2-moveit-setup-app-plugins.patch new file mode 100644 index 000000000..b58240e9e --- /dev/null +++ b/distros/humble/patch/ros2-moveit-setup-app-plugins.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a5a9fbb070..87f2f6bd4f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,7 +17,7 @@ find_package(rclcpp REQUIRED) + set(CMAKE_AUTOMOC ON) + add_definitions(-DQT_NO_KEYWORDS) + +-qt5_wrap_cpp(MOC_FILES ++qt6_wrap_cpp(MOC_FILES + include/moveit_setup_app_plugins/launches_widget.hpp + include/moveit_setup_app_plugins/perception_widget.hpp + ) diff --git a/distros/humble/patch/ros2-moveit-setup-assistant.patch b/distros/humble/patch/ros2-moveit-setup-assistant.patch new file mode 100644 index 000000000..b48e5232b --- /dev/null +++ b/distros/humble/patch/ros2-moveit-setup-assistant.patch @@ -0,0 +1,35 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2c30763937..32d353ece5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,8 +12,8 @@ find_package(Boost REQUIRED program_options) + find_package(moveit_setup_framework REQUIRED) + find_package(moveit_setup_srdf_plugins REQUIRED) + find_package(pluginlib REQUIRED) +-find_package(Qt5Core REQUIRED) +-find_package(Qt5Widgets REQUIRED) ++find_package(Qt6Core REQUIRED) ++find_package(Qt6Widgets REQUIRED) + find_package(rclcpp REQUIRED) + + set(THIS_PACKAGE_INCLUDE_DEPENDS +@@ -21,8 +21,8 @@ set(THIS_PACKAGE_INCLUDE_DEPENDS + moveit_setup_framework + moveit_setup_srdf_plugins + pluginlib +- Qt5Core +- Qt5Widgets ++ Qt6Core ++ Qt6Widgets + rclcpp + ) + +@@ -35,7 +35,7 @@ set(HEADERS + set(CMAKE_AUTOMOC ON) + add_definitions(-DQT_NO_KEYWORDS) + +-qt5_wrap_cpp(MOC_FILES ++qt6_wrap_cpp(MOC_FILES + ${HEADERS} + ) + diff --git a/distros/humble/patch/ros2-moveit-setup-controllers.patch b/distros/humble/patch/ros2-moveit-setup-controllers.patch new file mode 100644 index 000000000..cf517faab --- /dev/null +++ b/distros/humble/patch/ros2-moveit-setup-controllers.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9c41f06bed..06796d1a10 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -16,7 +16,7 @@ find_package(rclcpp REQUIRED) + set(CMAKE_AUTOMOC ON) + add_definitions(-DQT_NO_KEYWORDS) + +-qt5_wrap_cpp(MOC_FILES ++qt6_wrap_cpp(MOC_FILES + include/moveit_setup_controllers/controller_edit_widget.hpp + include/moveit_setup_controllers/controllers_widget.hpp + include/moveit_setup_controllers/urdf_modifications_widget.hpp diff --git a/distros/humble/patch/ros2-moveit-setup-core-plugins.patch b/distros/humble/patch/ros2-moveit-setup-core-plugins.patch new file mode 100644 index 000000000..109f4d1ee --- /dev/null +++ b/distros/humble/patch/ros2-moveit-setup-core-plugins.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9b54b7b7fa..e8cd251584 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -19,7 +19,7 @@ find_package(urdf REQUIRED) + set(CMAKE_AUTOMOC ON) + add_definitions(-DQT_NO_KEYWORDS) + +-qt5_wrap_cpp(MOC_FILES ++qt6_wrap_cpp(MOC_FILES + include/moveit_setup_core_plugins/start_screen_widget.hpp + include/moveit_setup_core_plugins/configuration_files_widget.hpp + include/moveit_setup_core_plugins/author_information_widget.hpp +diff --git a/src/configuration_files_widget.cpp b/src/configuration_files_widget.cpp +index 61be0be608..07024764d5 100644 +--- a/src/configuration_files_widget.cpp ++++ b/src/configuration_files_widget.cpp +@@ -44,7 +44,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + diff --git a/distros/humble/patch/ros2-moveit-setup-framework.patch b/distros/humble/patch/ros2-moveit-setup-framework.patch index 6e1739cef..53c69f6f4 100644 --- a/distros/humble/patch/ros2-moveit-setup-framework.patch +++ b/distros/humble/patch/ros2-moveit-setup-framework.patch @@ -1,5 +1,5 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 36e80da02..ca5263f2d 100644 +index 36e80da028..093a487277 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,8 +11,7 @@ find_package(ament_index_cpp REQUIRED) @@ -8,10 +8,19 @@ index 36e80da02..ca5263f2d 100644 find_package(moveit_ros_visualization REQUIRED) -find_package(Qt5Core REQUIRED) -find_package(Qt5Widgets REQUIRED) -+find_package(Qt5 COMPONENTS Core Widgets REQUIRED) ++find_package(Qt6 COMPONENTS Core Widgets REQUIRED) find_package(pluginlib REQUIRED) find_package(rclcpp REQUIRED) find_package(rviz_common REQUIRED) +@@ -22,7 +21,7 @@ find_package(urdf REQUIRED) + + set(CMAKE_INCLUDE_CURRENT_DIR ON) + +-qt5_wrap_cpp(MOC_FILES ++qt6_wrap_cpp(MOC_FILES + include/moveit_setup_framework/qt/helper_widgets.hpp + include/moveit_setup_framework/qt/setup_step_widget.hpp + include/moveit_setup_framework/qt/rviz_panel.hpp @@ -42,6 +41,10 @@ add_library(${PROJECT_NAME} src/xml_syntax_highlighter.cpp ${MOC_FILES} @@ -29,7 +38,7 @@ index 36e80da02..ca5263f2d 100644 pluginlib - Qt5Core - Qt5Widgets -+ Qt5 ++ Qt6 rclcpp rviz_common rviz_rendering @@ -41,8 +50,19 @@ index 36e80da02..ca5263f2d 100644 ament_export_targets(export_moveit_setup_framework HAS_LIBRARY_TARGET) install(TARGETS ${PROJECT_NAME} +@@ -84,8 +87,8 @@ install(TARGETS ${PROJECT_NAME} + ) + ament_export_include_directories(include) + ament_export_dependencies(rclcpp) +-ament_export_dependencies(Qt5Core) +-ament_export_dependencies(Qt5Widgets) ++ament_export_dependencies(Qt6Core) ++ament_export_dependencies(Qt6Widgets) + ament_export_dependencies(moveit_common) + ament_export_dependencies(moveit_core) + ament_export_dependencies(moveit_ros_planning) diff --git a/include/moveit_setup_framework/qt/setup_step_widget.hpp b/include/moveit_setup_framework/qt/setup_step_widget.hpp -index f32e7b5ad..c6f472682 100644 +index f32e7b5ad3..c6f472682d 100644 --- a/include/moveit_setup_framework/qt/setup_step_widget.hpp +++ b/include/moveit_setup_framework/qt/setup_step_widget.hpp @@ -40,12 +40,14 @@ @@ -61,8 +81,21 @@ index f32e7b5ad..c6f472682 100644 { Q_OBJECT public: +diff --git a/include/moveit_setup_framework/qt/xml_syntax_highlighter.hpp b/include/moveit_setup_framework/qt/xml_syntax_highlighter.hpp +index 0ec322cc2e..a7474edaf9 100644 +--- a/include/moveit_setup_framework/qt/xml_syntax_highlighter.hpp ++++ b/include/moveit_setup_framework/qt/xml_syntax_highlighter.hpp +@@ -63,7 +63,7 @@ private: + using Rules = std::map; + Rules rules; + +- Rules::const_iterator highlight(Rules::const_iterator active, QStringRef text, int start, bool search_end, int& end); ++ Rules::const_iterator highlight(Rules::const_iterator active, QStringView text, int start, bool search_end, int& end); + }; + + } // namespace moveit_setup diff --git a/include/moveit_setup_framework/templates.hpp b/include/moveit_setup_framework/templates.hpp -index fb90a7570..695f7a9cf 100644 +index fb90a75703..695f7a9cfb 100644 --- a/include/moveit_setup_framework/templates.hpp +++ b/include/moveit_setup_framework/templates.hpp @@ -38,6 +38,8 @@ @@ -83,3 +116,25 @@ index fb90a7570..695f7a9cf 100644 }; } // namespace moveit_setup +diff --git a/src/xml_syntax_highlighter.cpp b/src/xml_syntax_highlighter.cpp +index 50994498ae..cf91c6dc38 100644 +--- a/src/xml_syntax_highlighter.cpp ++++ b/src/xml_syntax_highlighter.cpp +@@ -64,7 +64,7 @@ void XmlSyntaxHighlighter::addTag(const QString& tag, const QTextCharFormat& for + } + + XmlSyntaxHighlighter::Rules::const_iterator +-XmlSyntaxHighlighter::highlight(Rules::const_iterator active, QStringRef text, int start, bool search_end, int& end) ++XmlSyntaxHighlighter::highlight(Rules::const_iterator active, QStringView text, int start, bool search_end, int& end) + { + int offset = end; // when passed, end indicates the end of the opening expression + auto next = active; // return value: active rule at end of text +@@ -121,7 +121,7 @@ void XmlSyntaxHighlighter::highlightBlock(const QString& text) + { + Rules::const_iterator active = previousBlockState() < 0 ? rules.end() : rules.find(previousBlockState()); + int unused = 0; +- active = highlight(active, QStringRef(&text, 0, text.size()), 0, active != rules.cend(), unused); ++ active = highlight(active, QStringView(text), 0, active != rules.cend(), unused); + setCurrentBlockState(active != rules.cend() ? active->first : -1); + } + diff --git a/distros/humble/patch/ros2-moveit-setup-srdf-plugins.patch b/distros/humble/patch/ros2-moveit-setup-srdf-plugins.patch new file mode 100644 index 000000000..ed7a83ba1 --- /dev/null +++ b/distros/humble/patch/ros2-moveit-setup-srdf-plugins.patch @@ -0,0 +1,57 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index df0c7f104c..35b2d38114 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -10,7 +10,7 @@ find_package(ament_cmake_ros REQUIRED) + find_package(moveit_setup_framework REQUIRED) + find_package(pluginlib REQUIRED) + +-qt5_wrap_cpp(MOC_FILES ++qt6_wrap_cpp(MOC_FILES + include/moveit_setup_srdf_plugins/collision_linear_model.hpp + include/moveit_setup_srdf_plugins/collision_matrix_model.hpp + include/moveit_setup_srdf_plugins/default_collisions_widget.hpp +diff --git a/src/collision_linear_model.cpp b/src/collision_linear_model.cpp +index 0018752460..c9720dc996 100644 +--- a/src/collision_linear_model.cpp ++++ b/src/collision_linear_model.cpp +@@ -37,6 +37,7 @@ + #include + #include + ++#include + #include + #include + #include +@@ -244,8 +245,8 @@ bool SortFilterProxyModel::filterAcceptsRow(int source_row, const QModelIndex& s + m->data(m->index(source_row, 2), Qt::CheckStateRole) == Qt::Checked)) + return false; // not accepted due to check state + +- const QRegExp regexp = this->filterRegExp(); +- if (regexp.isEmpty()) ++ const QRegularExpression regexp = this->filterRegularExpression(); ++ if (regexp.pattern().isEmpty()) + return true; + + return m->data(m->index(source_row, 0, source_parent), Qt::DisplayRole).toString().contains(regexp) || +diff --git a/src/collision_matrix_model.cpp b/src/collision_matrix_model.cpp +index 6d8ed29559..2e9b1dffb2 100644 +--- a/src/collision_matrix_model.cpp ++++ b/src/collision_matrix_model.cpp +@@ -36,6 +36,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -193,7 +194,7 @@ void CollisionMatrixModel::setEnabled(const QModelIndexList& indexes, bool value + void CollisionMatrixModel::setFilterRegExp(const QString& filter) + { + beginResetModel(); +- QRegExp regexp(filter); ++ QRegularExpression regexp(filter); + visual_to_index.clear(); + for (int idx = 0, end = q_names.size(); idx != end; ++idx) + { diff --git a/distros/humble/patch/ros2-nav2-rviz-plugins.patch b/distros/humble/patch/ros2-nav2-rviz-plugins.patch index 55c626ecb..d6498a71e 100644 --- a/distros/humble/patch/ros2-nav2-rviz-plugins.patch +++ b/distros/humble/patch/ros2-nav2-rviz-plugins.patch @@ -1,7 +1,7 @@ -diff --git a/nav2_rviz_plugins/CMakeLists.txt b/nav2_rviz_plugins/CMakeLists.txt -index 39bdbabae4..659acd06fc 100644 ---- a/nav2_rviz_plugins/CMakeLists.txt -+++ b/nav2_rviz_plugins/CMakeLists.txt +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 39bdbabae..72d373139 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt @@ -6,10 +6,6 @@ if(NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 17) endif() @@ -13,3 +13,57 @@ index 39bdbabae4..659acd06fc 100644 # Qt5 boilerplate options from http://doc.qt.io/qt-5/cmake-manual.html set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) +@@ -21,7 +17,7 @@ find_package(nav2_lifecycle_manager REQUIRED) + find_package(nav2_msgs REQUIRED) + find_package(nav_msgs REQUIRED) + find_package(pluginlib REQUIRED) +-find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets Test Concurrent) ++find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets StateMachine Test Concurrent) + find_package(rclcpp REQUIRED) + find_package(rclcpp_lifecycle REQUIRED) + find_package(rviz_common REQUIRED) +@@ -62,7 +58,7 @@ set(dependencies + nav2_msgs + nav_msgs + pluginlib +- Qt5 ++ Qt6 + rclcpp + rclcpp_lifecycle + rviz_common +@@ -78,12 +74,13 @@ ament_target_dependencies(${library_name} + ) + + target_include_directories(${library_name} PUBLIC +- ${Qt5Widgets_INCLUDE_DIRS} ++ ${Qt6Widgets_INCLUDE_DIRS} + ${OGRE_INCLUDE_DIRS} + ) + + target_link_libraries(${library_name} + rviz_common::rviz_common ++ Qt6::StateMachine # QStateMachine is its own module in Qt 6 + ) + + # Causes the visibility macros to use dllexport rather than dllimport, +@@ -115,7 +112,7 @@ endif() + ament_export_include_directories(include) + ament_export_targets(${library_name} HAS_LIBRARY_TARGET) + ament_export_dependencies( +- Qt5 ++ Qt6 + rviz_common + geometry_msgs + map_msgs +diff --git a/include/nav2_rviz_plugins/nav2_panel.hpp b/include/nav2_rviz_plugins/nav2_panel.hpp +index b875c982e..59aff20a6 100644 +--- a/include/nav2_rviz_plugins/nav2_panel.hpp ++++ b/include/nav2_rviz_plugins/nav2_panel.hpp +@@ -15,6 +15,7 @@ + #ifndef NAV2_RVIZ_PLUGINS__NAV2_PANEL_HPP_ + #define NAV2_RVIZ_PLUGINS__NAV2_PANEL_HPP_ + ++#include // QStateMachine, QState, QSignalTransition: their own module in Qt 6 + #include + #include + #undef NO_ERROR diff --git a/distros/humble/patch/ros2-octomap-rviz-plugins.patch b/distros/humble/patch/ros2-octomap-rviz-plugins.patch new file mode 100644 index 000000000..793446eb0 --- /dev/null +++ b/distros/humble/patch/ros2-octomap-rviz-plugins.patch @@ -0,0 +1,37 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c16ebcc..68858e6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -13,7 +13,7 @@ endif() + find_package(ament_cmake_auto REQUIRED) + ament_auto_find_build_dependencies() + +-find_package(Qt5 REQUIRED COMPONENTS Widgets) ++find_package(Qt6 REQUIRED COMPONENTS Widgets) + set(CMAKE_AUTOMOC ON) + + set(octomap_rviz_plugins_headers_to_moc +@@ -22,7 +22,7 @@ set(octomap_rviz_plugins_headers_to_moc + ) + + foreach(header "${octomap_rviz_plugins_headers_to_moc}") +- qt5_wrap_cpp(octomap_rviz_plugins_moc_files "${header}") ++ qt6_wrap_cpp(octomap_rviz_plugins_moc_files "${header}") + endforeach() + + ament_auto_add_library(${PROJECT_NAME} SHARED +@@ -32,12 +32,12 @@ ament_auto_add_library(${PROJECT_NAME} SHARED + ) + + target_link_libraries(${PROJECT_NAME} +- Qt5::Widgets ++ Qt6::Widgets + octomap + ) + + target_include_directories(${PROJECT_NAME} PUBLIC +- ${Qt5Widgets_INCLUDE_DIRS} ++ ${Qt6Widgets_INCLUDE_DIRS} + ) + + target_compile_definitions(${PROJECT_NAME} PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS") diff --git a/distros/humble/patch/ros2-rtabmap-rviz-plugins.patch b/distros/humble/patch/ros2-rtabmap-rviz-plugins.patch new file mode 100644 index 000000000..3c3c1230a --- /dev/null +++ b/distros/humble/patch/ros2-rtabmap-rviz-plugins.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4e47a684a..9e071e0b8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -15,7 +15,7 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") + endif() + + # Make sure it is first to prevent Qt6 from claiming the generic versionless targets first +-find_package(Qt5 QUIET COMPONENTS Widgets) ++find_package(Qt6 QUIET COMPONENTS Widgets) + + find_package(ament_cmake_ros REQUIRED) + find_package(pcl_conversions REQUIRED) diff --git a/distros/humble/patch/ros2-rviz-common.patch b/distros/humble/patch/ros2-rviz-common.patch new file mode 100644 index 000000000..db4783f55 --- /dev/null +++ b/distros/humble/patch/ros2-rviz-common.patch @@ -0,0 +1,331 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 44fce4ec..0b093f87 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -30,7 +30,14 @@ find_package(ament_cmake REQUIRED) + # do find_package(rviz_ogre_vendor) first to make sure the custom OGRE is found + find_package(rviz_ogre_vendor REQUIRED) + +-find_package(Qt5 REQUIRED COMPONENTS Widgets) ++find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets) ++find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets) ++if(${QT_VERSION} VERSION_LESS 5.15.0) ++ function(qt_wrap_cpp out) ++ qt5_wrap_cpp(_sources ${ARGN}) ++ set("${out}" ${_sources} PARENT_SCOPE) ++ endfunction() ++endif() + + find_package(geometry_msgs REQUIRED) + find_package(pluginlib REQUIRED) +@@ -130,7 +137,7 @@ set(rviz_common_headers_to_moc + ) + + foreach(header "${rviz_common_headers_to_moc}") +- qt5_wrap_cpp(rviz_common_moc_files "${header}") ++ qt_wrap_cpp(rviz_common_moc_files "${header}") + endforeach() + + set(rviz_common_source_files +@@ -238,7 +245,7 @@ target_link_libraries(rviz_common + PUBLIC + rviz_ogre_vendor::OgreMain + rviz_ogre_vendor::OgreOverlay +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + ) + + ament_target_dependencies(rviz_common +@@ -322,10 +329,10 @@ if(BUILD_TESTING) + find_package(ament_cmake_gmock REQUIRED) + find_package(ament_cmake_gtest REQUIRED) + +- qt5_wrap_cpp(rviz_common_test_moc_files test/mock_display.hpp) +- qt5_wrap_cpp(rviz_common_test_moc_files test/mock_property_change_receiver.hpp) ++ qt_wrap_cpp(rviz_common_test_moc_files test/mock_display.hpp) ++ qt_wrap_cpp(rviz_common_test_moc_files test/mock_property_change_receiver.hpp) + +- qt5_wrap_cpp(rviz_common_test_frame_manager_moc src/rviz_common/frame_manager.hpp) ++ qt_wrap_cpp(rviz_common_test_frame_manager_moc src/rviz_common/frame_manager.hpp) + + ament_add_gmock(display_factory_test + test/display_factory_test.cpp +@@ -334,7 +341,7 @@ if(BUILD_TESTING) + if(TARGET display_factory_test) + target_compile_definitions(display_factory_test PUBLIC + -D_TEST_PLUGIN_DESCRIPTIONS="${CMAKE_CURRENT_SOURCE_DIR}") +- target_link_libraries(display_factory_test rviz_common Qt5::Widgets) ++ target_link_libraries(display_factory_test rviz_common Qt${QT_VERSION_MAJOR}::Widgets) + endif() + + ament_add_gmock(frame_manager_test +@@ -443,7 +450,7 @@ if(BUILD_TESTING) + test/mock_property_change_receiver.cpp + ${SKIP_DISPLAY_TESTS}) + if(TARGET rviz_common_display_test) +- target_link_libraries(rviz_common_display_test rviz_common Qt5::Widgets) ++ target_link_libraries(rviz_common_display_test rviz_common Qt${QT_VERSION_MAJOR}::Widgets) + ament_target_dependencies(rviz_common_display_test yaml_cpp_vendor) + endif() + endif() +diff --git a/include/rviz_common/properties/ros_action_property.hpp b/include/rviz_common/properties/ros_action_property.hpp +index a47d9793..39e77d77 100644 +--- a/include/rviz_common/properties/ros_action_property.hpp ++++ b/include/rviz_common/properties/ros_action_property.hpp +@@ -30,7 +30,7 @@ + #define RVIZ_COMMON__PROPERTIES__ROS_ACTION_PROPERTY_HPP_ + + #include +-#include ++#include + #include + + #include +@@ -90,20 +90,20 @@ public: + const QString & default_value = QString(), + const QString & action_type = QString(), + const QString & description = QString(), +- const QRegExp & filter = QRegExp(), ++ const QRegularExpression & filter = QRegularExpression(), + Property * parent = 0, + const char * changed_slot = 0, + QObject * receiver = 0); + + void enableFilter(bool enabled); + +- QRegExp filter() const; ++ QRegularExpression filter() const; + + protected Q_SLOTS: + void fillActionList() override; + + private: +- QRegExp filter_; ++ QRegularExpression filter_; + bool filter_enabled_; + }; + +diff --git a/include/rviz_common/properties/ros_topic_property.hpp b/include/rviz_common/properties/ros_topic_property.hpp +index c55303e6..76c546b9 100644 +--- a/include/rviz_common/properties/ros_topic_property.hpp ++++ b/include/rviz_common/properties/ros_topic_property.hpp +@@ -31,6 +31,9 @@ + + #include + ++#include // NOLINT: cpplint is unable to handle the include order here ++#include // NOLINT: cpplint is unable to handle the include order here ++ + #include "rviz_common/properties/editable_enum_property.hpp" + #include "rviz_common/ros_integration/ros_node_abstraction_iface.hpp" + #include "rviz_common/visibility_control.hpp" +@@ -89,20 +92,20 @@ public: + const QString & default_value = QString(), + const QString & message_type = QString(), + const QString & description = QString(), +- const QRegExp & filter = QRegExp(), ++ const QRegularExpression & filter = QRegularExpression(), + Property * parent = 0, + const char * changed_slot = 0, + QObject * receiver = 0); + + void enableFilter(bool enabled); + +- QRegExp filter() const; ++ QRegularExpression filter() const; + + protected Q_SLOTS: + void fillTopicList() override; + + private: +- QRegExp filter_; ++ QRegularExpression filter_; + bool filter_enabled_; + }; + +diff --git a/rviz_common-extras.cmake b/rviz_common-extras.cmake +index 5a719eda..f3c88a8d 100644 +--- a/rviz_common-extras.cmake ++++ b/rviz_common-extras.cmake +@@ -27,4 +27,5 @@ + + # find package Qt5 because otherwise using the rviz_common::rviz_common + # exported target will complain that the Qt5::Widgets target does not exist +-find_package(Qt5 REQUIRED QUIET COMPONENTS Widgets) ++find_package(QT NAMES Qt6 Qt5 QUIET COMPONENTS Widgets) ++find_package(Qt${QT_VERSION_MAJOR} QUIET COMPONENTS Widgets) +diff --git a/src/rviz_common/add_display_dialog.cpp b/src/rviz_common/add_display_dialog.cpp +index c8908087..423f9f3b 100644 +--- a/src/rviz_common/add_display_dialog.cpp ++++ b/src/rviz_common/add_display_dialog.cpp +@@ -46,6 +46,8 @@ + #include // NOLINT: cpplint is unable to handle the include order here + #include // NOLINT: cpplint is unable to handle the include order here + #include // NOLINT: cpplint is unable to handle the include order here ++#include // NOLINT: cpplint is unable to handle the include order here ++#include // NOLINT: cpplint is unable to handle the include order here + #include // NOLINT: cpplint is unable to handle the include order here + #include // NOLINT: cpplint is unable to handle the include order here + #include // NOLINT: cpplint is unable to handle the include order here +@@ -652,7 +654,7 @@ void TopicDisplayWidget::findPlugins(DisplayFactory * factory) + // For now, we assume that all types supported by plugins have the form + // "/msg/", though in the future zero or more namespaces may be + // permitted. +- QRegExp delim("/"); ++ QRegularExpression delim("/"); + QStringList topic_type_parts = topic_type.split(delim); + if (topic_type_parts.size() == 2) { + topic_type = topic_type_parts.at(0) + "/msg/" + topic_type_parts.at(1); +diff --git a/src/rviz_common/properties/editable_enum_property.cpp b/src/rviz_common/properties/editable_enum_property.cpp +index 85d1589f..ce81a3f2 100644 +--- a/src/rviz_common/properties/editable_enum_property.cpp ++++ b/src/rviz_common/properties/editable_enum_property.cpp +@@ -77,9 +77,17 @@ QWidget * EditableEnumProperty::createEditor(QWidget * parent, const QStyleOptio + EditableComboBox * cb = new EditableComboBox(parent); + cb->addItems(strings_); + cb->setEditText(getValue().toString() ); ++ #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) + QObject::connect( + cb, SIGNAL(currentIndexChanged(const QString&)), this, + SLOT(setString(const QString&))); ++ #else ++ QObject::connect( ++ cb, &QComboBox::currentIndexChanged, this, ++ [this, cb](int index) { ++ this->setString(cb->itemText(index)); ++ }); ++ #endif + + // TODO(unknown): need to better handle string value which is not in list. + return cb; +diff --git a/src/rviz_common/properties/enum_property.cpp b/src/rviz_common/properties/enum_property.cpp +index 0c8dd60a..abc2407f 100644 +--- a/src/rviz_common/properties/enum_property.cpp ++++ b/src/rviz_common/properties/enum_property.cpp +@@ -86,9 +86,17 @@ QWidget * EnumProperty::createEditor(QWidget * parent, const QStyleOptionViewIte + ComboBox * cb = new ComboBox(parent); + cb->addItems(strings_); + cb->setCurrentIndex(strings_.indexOf(getValue().toString() )); ++ #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) + QObject::connect( + cb, SIGNAL(currentIndexChanged(const QString&)), this, + SLOT(setString(const QString&))); ++ #else ++ QObject::connect( ++ cb, &QComboBox::currentIndexChanged, this, ++ [this, cb](int index) { ++ this->setString(cb->itemText(index)); ++ }); ++ #endif + + // TODO(anyone): need to better handle string value which is not in list. + return cb; +diff --git a/src/rviz_common/properties/property_tree_model.cpp b/src/rviz_common/properties/property_tree_model.cpp +index da7b04ff..76172141 100644 +--- a/src/rviz_common/properties/property_tree_model.cpp ++++ b/src/rviz_common/properties/property_tree_model.cpp +@@ -32,6 +32,7 @@ + + #include + ++#include // NOLINT: cpplint is unable to handle the include order here + #include // NOLINT: cpplint is unable to handle the include order here + #include // NOLINT: cpplint is unable to handle the include order here + +diff --git a/src/rviz_common/properties/ros_action_property.cpp b/src/rviz_common/properties/ros_action_property.cpp +index c187eb4b..91f1ec6a 100644 +--- a/src/rviz_common/properties/ros_action_property.cpp ++++ b/src/rviz_common/properties/ros_action_property.cpp +@@ -34,7 +34,7 @@ + + #include // NOLINT: cpplint can't handle Qt imports + #include // NOLINT: cpplint can't handle Qt imports +-#include // NOLINT: cpplint can't handle Qt imports ++#include // NOLINT: cpplint can't handle Qt imports + #include // NOLINT: cpplint can't handle Qt imports + #include // NOLINT: cpplint can't handle Qt imports + +@@ -121,7 +121,7 @@ RosFilteredActionProperty::RosFilteredActionProperty( + const QString & default_value, + const QString & action_type, + const QString & description, +- const QRegExp & filter, ++ const QRegularExpression & filter, + Property * parent, + const char * changed_slot, + QObject * receiver) +@@ -137,7 +137,7 @@ void RosFilteredActionProperty::enableFilter(bool enabled) + fillActionList(); + } + +-QRegExp RosFilteredActionProperty::filter() const ++QRegularExpression RosFilteredActionProperty::filter() const + { + return filter_; + } +diff --git a/src/rviz_common/properties/ros_topic_property.cpp b/src/rviz_common/properties/ros_topic_property.cpp +index 6a1fab39..a3b56cdc 100644 +--- a/src/rviz_common/properties/ros_topic_property.cpp ++++ b/src/rviz_common/properties/ros_topic_property.cpp +@@ -94,7 +94,7 @@ RosFilteredTopicProperty::RosFilteredTopicProperty( + const QString & default_value, + const QString & message_type, + const QString & description, +- const QRegExp & filter, ++ const QRegularExpression & filter, + Property * parent, + const char * changed_slot, + QObject * receiver) +@@ -110,7 +110,7 @@ void RosFilteredTopicProperty::enableFilter(bool enabled) + fillTopicList(); + } + +-QRegExp RosFilteredTopicProperty::filter() const ++QRegularExpression RosFilteredTopicProperty::filter() const + { + return filter_; + } +diff --git a/src/rviz_common/tool_manager.cpp b/src/rviz_common/tool_manager.cpp +index 500b2a3b..6d432c6b 100644 +--- a/src/rviz_common/tool_manager.cpp ++++ b/src/rviz_common/tool_manager.cpp +@@ -35,7 +35,8 @@ + + #include // NOLINT: cpplint is unable to handle the include order here + #include // NOLINT: cpplint is unable to handle the include order here +-#include // NOLINT: cpplint is unable to handle the include order here ++#include // NOLINT: cpplint is unable to handle the include order here ++#include // NOLINT: cpplint is unable to handle the include order here + + #include "rviz_common/logging.hpp" + +@@ -52,7 +53,7 @@ using rviz_common::properties::PropertyTreeModel; + + QString addSpaceToCamelCase(QString input) + { +- QRegExp re = QRegExp("([A-Z])([a-z]*)"); ++ QRegularExpression re = QRegularExpression("([A-Z])([a-z]*)"); + input.replace(re, " \\1\\2"); + return input.trimmed(); + } +diff --git a/src/rviz_common/visualization_frame.cpp b/src/rviz_common/visualization_frame.cpp +index a4eae85e..07c09363 100644 +--- a/src/rviz_common/visualization_frame.cpp ++++ b/src/rviz_common/visualization_frame.cpp +@@ -41,6 +41,7 @@ + #include + #include + ++#include // NOLINT cpplint cannot handle include order here + #include // NOLINT cpplint cannot handle include order here + #include // NOLINT cpplint cannot handle include order here + #include // NOLINT cpplint cannot handle include order here +@@ -274,7 +275,7 @@ void VisualizationFrame::initialize( + QWidget * central_widget = new QWidget(this); + QHBoxLayout * central_layout = new QHBoxLayout; + central_layout->setSpacing(0); +- central_layout->setMargin(0); ++ central_layout->setContentsMargins(0, 0, 0, 0); + + render_panel_ = new RenderPanel(central_widget); + diff --git a/distros/humble/patch/ros2-rviz-default-plugins.patch b/distros/humble/patch/ros2-rviz-default-plugins.patch index c77e434ac..ef6e04d09 100644 --- a/distros/humble/patch/ros2-rviz-default-plugins.patch +++ b/distros/humble/patch/ros2-rviz-default-plugins.patch @@ -1,8 +1,33 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 96b399a4..7e5d3a27 100644 +index eb50f9d0..e48f5a09 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -225,12 +225,12 @@ add_library(rviz_default_plugins SHARED +@@ -56,7 +56,14 @@ find_package(rviz_common REQUIRED) + find_package(rviz_rendering REQUIRED) + find_package(rviz_ogre_vendor REQUIRED) + +-find_package(Qt5 REQUIRED COMPONENTS Widgets Test) ++find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Test Widgets) ++find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Test Widgets) ++if(${QT_VERSION} VERSION_LESS 5.15.0) ++ function(qt_wrap_cpp out) ++ qt5_wrap_cpp(_sources ${ARGN}) ++ set("${out}" ${_sources} PARENT_SCOPE) ++ endfunction() ++endif() + + find_package(geometry_msgs REQUIRED) + +@@ -132,7 +139,7 @@ set(rviz_default_plugins_headers_to_moc + ) + + foreach(header "${rviz_default_plugins_headers_to_moc}") +- qt5_wrap_cpp(rviz_default_plugins_moc_files "${header}") ++ qt_wrap_cpp(rviz_default_plugins_moc_files "${header}") + endforeach() + + set(rviz_default_plugins_source_files +@@ -236,12 +243,12 @@ add_library(rviz_default_plugins SHARED target_include_directories(rviz_default_plugins PUBLIC $ $ @@ -12,7 +37,72 @@ index 96b399a4..7e5d3a27 100644 target_link_libraries(rviz_default_plugins PUBLIC rviz_ogre_vendor::OgreMain rviz_ogre_vendor::OgreOverlay -+ Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets ) target_link_libraries(rviz_default_plugins PRIVATE +@@ -334,7 +341,7 @@ if(BUILD_TESTING) + + set(TEST_INCLUDE_DIRS + ${OGRE_INCLUDE_DIRS} +- ${Qt5Widgets_INCLUDE_DIRS} ++ ${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS} + ) + ament_include_directories_order(TEST_INCLUDE_DIRS ${TEST_INCLUDE_DIRS}) + +@@ -364,7 +371,7 @@ if(BUILD_TESTING) + set(TEST_LINK_LIBRARIES + display_test_fixture + rviz_default_plugins +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + ) + + # This code is used by many tests, so compile it just once +diff --git a/rviz_default_plugins-extras.cmake b/rviz_default_plugins-extras.cmake +index c3c89008..a24df762 100644 +--- a/rviz_default_plugins-extras.cmake ++++ b/rviz_default_plugins-extras.cmake +@@ -27,4 +27,5 @@ + + # find package Qt5 because otherwise using the rviz_default_plugins::rviz_default_plugins + # exported target will complain that the Qt5::Widgets target does not exist +-find_package(Qt5 REQUIRED QUIET COMPONENTS Widgets) ++find_package(QT NAMES Qt6 Qt5 QUIET COMPONENTS Widgets) ++find_package(Qt${QT_VERSION_MAJOR} QUIET COMPONENTS Widgets) +diff --git a/src/rviz_default_plugins/displays/depth_cloud/depth_cloud_display.cpp b/src/rviz_default_plugins/displays/depth_cloud/depth_cloud_display.cpp +index 1b09e0b9..e477db52 100644 +--- a/src/rviz_default_plugins/displays/depth_cloud/depth_cloud_display.cpp ++++ b/src/rviz_default_plugins/displays/depth_cloud/depth_cloud_display.cpp +@@ -33,7 +33,8 @@ + #include + #include + +-#include ++#include ++#include + + #include + #include +@@ -81,8 +82,8 @@ DepthCloudDisplay::DepthCloudDisplay() + { + ml_depth_data_ = std::make_unique(); + // Depth map properties +- QRegExp depth_filter("depth"); +- depth_filter.setCaseSensitivity(Qt::CaseInsensitive); ++ QRegularExpression depth_filter("depth"); ++ depth_filter.setPatternOptions(QRegularExpression::CaseInsensitiveOption); + + reliability_policy_property_ = new rviz_common::properties::EditableEnumProperty( + "Reliability Policy", +@@ -123,8 +124,8 @@ DepthCloudDisplay::DepthCloudDisplay() + depth_transport_property_->setStdString("raw"); + + // color image properties +- QRegExp color_filter("color|rgb|bgr|gray|mono"); +- color_filter.setCaseSensitivity(Qt::CaseInsensitive); ++ QRegularExpression color_filter("color|rgb|bgr|gray|mono"); ++ color_filter.setPatternOptions(QRegularExpression::CaseInsensitiveOption); + + color_topic_property_ = new rviz_common::properties::RosFilteredTopicProperty( + "Color Image Topic", "", diff --git a/distros/humble/patch/ros2-rviz-imu-plugin.patch b/distros/humble/patch/ros2-rviz-imu-plugin.patch new file mode 100644 index 000000000..b08adb15d --- /dev/null +++ b/distros/humble/patch/ros2-rviz-imu-plugin.patch @@ -0,0 +1,45 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 993a835..3ca9997 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,7 +12,7 @@ endif() + + find_package(ament_cmake REQUIRED COMPONENTS rviz) + find_package(message_filters REQUIRED) +-find_package(Qt5 REQUIRED COMPONENTS Widgets Test) ++find_package(Qt6 REQUIRED COMPONENTS Widgets Test) + find_package(rviz_common REQUIRED) + find_package(rviz_ogre_vendor REQUIRED) + find_package(rviz_rendering REQUIRED) +@@ -34,7 +34,7 @@ include_directories(include) + + set(dependencies + message_filters +- Qt5 ++ Qt6 + rviz_common + rviz_ogre_vendor + rviz_rendering +@@ -59,11 +59,11 @@ add_library(${PROJECT_NAME} SHARED ${SRC_FILES}) + + ## Link the library with whatever Qt libraries have been defined by + ## the ``find_package(Qt4 ...)`` line above, or by the +-## ``set(QT_LIBRARIES Qt5::Widgets)``, and with whatever libraries ++## ``set(QT_LIBRARIES Qt6::Widgets)``, and with whatever libraries + ## catkin has included. + ament_target_dependencies(${PROJECT_NAME} PUBLIC ${dependencies}) + +-target_link_libraries(${PROJECT_NAME} PUBLIC rviz_ogre_vendor::OgreMain rviz_ogre_vendor::OgreOverlay Qt5::Widgets) ++target_link_libraries(${PROJECT_NAME} PUBLIC rviz_ogre_vendor::OgreMain rviz_ogre_vendor::OgreOverlay Qt6::Widgets) + + # prevent pluginlib from using boost + target_compile_definitions(${PROJECT_NAME} PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS") +@@ -74,7 +74,7 @@ pluginlib_export_plugin_description_file(rviz_common plugin_description.xml) + ament_export_include_directories(include) + ament_export_libraries(${PROJECT_NAME}) + ament_export_dependencies( +- Qt5 ++ Qt6 + rviz_common + sensor_msgs + tf2 diff --git a/distros/humble/patch/ros2-rviz-rendering-tests.patch b/distros/humble/patch/ros2-rviz-rendering-tests.patch new file mode 100644 index 000000000..f5ea62fa6 --- /dev/null +++ b/distros/humble/patch/ros2-rviz-rendering-tests.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7aa5a621..f0e36761 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -31,7 +31,14 @@ find_package(ament_cmake REQUIRED) + if(BUILD_TESTING) + # do find_package(rviz_ogre_vendor) first to make sure the custom OGRE is found + find_package(rviz_ogre_vendor REQUIRED) +- find_package(Qt5 REQUIRED COMPONENTS Widgets) ++ find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets) ++ find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets) ++ if(${QT_VERSION} VERSION_LESS 5.15.0) ++ function(qt_wrap_cpp out) ++ qt5_wrap_cpp(_sources ${ARGN}) ++ set("${out}" ${_sources} PARENT_SCOPE) ++ endfunction() ++ endif() + find_package(rviz_rendering REQUIRED) + find_package(resource_retriever REQUIRED) + diff --git a/distros/humble/patch/ros2-rviz-rendering.osx.patch b/distros/humble/patch/ros2-rviz-rendering.osx.patch new file mode 100644 index 000000000..72ea2a749 --- /dev/null +++ b/distros/humble/patch/ros2-rviz-rendering.osx.patch @@ -0,0 +1,46 @@ +diff --git a/src/rviz_rendering/ogre_render_window_impl.cpp b/src/rviz_rendering/ogre_render_window_impl.cpp +index 27ff2ce..38ade73 100644 +--- a/src/rviz_rendering/ogre_render_window_impl.cpp ++++ b/src/rviz_rendering/ogre_render_window_impl.cpp +@@ -243,12 +243,21 @@ RenderWindowImpl::resize(size_t width, size_t height) + return; + } + if (ogre_render_window_) { +- this->setCameraAspectRatio(); +- ogre_render_window_->resize( +- static_cast(width), // NOLINT +- static_cast(height) // NOLINT +- ); +- ogre_render_window_->windowMovedOrResized(); ++ // Skip the costly Ogre resize / windowMovedOrResized when the size has ++ // not actually changed. On macOS Sonoma+, windowMovedOrResized triggers ++ // [NSOpenGLContext update] -> CGLSetVirtualScreen, which is hundreds of ++ // ms per call under the OpenGL-on-Metal compatibility path; each call ++ // also re-fires an expose event, so calling it on every expose creates ++ // a positive-feedback loop that makes the splash screen never progress. ++ const auto w = static_cast(width); ++ const auto h = static_cast(height); ++ if (w != last_resize_width_ || h != last_resize_height_) { ++ last_resize_width_ = w; ++ last_resize_height_ = h; ++ this->setCameraAspectRatio(); ++ ogre_render_window_->resize(w, h); ++ ogre_render_window_->windowMovedOrResized(); ++ } + } + this->renderLater(); + } +diff --git a/src/rviz_rendering/ogre_render_window_impl.hpp b/src/rviz_rendering/ogre_render_window_impl.hpp +index 7bd7b22..8391498 100644 +--- a/src/rviz_rendering/ogre_render_window_impl.hpp ++++ b/src/rviz_rendering/ogre_render_window_impl.hpp +@@ -150,6 +150,9 @@ protected: + + bool animating_; + ++ unsigned int last_resize_width_{0}; ++ unsigned int last_resize_height_{0}; ++ + Ogre::Viewport * ogre_viewport_; + + // std::function pre_render_callback_; ///< Functor which is called before each render diff --git a/distros/humble/patch/ros2-rviz-rendering.patch b/distros/humble/patch/ros2-rviz-rendering.patch index 15c76e9c4..900848e8d 100644 --- a/distros/humble/patch/ros2-rviz-rendering.patch +++ b/distros/humble/patch/ros2-rviz-rendering.patch @@ -1,8 +1,71 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index b74b6dd..62db05f 100644 +index d7f3be70..85d6e1c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -117,6 +117,7 @@ target_include_directories(rviz_rendering +@@ -32,7 +32,14 @@ find_package(ament_cmake REQUIRED) + find_package(rviz_ogre_vendor REQUIRED) + find_package(rviz_assimp_vendor REQUIRED) + +-find_package(Qt5 REQUIRED COMPONENTS Widgets) ++find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets) ++find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets) ++if(${QT_VERSION} VERSION_LESS 5.15.0) ++ function(qt_wrap_cpp out) ++ qt5_wrap_cpp(_sources ${ARGN}) ++ set("${out}" ${_sources} PARENT_SCOPE) ++ endfunction() ++endif() + + find_package(ament_index_cpp REQUIRED) + find_package(eigen3_cmake_module REQUIRED) +@@ -40,29 +47,29 @@ find_package(Eigen3 REQUIRED) + find_package(resource_retriever REQUIRED) + + # TODO(wjwwood): this block is to setup the windeployqt tool, could be removed later. +-if(Qt5_FOUND AND WIN32 AND TARGET Qt5::qmake AND NOT TARGET Qt5::windeployqt) +- get_target_property(_qt5_qmake_location Qt5::qmake IMPORTED_LOCATION) ++if(Qt${QT_VERSION_MAJOR}_FOUND AND WIN32 AND TARGET Qt${QT_VERSION_MAJOR}::qmake AND NOT TARGET Qt${QT_VERSION_MAJOR}::windeployqt) ++ get_target_property(_qt_qmake_location Qt${QT_VERSION_MAJOR}::qmake IMPORTED_LOCATION) + + execute_process( +- COMMAND "${_qt5_qmake_location}" -query QT_INSTALL_PREFIX ++ COMMAND "${_qt_qmake_location}" -query Qt${QT_VERSION_MAJOR}_INSTALL_PREFIX + RESULT_VARIABLE return_code +- OUTPUT_VARIABLE qt5_install_prefix ++ OUTPUT_VARIABLE qt_install_prefix + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + +- set(imported_location "${qt5_install_prefix}/bin/windeployqt.exe") ++ set(imported_location "${qt_install_prefix}/bin/windeployqt.exe") + + if(EXISTS ${imported_location}) +- add_executable(Qt5::windeployqt IMPORTED) ++ add_executable(Qt${QT_VERSION_MAJOR}::windeployqt IMPORTED) + +- set_target_properties(Qt5::windeployqt PROPERTIES ++ set_target_properties(Qt${QT_VERSION_MAJOR}::windeployqt PROPERTIES + IMPORTED_LOCATION ${imported_location} + ) + endif() + endif() + + # These need to be added in the add_library() call +-qt5_wrap_cpp(rviz_rendering_moc_files include/rviz_rendering/render_window.hpp) ++qt_wrap_cpp(rviz_rendering_moc_files include/rviz_rendering/render_window.hpp) + + add_library(rviz_rendering SHARED + ${rviz_rendering_moc_files} +@@ -101,7 +108,7 @@ target_link_libraries(rviz_rendering + PUBLIC + rviz_ogre_vendor::OgreMain + rviz_ogre_vendor::OgreOverlay +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + ament_index_cpp::ament_index_cpp + resource_retriever::resource_retriever + ) +@@ -118,6 +125,7 @@ target_include_directories(rviz_rendering $ ${Eigen3_INCLUDE_DIRS} ) @@ -10,3 +73,104 @@ index b74b6dd..62db05f 100644 # Causes the visibility macros to use dllexport rather than dllimport, # which is appropriate when building the dll but not consuming it. target_compile_definitions(rviz_rendering PRIVATE "RVIZ_RENDERING_BUILDING_LIBRARY") +@@ -194,7 +202,7 @@ if(BUILD_TESTING) + rviz_ogre_vendor::OgreMain + rviz_rendering + rviz_rendering_test_utils +- Qt5::Widgets # explicitly do this for include directories (not necessary for external use) ++ Qt${QT_VERSION_MAJOR}::Widgets # explicitly do this for include directories (not necessary for external use) + ) + endif() + +@@ -206,7 +214,7 @@ if(BUILD_TESTING) + rviz_ogre_vendor::OgreMain + rviz_rendering + rviz_rendering_test_utils +- Qt5::Widgets # explicitly do this for include directories (not necessary for external use) ++ Qt${QT_VERSION_MAJOR}::Widgets # explicitly do this for include directories (not necessary for external use) + ) + endif() + +@@ -218,7 +226,7 @@ if(BUILD_TESTING) + rviz_ogre_vendor::OgreMain + rviz_rendering + rviz_rendering_test_utils +- Qt5::Widgets # explicitly do this for include directories (not necessary for external use) ++ Qt${QT_VERSION_MAJOR}::Widgets # explicitly do this for include directories (not necessary for external use) + ) + endif() + +@@ -230,7 +238,7 @@ if(BUILD_TESTING) + rviz_ogre_vendor::OgreMain + rviz_rendering + rviz_rendering_test_utils +- Qt5::Widgets # explicitly do this for include directories (not necessary for external use) ++ Qt${QT_VERSION_MAJOR}::Widgets # explicitly do this for include directories (not necessary for external use) + ) + endif() + +@@ -242,7 +250,7 @@ if(BUILD_TESTING) + rviz_ogre_vendor::OgreMain + rviz_rendering + rviz_rendering_test_utils +- Qt5::Widgets # explicitly do this for include directories (not necessary for external use) ++ Qt${QT_VERSION_MAJOR}::Widgets # explicitly do this for include directories (not necessary for external use) + ) + endif() + +@@ -254,7 +262,7 @@ if(BUILD_TESTING) + rviz_ogre_vendor::OgreMain + rviz_rendering + rviz_rendering_test_utils +- Qt5::Widgets # explicitly do this for include directories (not necessary for external use) ++ Qt${QT_VERSION_MAJOR}::Widgets # explicitly do this for include directories (not necessary for external use) + ) + endif() + +@@ -267,7 +275,7 @@ if(BUILD_TESTING) + rviz_ogre_vendor::OgreOverlay + rviz_rendering + rviz_rendering_test_utils +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + ) + endif() + +@@ -279,7 +287,7 @@ if(BUILD_TESTING) + rviz_ogre_vendor::OgreMain + rviz_rendering + rviz_rendering_test_utils +- Qt5::Widgets # explicitly do this for include directories (not necessary for external use) ++ Qt${QT_VERSION_MAJOR}::Widgets # explicitly do this for include directories (not necessary for external use) + ) + endif() + +@@ -291,7 +299,7 @@ if(BUILD_TESTING) + rviz_ogre_vendor::OgreMain + rviz_rendering + rviz_rendering_test_utils +- Qt5::Widgets # explicitly do this for include directories (not necessary for external use) ++ Qt${QT_VERSION_MAJOR}::Widgets # explicitly do this for include directories (not necessary for external use) + ) + endif() + +@@ -303,7 +311,7 @@ if(BUILD_TESTING) + rviz_ogre_vendor::OgreMain + rviz_rendering + rviz_rendering_test_utils +- Qt5::Widgets # explicitly do this for include directories (not necessary for external use) ++ Qt${QT_VERSION_MAJOR}::Widgets # explicitly do this for include directories (not necessary for external use) + ) + endif() + endif() +diff --git a/rviz_rendering-extras.cmake b/rviz_rendering-extras.cmake +index 93684581..05e19f9a 100644 +--- a/rviz_rendering-extras.cmake ++++ b/rviz_rendering-extras.cmake +@@ -27,4 +27,5 @@ + + # find package Qt5 because otherwise using the rviz_rendering::rviz_rendering + # exported target will complain that the Qt5::Widgets target does not exist +-find_package(Qt5 REQUIRED QUIET COMPONENTS Widgets) ++find_package(QT NAMES Qt6 Qt5 QUIET COMPONENTS Widgets) ++find_package(Qt${QT_VERSION_MAJOR} QUIET COMPONENTS Widgets) diff --git a/distros/humble/patch/ros2-rviz-satellite.patch b/distros/humble/patch/ros2-rviz-satellite.patch new file mode 100644 index 000000000..60d53f9bd --- /dev/null +++ b/distros/humble/patch/ros2-rviz-satellite.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c6743c7..1f21bf0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -18,7 +18,7 @@ find_package(tf2_ros REQUIRED) + find_package(pluginlib REQUIRED) + find_package(angles REQUIRED) + +-find_package(Qt5 COMPONENTS Network REQUIRED) ++find_package(Qt6 COMPONENTS Network REQUIRED) + + add_library(${PROJECT_NAME} SHARED + src/aerialmap_display.cpp +@@ -34,7 +34,7 @@ target_compile_options( + "-DRVIZ_SATELLITE_VERSION=\"${rviz_satellite_VERSION}\"") + + target_include_directories(${PROJECT_NAME} PRIVATE src) +-target_link_libraries(${PROJECT_NAME} Qt5::Network) ++target_link_libraries(${PROJECT_NAME} Qt6::Network) + + # prevent pluginlib from using boost + target_compile_definitions(${PROJECT_NAME} PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS") diff --git a/distros/humble/patch/ros2-rviz-visual-testing-framework.patch b/distros/humble/patch/ros2-rviz-visual-testing-framework.patch new file mode 100644 index 000000000..1ed4ee2bb --- /dev/null +++ b/distros/humble/patch/ros2-rviz-visual-testing-framework.patch @@ -0,0 +1,47 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 51f8e4c1..9f4decfa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -30,7 +30,8 @@ find_package(rviz_common REQUIRED) + + find_package(rviz_ogre_vendor REQUIRED) + +-find_package(Qt5 REQUIRED COMPONENTS Widgets Test) ++find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Test Widgets) ++find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Test Widgets) + + find_package(ament_cmake_gtest REQUIRED) + ament_find_gtest() +@@ -61,17 +62,17 @@ set(visual_test_framework_source_files + + set(visual_tests_target_libaries + rviz_common::rviz_common +- Qt5::Widgets +- Qt5::Test) ++ Qt${QT_VERSION_MAJOR}::Widgets ++ Qt${QT_VERSION_MAJOR}::Test) + + # TODO(wjwwood): this block is to setup the windeployqt tool, could be removed later. +-if(Qt5_FOUND AND WIN32 AND TARGET Qt5::qmake AND NOT TARGET Qt5::windeployqt) +- get_target_property(_qt5_qmake_location Qt5::qmake IMPORTED_LOCATION) ++if(Qt${QT_VERSION_MAJOR}_FOUND AND WIN32 AND TARGET Qt${QT_VERSION_MAJOR}::qmake AND NOT TARGET Qt${QT_VERSION_MAJOR}::windeployqt) ++ get_target_property(_qt_qmake_location Qt${QT_VERSION_MAJOR}::qmake IMPORTED_LOCATION) + + execute_process( +- COMMAND "${_qt5_qmake_location}" -query QT_INSTALL_PREFIX ++ COMMAND "${_qt_qmake_location}" -query QT${QT_VERSION_MAJOR}_INSTALL_PREFIX + RESULT_VARIABLE return_code +- OUTPUT_VARIABLE qt5_install_prefix ++ OUTPUT_VARIABLE qt_install_prefix + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + endif() +@@ -88,7 +89,7 @@ target_link_libraries(rviz_visual_testing_framework + ${visual_tests_target_libaries}) + + # export information to downstream packages +-ament_export_dependencies(Qt5) ++ament_export_dependencies(Qt${QT_VERSION_MAJOR}) + ament_export_dependencies(rviz_common) + + # Export old-style CMake variables diff --git a/distros/humble/patch/ros2-rviz-visual-tools.patch b/distros/humble/patch/ros2-rviz-visual-tools.patch new file mode 100644 index 000000000..8abf82ea8 --- /dev/null +++ b/distros/humble/patch/ros2-rviz-visual-tools.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index de15d1b..fe4fc55 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -44,7 +44,8 @@ find_package(rviz_default_plugins REQUIRED) + # land until that patch release; 15.1.13 and earlier are still Qt5). + # Gate on rviz's version rather than Qt6 availability -- Ubuntu 24.04 ships both + # Qt5 and Qt6, and linking a Qt6 build against a Qt5 rviz is an ABI mismatch. +-if(rviz_common_VERSION VERSION_GREATER_EQUAL 15.1.14) ++# RoboStack: rviz_common built with Qt 6 (its extras import Qt6::Widgets) ++if(rviz_common_VERSION VERSION_GREATER_EQUAL 15.1.14 OR TARGET Qt6::Widgets) + find_package(Qt6 REQUIRED COMPONENTS Widgets) + set(QT_VERSION_MAJOR 6) + # Hint for transitive deps that use find_package(QT NAMES Qt6 Qt5 ...) which diff --git a/distros/humble/patch/ros2-rviz2.patch b/distros/humble/patch/ros2-rviz2.patch index 45ffce642..7479a7aa7 100644 --- a/distros/humble/patch/ros2-rviz2.patch +++ b/distros/humble/patch/ros2-rviz2.patch @@ -1,102 +1,64 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 37118e6b..14571801 100644 +index 37118e6b..81566302 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -19,26 +19,26 @@ find_package(rviz_ogre_vendor REQUIRED) +@@ -17,24 +17,25 @@ find_package(rviz_common REQUIRED) - find_package(Qt5 REQUIRED COMPONENTS Widgets) + find_package(rviz_ogre_vendor REQUIRED) + +-find_package(Qt5 REQUIRED COMPONENTS Widgets) ++find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets) ++find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets) # TODO(wjwwood): this block is to setup the windeployqt tool, could be removed later. -if(Qt5_FOUND AND WIN32 AND TARGET Qt5::qmake AND NOT TARGET Qt5::windeployqt) - get_target_property(_qt5_qmake_location Qt5::qmake IMPORTED_LOCATION) -+# if(Qt5_FOUND AND WIN32 AND TARGET Qt5::qmake AND NOT TARGET Qt5::windeployqt) -+# get_target_property(_qt5_qmake_location Qt5::qmake IMPORTED_LOCATION) ++if(Qt${QT_VERSION_MAJOR}_FOUND AND WIN32 AND TARGET Qt${QT_VERSION_MAJOR}::qmake AND NOT TARGET Qt${QT_VERSION_MAJOR}::windeployqt) ++ get_target_property(_qt_qmake_location Qt${QT_VERSION_MAJOR}::qmake IMPORTED_LOCATION) -- execute_process( + execute_process( - COMMAND "${_qt5_qmake_location}" -query QT_INSTALL_PREFIX -- RESULT_VARIABLE return_code ++ COMMAND "${_qt_qmake_location}" -query QT${QT_VERSION_MAJOR}_INSTALL_PREFIX + RESULT_VARIABLE return_code - OUTPUT_VARIABLE qt5_install_prefix -- OUTPUT_STRIP_TRAILING_WHITESPACE -- ) -+# execute_process( -+# COMMAND "${_qt5_qmake_location}" -query QT_INSTALL_PREFIX -+# RESULT_VARIABLE return_code -+# OUTPUT_VARIABLE qt5_install_prefix -+# OUTPUT_STRIP_TRAILING_WHITESPACE -+# ) ++ OUTPUT_VARIABLE qt_install_prefix + OUTPUT_STRIP_TRAILING_WHITESPACE + ) - set(imported_location "${qt5_install_prefix}/bin/windeployqt.exe") -+# set(imported_location "${qt5_install_prefix}/bin/windeployqt.exe") ++ set(imported_location "${qt_install_prefix}/bin/windeployqt.exe") -- if(EXISTS ${imported_location}) + if(EXISTS ${imported_location}) - add_executable(Qt5::windeployqt IMPORTED) -+# if(EXISTS ${imported_location}) -+# add_executable(Qt5::windeployqt IMPORTED) ++ add_executable(Qt${QT_VERSION_MAJOR}::windeployqt IMPORTED) - set_target_properties(Qt5::windeployqt PROPERTIES -- IMPORTED_LOCATION ${imported_location} -- ) -- endif() --endif() -+# set_target_properties(Qt5::windeployqt PROPERTIES -+# IMPORTED_LOCATION ${imported_location} -+# ) -+# endif() -+# endif() ++ set_target_properties(Qt${QT_VERSION_MAJOR}::windeployqt PROPERTIES + IMPORTED_LOCATION ${imported_location} + ) + endif() +@@ -47,21 +48,21 @@ target_link_libraries(${PROJECT_NAME} + rviz_common::rviz_common + rviz_ogre_vendor::OgreMain + rviz_ogre_vendor::OgreOverlay +- Qt5::Widgets ++ Qt${QT_VERSION_MAJOR}::Widgets + ) - add_executable(${PROJECT_NAME} - src/main.cpp -@@ -54,30 +54,30 @@ target_link_libraries(${PROJECT_NAME} + # TODO(wjwwood): find a way to make this optional or to run without "deploying" the # necessary dlls and stuff to the bin folder. # see: # https://stackoverflow.com/questions/41193584/deploy-all-qt-dependencies-when-building#41199492 -if(TARGET Qt5::windeployqt) -- # execute windeployqt in a tmp directory after build -- add_custom_command(TARGET ${PROJECT_NAME} -- POST_BUILD -- COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/windeployqt" ++if(TARGET Qt${QT_VERSION_MAJOR}::windeployqt) + # execute windeployqt in a tmp directory after build + add_custom_command(TARGET ${PROJECT_NAME} + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/windeployqt" - COMMAND set PATH=%PATH%$${qt5_install_prefix}/bin -- COMMAND ++ COMMAND set PATH=%PATH%$${qt_install_prefix}/bin + COMMAND - Qt5::windeployqt -- --dir "${CMAKE_CURRENT_BINARY_DIR}/windeployqt" -- "$/$" -- ) -- -- # copy deployment directory during installation -- install( -- DIRECTORY -- "${CMAKE_CURRENT_BINARY_DIR}/windeployqt/" -- DESTINATION bin -- ) -- install( -- DIRECTORY -- "${CMAKE_CURRENT_BINARY_DIR}/windeployqt/" -- DESTINATION lib/${PROJECT_NAME} -- ) --endif() -+# if(TARGET Qt5::windeployqt) -+# # execute windeployqt in a tmp directory after build -+# add_custom_command(TARGET ${PROJECT_NAME} -+# POST_BUILD -+# COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/windeployqt" -+# COMMAND set PATH=%PATH%$${qt5_install_prefix}/bin -+# COMMAND -+# Qt5::windeployqt -+# --dir "${CMAKE_CURRENT_BINARY_DIR}/windeployqt" -+# "$/$" -+# ) -+ -+# # copy deployment directory during installation -+# install( -+# DIRECTORY -+# "${CMAKE_CURRENT_BINARY_DIR}/windeployqt/" -+# DESTINATION bin -+# ) -+# install( -+# DIRECTORY -+# "${CMAKE_CURRENT_BINARY_DIR}/windeployqt/" -+# DESTINATION lib/${PROJECT_NAME} -+# ) -+# endif() - - install(TARGETS ${PROJECT_NAME} DESTINATION bin) - install(TARGETS ${PROJECT_NAME} DESTINATION lib/${PROJECT_NAME}) ++ Qt${QT_VERSION_MAJOR}::windeployqt + --dir "${CMAKE_CURRENT_BINARY_DIR}/windeployqt" + "$/$" + ) diff --git a/distros/humble/patch/ros2-slam-toolbox.patch b/distros/humble/patch/ros2-slam-toolbox.patch index 6f3930b14..77fd84eca 100644 --- a/distros/humble/patch/ros2-slam-toolbox.patch +++ b/distros/humble/patch/ros2-slam-toolbox.patch @@ -10,9 +10,27 @@ index 053c4e7..369f9fa 100644 /usr/include/suitesparse /usr/include diff --git a/CMakeLists.txt b/CMakeLists.txt -index b0e2bbe..68178a2 100644 +index b0e2bbe..6a04448 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt +@@ -30,7 +30,7 @@ find_package(rviz_default_plugins REQUIRED) + find_package(rviz_ogre_vendor REQUIRED) + find_package(rviz_rendering REQUIRED) + find_package(interactive_markers REQUIRED) +-find_package(Qt5 REQUIRED COMPONENTS Core Gui Widgets Test Concurrent) ++find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets Test Concurrent) + find_package(rclcpp_components REQUIRED) + + #karto_sdk lib +@@ -58,7 +58,7 @@ set(dependencies + rviz_ogre_vendor + rviz_rendering + interactive_markers +- Qt5 ++ Qt6 + rclcpp_components + ) + @@ -83,7 +83,10 @@ find_package(Ceres REQUIRED COMPONENTS SuiteSparse) set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -25,6 +43,24 @@ index b0e2bbe..68178a2 100644 include_directories(include lib/karto_sdk/include ${EIGEN3_INCLUDE_DIRS} +@@ -110,7 +113,7 @@ rosidl_generate_interfaces(${PROJECT_NAME} + ) + + #### rviz Plugin +-qt5_wrap_cpp(MOC_FILES rviz_plugin/slam_toolbox_rviz_plugin.hpp) ++qt6_wrap_cpp(MOC_FILES rviz_plugin/slam_toolbox_rviz_plugin.hpp) + add_library(SlamToolboxPlugin SHARED + rviz_plugin/slam_toolbox_rviz_plugin.cpp + ${MOC_FILES}) +@@ -118,7 +121,7 @@ ament_target_dependencies(SlamToolboxPlugin + ${dependencies} + ) + target_include_directories(SlamToolboxPlugin PUBLIC +- ${Qt5Widgets_INCLUDE_DIRS} ++ ${Qt6Widgets_INCLUDE_DIRS} + ${OGRE_INCLUDE_DIRS} + ) + target_link_libraries(SlamToolboxPlugin ${QT_LIBRARIES} rviz_common::rviz_common) diff --git a/lib/karto_sdk/CMakeLists.txt b/lib/karto_sdk/CMakeLists.txt index cd07927..2e3ec90 100644 --- a/lib/karto_sdk/CMakeLists.txt @@ -113,7 +149,7 @@ index 42c2fad..470ca4c 100644 const T * theta_radians, const T * delta_theta_radians, T * theta_radians_plus_delta) const { -@@ -47,8 +48,17 @@ public: +@@ -47,9 +48,18 @@ public: return true; } @@ -133,3 +169,4 @@ index 42c2fad..470ca4c 100644 + return new ceres::AutoDiffManifold; } }; + diff --git a/distros/humble/patch/ros2-vision-msgs-rviz-plugins.patch b/distros/humble/patch/ros2-vision-msgs-rviz-plugins.patch index 507ae4223..38f218dfc 100644 --- a/distros/humble/patch/ros2-vision-msgs-rviz-plugins.patch +++ b/distros/humble/patch/ros2-vision-msgs-rviz-plugins.patch @@ -1,8 +1,26 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index d199135..feab5ac 100644 +index d199135..1efb991 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -68,7 +68,6 @@ add_library(${PROJECT_NAME} SHARED +@@ -16,7 +16,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + endif() + + # find dependencies +-find_package(Qt5 REQUIRED COMPONENTS Widgets Core) ++find_package(Qt6 REQUIRED COMPONENTS Widgets Core) + find_package(yaml_cpp_vendor REQUIRED) + + find_package(ament_cmake REQUIRED) +@@ -46,7 +46,7 @@ set(vision_msgs_rviz_plugins_headers_to_moc + ) + + foreach(header "${vision_msgs_rviz_plugins_headers_to_moc}") +- qt5_wrap_cpp(vision_msgs_rviz_plugins_moc_files "${header}") ++ qt6_wrap_cpp(vision_msgs_rviz_plugins_moc_files "${header}") + endforeach() + + +@@ -68,13 +68,15 @@ add_library(${PROJECT_NAME} SHARED target_include_directories(${PROJECT_NAME} PUBLIC $ $ @@ -10,13 +28,12 @@ index d199135..feab5ac 100644 ) target_link_libraries(${PROJECT_NAME} PUBLIC -@@ -75,6 +75,9 @@ target_link_libraries(${PROJECT_NAME} PUBLIC rviz_ogre_vendor::OgreMain rviz_ogre_vendor::OgreOverlay rviz_common::rviz_common + rviz_default_plugins::rviz_default_plugins -+ Qt5::Core -+ Qt5::Widgets ++ Qt6::Core ++ Qt6::Widgets ) diff --git a/distros/humble/pkg_additional_info.yaml b/distros/humble/pkg_additional_info.yaml index a9f633ba7..862e23d33 100644 --- a/distros/humble/pkg_additional_info.yaml +++ b/distros/humble/pkg_additional_info.yaml @@ -122,9 +122,35 @@ urdfdom_headers: # Remove build_number fields below on new full rebuild zenoh_cpp_vendor: additional_cmake_args: "-DAMENT_VENDOR_POLICY=NEVER_VENDOR_IGNORE_SATISFIED_CHECK -DUSE_SYSTEM_ZENOH=ON" +as2_rviz_plugins: # rviz on Qt 6 + build_number: 26 cartographer_ros: additional_cmake_args: "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON" build_number: 26 # offline_node.cpp out of the shared library (duplicate gflags abort) +grid_map_rviz_plugin: # rviz on Qt 6 + build_number: 26 +moveit_ros_visualization: # rviz on Qt 6 + build_number: 26 +moveit_setup_app_plugins: # rviz on Qt 6 + build_number: 26 +moveit_setup_assistant: # rviz on Qt 6 + build_number: 26 +moveit_setup_controllers: # rviz on Qt 6 + build_number: 26 +moveit_setup_core_plugins: # rviz on Qt 6 + build_number: 26 +moveit_setup_framework: # rviz on Qt 6 + build_number: 26 +moveit_setup_srdf_plugins: # rviz on Qt 6 + build_number: 26 +mrpt_gui: # Qt rosdep keys on Qt 6 (MRPT's optional Qt 5 support off, as in lyrical) + build_number: 26 +nav2_rviz_plugins: # rviz on Qt 6 + build_number: 26 +navmap_rviz_plugin: # rviz on Qt 6 + build_number: 26 +octomap_rviz_plugins: # rviz on Qt 6 + build_number: 26 plansys2_tools: # no Qt 5 run dependency build_number: 26 python_qt_binding: # PyQt5 compatibility layer (rqt on PyQt6) @@ -147,5 +173,31 @@ rtabmap: then: "-DBUILD_TOOLS=OFF -DBUILD_EXAMPLES=OFF -DWITH_GTSAM=OFF" else: "-DBUILD_TOOLS=OFF -DBUILD_EXAMPLES=OFF" build_number: 26 # built with Qt (its GUI library, for rtabmap_viz) +rtabmap_rviz_plugins: # rviz on Qt 6 + build_number: 26 +rviz2: # rviz on Qt 6 + build_number: 26 +rviz_2d_overlay_plugins: # rviz on Qt 6 + build_number: 26 +rviz_common: # rviz on Qt 6 + build_number: 26 +rviz_default_plugins: # rviz on Qt 6 + build_number: 26 +rviz_imu_plugin: # rviz on Qt 6 + build_number: 26 +rviz_rendering: # rviz on Qt 6 + build_number: 26 +rviz_rendering_tests: # rviz on Qt 6 + build_number: 26 +rviz_satellite: # rviz on Qt 6 + build_number: 26 +rviz_visual_testing_framework: # rviz on Qt 6 + build_number: 26 +rviz_visual_tools: # rviz on Qt 6 + build_number: 26 +slam_toolbox: # rviz on Qt 6 + build_number: 26 turtlesim: # Qt 6 build_number: 26 +vision_msgs_rviz_plugins: # rviz on Qt 6 + build_number: 26 diff --git a/distros/humble/robostack.yaml b/distros/humble/robostack.yaml deleted file mode 100644 index 76ff56655..000000000 --- a/distros/humble/robostack.yaml +++ /dev/null @@ -1,69 +0,0 @@ -# Qt5 for the Qt5 rosdep keys: this distribution's rviz and GUI packages still build -# against Qt5 (the shared mapping, for lyrical and newer, is Qt6). Packages already -# ported to Qt6/PyQt6 swap qt-main in patch/dependencies.yaml. -libqt5-core: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -libqt5-gui: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -libqt5-opengl: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -libqt5-opengl-dev: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -libqt5-svg: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -libqt5-svg-dev: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -libqt5-websockets-dev: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -libqt5-widgets: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -libqt5x11extras5-dev: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -qt5-image-formats-plugins: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -qt5-qmake: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -qtbase5-dev: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -python-qt5-bindings: - robostack: [pyqt, pyqt-builder] -python3-qt5-bindings: - robostack: [pyqt, pyqt-builder] -python3-qt5-bindings-gl: - robostack: [pyqt, pyqt-builder] diff --git a/distros/humble/vinca.yaml b/distros/humble/vinca.yaml index 993c5e017..359ef8019 100644 --- a/distros/humble/vinca.yaml +++ b/distros/humble/vinca.yaml @@ -3,8 +3,6 @@ ros_distro: humble patch_dir: patch rosdistro_snapshot: rosdistro_snapshot.yaml rosdistro_additional_recipes: rosdistro_additional_recipes.yaml -# Qt5 for the Qt5 rosdep keys (see robostack.yaml); layered over shared/robostack.yaml -conda_index: [robostack.yaml] build_number: 25 diff --git a/distros/jazzy/distro.yaml b/distros/jazzy/distro.yaml index 1533a4f07..7ae637e60 100644 --- a/distros/jazzy/distro.yaml +++ b/distros/jazzy/distro.yaml @@ -7,7 +7,8 @@ upload_to: [anaconda] read_from: anaconda pinning_overrides: # wxwidgets >= 3.3.2 (and the newest 3.3.1 builds) need gst-plugins-base 1.28 on Linux, - # which no qt-main 5.15 accepts; mrpt_gui links both + # which no qt-main 5.15 accepts; keeps wxWidgets users (mrpt_gui) installable next to the + # packages still on Qt5 (plotjuggler, Gazebo) wxwidgets: [3.3.1] # nav2_mppi_controller lists xsimd before xtensor: unpinned, the solver takes the newest # xsimd (14), which no xtensor >= 0.25 accepts, and falls back to xtensor 0.23.9, whose diff --git a/distros/jazzy/patch/dependencies.yaml b/distros/jazzy/patch/dependencies.yaml index fc4368fc8..4e3bf911a 100644 --- a/distros/jazzy/patch/dependencies.yaml +++ b/distros/jazzy/patch/dependencies.yaml @@ -21,18 +21,8 @@ easynav_octomap_maps_manager: add_host: ["octomap"] foxglove_bridge: add_host: ["ros2-ament-cmake"] -fuse_viz: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] geometric_shapes: add_host: ["octomap"] -grid_map_rviz_plugin: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] gz_cmake_vendor: # Major version pin selects the Gazebo release matching jazzy (applies to all gz-* vendor packages). add_host: ["gz-cmake3"] @@ -47,8 +37,11 @@ gz_fuel_tools_vendor: add_host: ["gz-fuel-tools9"] add_run: ["gz-fuel-tools9"] gz_gui_vendor: - add_host: ["gz-gui8"] - add_run: ["gz-gui8"] + # Gazebo Harmonic's gz-gui8 is Qt5; the Qt rosdep keys map to Qt6 + remove_host: ["qt6-main"] + remove_run: ["qt6-main"] + add_host: ["gz-gui8", "qt-main"] + add_run: ["gz-gui8", "qt-main"] gz_launch_vendor: add_host: ["gz-launch7"] add_run: ["gz-launch7"] @@ -87,8 +80,11 @@ gz_sensors_vendor: add_host: ["gz-sensors8"] add_run: ["gz-sensors8"] gz_sim_vendor: - add_host: ["gz-sim8"] - add_run: ["gz-sim8"] + # Gazebo Harmonic's gz-gui8 is Qt5; the Qt rosdep keys map to Qt6 + remove_host: ["qt6-main"] + remove_run: ["qt6-main"] + add_host: ["gz-sim8", "qt-main"] + add_run: ["gz-sim8", "qt-main"] gz_tools_vendor: add_host: ["gz-tools2"] add_run: ["gz-tools2"] @@ -114,74 +110,17 @@ libg2o: mimick_vendor: add_build: ["vcstool", "setuptools <81"] add_host: ["setuptools <81"] -moveit_ros_visualization: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] -moveit_setup_app_plugins: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] -moveit_setup_assistant: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] -moveit_setup_controllers: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] -moveit_setup_core_plugins: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] -moveit_setup_framework: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] -moveit_setup_srdf_plugins: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] -moveit_task_constructor_visualization: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] moveit_visual_tools: add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}"] -mrpt_gui: - # Overrides shared/: this distribution maps Qt to qt-main 5.15, whose builds need - # gstreamer <1.27, while the pinned wxwidgets (3.3.3) needs gstreamer 1.28. A version - # spec bypasses that pin, so the solver picks a wxwidgets that coexists with qt-main. - add_host: ["wxwidgets >=3.2", "${{ 'glad' if win }}"] # glad: as in shared/ nav2_constrained_smoother: add_host: ["${{ 'openblas' if win }}"] nav2_mppi_controller: add_run: ["xtensor==0.25.0"] nav2_rviz_plugins: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main", "qt6-scxml"] + # QStateMachine: Qt 6's StateMachine module + add_host: ["qt6-scxml"] nav2_util: add_host: ["libboost-devel"] -navmap_rviz_plugin: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] -octomap_rviz_plugins: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] opennav_coverage: # package.xml misses deps that CMakeLists.txt finds add_host: [ros2-rclcpp-components, ros2-std-msgs, ros2-visualization-msgs] @@ -190,44 +129,39 @@ openvdb_vendor: add_host: ["openvdb"] pcl_conversions: add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "libboost-devel"] -plansys2_tools: - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] plotjuggler: - add_host: ["libxcb", "${{ 'elfutils' if linux }}", "ros2-ros-workspace", "git-lfs"] + # PlotJuggler 3.17 is Qt5-only (find_package(Qt5 ...)); the Qt rosdep keys map to Qt6 + remove_host: ["qt6-main"] + remove_run: ["qt6-main"] + add_host: ["libxcb", "${{ 'elfutils' if linux }}", "ros2-ros-workspace", "git-lfs", "qt-main"] + add_run: ["qt-main"] +plotjuggler_ros: + # Qt5-only like plotjuggler, which it links + remove_host: ["qt6-main"] + remove_run: ["qt6-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt-main"] # GL: as in shared/ + add_run: ["qt-main"] py_trees: add_host: ["hatchling"] # 2.6 builds with hatchling (as in lyrical) py_trees_js: add_host: - hatchling py_trees_ros_tutorials: - # the mock GUI is ported to PyQt6 (patch/ros2-py-trees-ros-tutorials.patch), like the rqt stack; # package.xml doesn't declare it add_run: ["pyqt6"] - remove_run: ["pyqt", "pyqt-builder"] python_qt_binding: - # PyQt6 / Qt 6 (patch/ros2-python-qt-binding.patch, as in humble). # sip <6.16: 6.16.x regressed ABI targeting for PyQt-based bindings. add_host: ["pyqt-builder", "pep517", "qt6-main", "pyqt6", "sip <6.16"] add_run: ["pyqt-builder", "pep517", "qt6-main", "pyqt6"] - remove_host: ["qt-main", "pyqt"] - remove_run: ["qt-main", "pyqt"] qt_gui: - # PyQt6, like python_qt_binding - remove_host: ["qt-main", "pyqt"] - remove_run: ["qt-main", "pyqt"] add_host: ["qt6-main", "pyqt6"] add_run: ["qt6-main", "pyqt6"] qt_gui_cpp: add_build: ["${{ 'pyqt6' if (build_platform != target_platform) }}", "${{ 'qt6-main' if (build_platform != target_platform) }}"] - # Qt 6 / PyQt6 (patch/ros2-qt-gui-cpp.patch); same sip <6.16 pin as python_qt_binding above. # Only the PyQt (sip) bindings: pyside2 has no Python 3.14 build, and the shiboken # bindings are optional (built only when python_qt_binding's shiboken_helper finds it). add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "pyqt-builder", "pep517", "qt6-main", "pyqt6", "sip <6.16"] add_run: ["pyqt-builder", "pep517", "qt6-main", "pyqt6"] - remove_host: ["qt-main", "pyqt"] - remove_run: ["qt-main", "pyqt"] roboplan_example_models: # src/resources.cpp uses dladdr() from dlfcn.h, which is POSIX-only. # On Windows we need to depend on dlfcn-win32 instead. @@ -237,112 +171,24 @@ roboplan_ros_examples: add_host: ["ros2-ament-cmake"] ros_gz_sim: add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}"] -ros_image_to_qimage: - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] - remove_host: ["qt-main"] - remove_run: ["qt-main"] -rqt_gui_cpp: - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] - remove_host: ["qt-main"] - remove_run: ["qt-main"] -rqt_image_overlay: - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] - remove_host: ["qt-main"] - remove_run: ["qt-main"] -rqt_image_overlay_layer: - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] - remove_host: ["qt-main"] - remove_run: ["qt-main"] -rqt_image_view: - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] - remove_host: ["qt-main"] - remove_run: ["qt-main"] -rqt_py_common: - # Qt 6, like qt_gui - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["qt6-main"] rtabmap: add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "ceres-solver", "${{ 'libdc1394' if not win }}", "libusb", "vtk"] -rtabmap_rviz_plugins: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] -rviz2: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] -rviz_2d_overlay_plugins: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] -rviz_common: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] -rviz_default_plugins: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] -rviz_imu_plugin: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] rviz_ogre_vendor: add_host: ["zlib", "freeimage", "freetype", "assimp", "zziplib", "pugixml", "${{ 'libglu' if linux }}", "setuptools <81"] add_build: ["vcstool", "setuptools <81"] add_run: ["assimp"] -rviz_rendering: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] -rviz_rendering_tests: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] -rviz_satellite: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] -rviz_visual_testing_framework: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] -rviz_visual_tools: - # rviz on Qt 6 (patch/ros2-rviz-common.patch: upstream's Qt 6 support) - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] sdformat_vendor: add_host: ["sdformat14"] add_run: ["sdformat14"] slam_toolbox: add_build: ["${{ 'qt6-main' if (build_platform != target_platform) }}"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "blas-devel", "qt6-main"] - remove_host: ["qt-main"] - remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "blas-devel"] spatio_temporal_voxel_layer: add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "openvdb"] swri_console: add_build: ["${{ 'qt6-main' if (build_platform != target_platform) }}"] add_host: ["libboost-devel", "qt6-main", "${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}"] add_run: ["libboost"] - remove_host: ["qt-main"] - remove_run: ["qt-main"] -turtlesim: - remove_host: ["qt-main"] - remove_run: ["qt-main"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] # TODO unvendor?! uncrustify_vendor: add_build: ["vcstool", "setuptools <81"] @@ -354,9 +200,7 @@ ur_moveit_config: add_run: ["ros2-rclpy"] vision_msgs_rviz_plugins: add_build: ["${{ 'qt6-main' if (build_platform != target_platform) }}"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "qt6-main"] - remove_host: ["qt-main"] - remove_run: ["qt-main"] + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}"] warehouse_ros_sqlite: add_host: ["ros2-sqlite3-vendor"] add_run: ["ros2-sqlite3-vendor"] diff --git a/distros/jazzy/patch/ros2-rviz-rendering.osx.patch b/distros/jazzy/patch/ros2-rviz-rendering.osx.patch new file mode 100644 index 000000000..72ea2a749 --- /dev/null +++ b/distros/jazzy/patch/ros2-rviz-rendering.osx.patch @@ -0,0 +1,46 @@ +diff --git a/src/rviz_rendering/ogre_render_window_impl.cpp b/src/rviz_rendering/ogre_render_window_impl.cpp +index 27ff2ce..38ade73 100644 +--- a/src/rviz_rendering/ogre_render_window_impl.cpp ++++ b/src/rviz_rendering/ogre_render_window_impl.cpp +@@ -243,12 +243,21 @@ RenderWindowImpl::resize(size_t width, size_t height) + return; + } + if (ogre_render_window_) { +- this->setCameraAspectRatio(); +- ogre_render_window_->resize( +- static_cast(width), // NOLINT +- static_cast(height) // NOLINT +- ); +- ogre_render_window_->windowMovedOrResized(); ++ // Skip the costly Ogre resize / windowMovedOrResized when the size has ++ // not actually changed. On macOS Sonoma+, windowMovedOrResized triggers ++ // [NSOpenGLContext update] -> CGLSetVirtualScreen, which is hundreds of ++ // ms per call under the OpenGL-on-Metal compatibility path; each call ++ // also re-fires an expose event, so calling it on every expose creates ++ // a positive-feedback loop that makes the splash screen never progress. ++ const auto w = static_cast(width); ++ const auto h = static_cast(height); ++ if (w != last_resize_width_ || h != last_resize_height_) { ++ last_resize_width_ = w; ++ last_resize_height_ = h; ++ this->setCameraAspectRatio(); ++ ogre_render_window_->resize(w, h); ++ ogre_render_window_->windowMovedOrResized(); ++ } + } + this->renderLater(); + } +diff --git a/src/rviz_rendering/ogre_render_window_impl.hpp b/src/rviz_rendering/ogre_render_window_impl.hpp +index 7bd7b22..8391498 100644 +--- a/src/rviz_rendering/ogre_render_window_impl.hpp ++++ b/src/rviz_rendering/ogre_render_window_impl.hpp +@@ -150,6 +150,9 @@ protected: + + bool animating_; + ++ unsigned int last_resize_width_{0}; ++ unsigned int last_resize_height_{0}; ++ + Ogre::Viewport * ogre_viewport_; + + // std::function pre_render_callback_; ///< Functor which is called before each render diff --git a/distros/jazzy/pkg_additional_info.yaml b/distros/jazzy/pkg_additional_info.yaml index ae1b3f49a..a68348ae3 100644 --- a/distros/jazzy/pkg_additional_info.yaml +++ b/distros/jazzy/pkg_additional_info.yaml @@ -178,6 +178,8 @@ moveit_setup_srdf_plugins: # rviz on Qt 6 build_number: 32 moveit_task_constructor_visualization: # rviz on Qt 6 build_number: 32 +mrpt_gui: # Qt rosdep keys on Qt 6 (MRPT's optional Qt 5 support off, as in lyrical) + build_number: 32 nav2_rviz_plugins: # rviz on Qt 6 build_number: 32 navmap_rviz_plugin: # rviz on Qt 6 diff --git a/distros/jazzy/robostack.yaml b/distros/jazzy/robostack.yaml deleted file mode 100644 index 76ff56655..000000000 --- a/distros/jazzy/robostack.yaml +++ /dev/null @@ -1,69 +0,0 @@ -# Qt5 for the Qt5 rosdep keys: this distribution's rviz and GUI packages still build -# against Qt5 (the shared mapping, for lyrical and newer, is Qt6). Packages already -# ported to Qt6/PyQt6 swap qt-main in patch/dependencies.yaml. -libqt5-core: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -libqt5-gui: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -libqt5-opengl: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -libqt5-opengl-dev: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -libqt5-svg: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -libqt5-svg-dev: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -libqt5-websockets-dev: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -libqt5-widgets: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -libqt5x11extras5-dev: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -qt5-image-formats-plugins: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -qt5-qmake: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -qtbase5-dev: - robostack: - linux: [qt-main, libopengl-devel, libgl-devel] - osx: [qt-main] - win64: [qt-main] -python-qt5-bindings: - robostack: [pyqt, pyqt-builder] -python3-qt5-bindings: - robostack: [pyqt, pyqt-builder] -python3-qt5-bindings-gl: - robostack: [pyqt, pyqt-builder] diff --git a/distros/jazzy/vinca.yaml b/distros/jazzy/vinca.yaml index ecf62c64b..53f7626b4 100644 --- a/distros/jazzy/vinca.yaml +++ b/distros/jazzy/vinca.yaml @@ -3,8 +3,6 @@ ros_distro: jazzy patch_dir: patch rosdistro_snapshot: rosdistro_snapshot.yaml rosdistro_additional_recipes: rosdistro_additional_recipes.yaml -# Qt5 for the Qt5 rosdep keys (see robostack.yaml); layered over shared/robostack.yaml -conda_index: [robostack.yaml] # mapping for package keys From db9244fae0978cca18059d2211809465bf7088cf Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Sun, 22 Nov 2026 08:23:24 +0000 Subject: [PATCH 04/10] humble: rviz shutdown fixes for macOS from jazzy ros2-rviz-common.osx.patch / ros2-rviz2.osx.patch as on jazzy: stop the render timer in closeEvent and skip onUpdate while shutting down (closing the window crashed in Ogre::CocoaWindow::swapBuffers -> [NSOpenGLContext setView:] on the destroyed view), tear down tools/views/interaction managers and the executor in dependency order, and _Exit after the application teardown. Co-Authored-By: Claude Opus 5.5 --- .../humble/patch/ros2-rviz-common.osx.patch | 254 ++++++++++++++++++ distros/humble/patch/ros2-rviz2.osx.patch | 96 +++++++ distros/humble/pkg_additional_info.yaml | 4 +- 3 files changed, 352 insertions(+), 2 deletions(-) create mode 100644 distros/humble/patch/ros2-rviz-common.osx.patch create mode 100644 distros/humble/patch/ros2-rviz2.osx.patch diff --git a/distros/humble/patch/ros2-rviz-common.osx.patch b/distros/humble/patch/ros2-rviz-common.osx.patch new file mode 100644 index 000000000..1b34dc583 --- /dev/null +++ b/distros/humble/patch/ros2-rviz-common.osx.patch @@ -0,0 +1,254 @@ +diff --git a/include/rviz_common/render_panel.hpp b/include/rviz_common/render_panel.hpp +index bfa1c6d7..463a1ba1 100644 +--- a/include/rviz_common/render_panel.hpp ++++ b/include/rviz_common/render_panel.hpp +@@ -90,6 +90,9 @@ public: + /// Get the RenderWindow. + rviz_rendering::RenderWindow * getRenderWindow(); + ++ /// Disconnect this panel from its display context before shutdown. ++ void clearDisplayContext(); ++ + /// Overrides the default implementation. + /** + * This override is here for convenience. Returns a symbolic 320x240px size. +diff --git a/src/rviz_common/render_panel.cpp b/src/rviz_common/render_panel.cpp +index 273426aa..6fbe3559 100644 +--- a/src/rviz_common/render_panel.cpp ++++ b/src/rviz_common/render_panel.cpp +@@ -87,6 +87,7 @@ RenderPanel::RenderPanel(QWidget * parent) + + RenderPanel::~RenderPanel() + { ++ clearDisplayContext(); + delete fake_mouse_move_event_timer_; + // if (scene_manager_ && default_camera_) { + // scene_manager_->destroyCamera(default_camera_); +@@ -127,6 +128,15 @@ DisplayContext * RenderPanel::getManager() + return context_; + } + ++void RenderPanel::clearDisplayContext() ++{ ++ context_ = nullptr; ++ if (render_window_) { ++ render_window_->setOnRenderWindowMouseEventsCallback(nullptr); ++ render_window_->setOnRenderWindowWheelEventsCallback(nullptr); ++ } ++} ++ + ViewController * RenderPanel::getViewController() + { + return view_controller_; +diff --git a/src/rviz_common/ros_integration/ros_client_abstraction.cpp b/src/rviz_common/ros_integration/ros_client_abstraction.cpp +index 2754cec6..a301935d 100644 +--- a/src/rviz_common/ros_integration/ros_client_abstraction.cpp ++++ b/src/rviz_common/ros_integration/ros_client_abstraction.cpp +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + + #include "rclcpp/rclcpp.hpp" + +@@ -75,6 +76,16 @@ RosClientAbstraction::ok() + void + RosClientAbstraction::shutdown() + { ++#ifdef __APPLE__ ++ // On macOS, tearing down the rclcpp node during process shutdown can crash in ++ // rclcpp::CallbackGroup destruction after Qt/RViz display teardown. The ++ // process is exiting, so keep the node alive and let the OS reclaim it. ++ auto leaked_rviz_ros_node = ++ new std::shared_ptr(std::move(rviz_ros_node_)); ++ static_cast(leaked_rviz_ros_node); ++#else ++ rviz_ros_node_.reset(); ++#endif + rclcpp::shutdown(); + } + +diff --git a/src/rviz_common/view_manager.cpp b/src/rviz_common/view_manager.cpp +index 4a83baa2..85ee860a 100644 +--- a/src/rviz_common/view_manager.cpp ++++ b/src/rviz_common/view_manager.cpp +@@ -77,7 +77,16 @@ ViewManager::ViewManager(DisplayContext * context) + } + + ViewManager::~ViewManager() +-{} ++{ ++ if (impl_->current) { ++ // The property model owns view controllers; do not let their destruction ++ // call back into ViewManager while impl_ is unwinding. ++ disconnect(impl_->current, SIGNAL(destroyed(QObject*)), this, SLOT(onCurrentDestroyed(QObject*))); ++ } ++ if (impl_->render_panel) { ++ impl_->render_panel->setViewController(nullptr); ++ } ++} + + void ViewManager::initialize() + { +diff --git a/src/rviz_common/visualization_frame.cpp b/src/rviz_common/visualization_frame.cpp +index 07c09363..9e42703d 100644 +--- a/src/rviz_common/visualization_frame.cpp ++++ b/src/rviz_common/visualization_frame.cpp +@@ -158,6 +158,11 @@ VisualizationFrame::VisualizationFrame( + + VisualizationFrame::~VisualizationFrame() + { ++ if (render_panel_) { ++ // Render callbacks carry a DisplayContext pointer owned by manager_. ++ render_panel_->clearDisplayContext(); ++ } ++ + delete manager_; + delete render_panel_; + +@@ -202,6 +207,9 @@ void VisualizationFrame::updateFps() + void VisualizationFrame::closeEvent(QCloseEvent * event) + { + if (prepareToExit()) { ++ if (manager_) { ++ manager_->stopUpdate(); ++ } + event->accept(); + } else { + event->ignore(); +diff --git a/src/rviz_common/visualization_manager.cpp b/src/rviz_common/visualization_manager.cpp +index c3825d96..60e5af6b 100644 +--- a/src/rviz_common/visualization_manager.cpp ++++ b/src/rviz_common/visualization_manager.cpp +@@ -57,7 +57,9 @@ + + // #include "tf/transform_listener.h" + #include "rclcpp/clock.hpp" ++#include "rclcpp/exceptions.hpp" + #include "rclcpp/time.hpp" ++#include "rclcpp/utilities.hpp" + #include "rviz_rendering/material_manager.hpp" + #include "rviz_rendering/render_window.hpp" + +@@ -84,6 +86,7 @@ + #include "rviz_common/interaction/selection_manager_iface.hpp" + #include "rviz_common/interaction/view_picker.hpp" + #include "rviz_common/interaction/view_picker_iface.hpp" ++#include "rviz_common/logging.hpp" + #include "rviz_common/tool.hpp" + #include "rviz_common/tool_manager.hpp" + // #include "rviz_common/view_controller.hpp" +@@ -270,15 +273,36 @@ VisualizationManager::VisualizationManager( + + VisualizationManager::~VisualizationManager() + { +- delete update_timer_; +- + shutting_down_ = true; ++ stopUpdate(); ++ executor_->cancel(); ++ delete update_timer_; + #if 0 + private_->threaded_queue_threads_.join_all(); + #endif + +- delete display_property_tree_model_; ++ // Tool and view destruction uses interaction managers and plugin instances. ++ // Keep those dependencies alive until after the owners have been deleted. + delete tool_manager_; ++ delete view_manager_; ++ ++ view_picker_.reset(); ++ selection_manager_.reset(); ++ handler_manager_.reset(); ++ ++ delete display_property_tree_model_; ++ ++ if (auto rviz_ros_node = rviz_ros_node_.lock()) { ++ try { ++ executor_->remove_node(rviz_ros_node->get_raw_node(), false); ++ } catch (const std::exception & exception) { ++ RVIZ_COMMON_LOG_ERROR_STREAM( ++ "Failed to remove RViz ROS node from executor during shutdown: " << ++ exception.what()); ++ } ++ } ++ executor_.reset(); ++ + delete display_factory_; + delete frame_manager_; + delete private_; +@@ -391,6 +415,10 @@ BitAllocator * VisualizationManager::visibilityBits() + + void VisualizationManager::onUpdate() + { ++ if (shutting_down_ || render_panel_ == nullptr || ogre_root_ == nullptr) { ++ return; ++ } ++ + const auto wall_now = std::chrono::system_clock::now(); + const auto wall_diff = wall_now - last_update_wall_time_; + const uint64_t wall_dt = std::chrono::duration_cast(wall_diff).count(); +@@ -403,7 +431,19 @@ void VisualizationManager::onUpdate() + resetTime(); + } + +- executor_->spin_some(std::chrono::milliseconds(10)); ++ if (!rclcpp::ok()) { ++ shutting_down_ = true; ++ stopUpdate(); ++ return; ++ } ++ ++ try { ++ executor_->spin_some(std::chrono::milliseconds(10)); ++ } catch (const rclcpp::exceptions::RCLError &) { ++ shutting_down_ = true; ++ stopUpdate(); ++ return; ++ } + + Q_EMIT preUpdate(); + +diff --git a/src/rviz_common/visualizer_app.cpp b/src/rviz_common/visualizer_app.cpp +index e84875f6..b4dceb4e 100644 +--- a/src/rviz_common/visualizer_app.cpp ++++ b/src/rviz_common/visualizer_app.cpp +@@ -43,6 +43,7 @@ + #include // NOLINT: cpplint is unable to handle the include order here + #include // NOLINT: cpplint is unable to handle the include order here + ++#include "rclcpp/exceptions.hpp" + #include "rviz_common/interaction/selection_manager.hpp" + #include "rviz_common/logging.hpp" + #include "rviz_rendering/ogre_logging.hpp" +@@ -159,7 +160,15 @@ bool VisualizerApp::init(int argc, char ** argv) + if (!splash_path.isEmpty()) { + frame_->setSplashPath(splash_path); + } +- frame_->initialize(node_, display_config); ++ // SIGINT can invalidate the ROS context while Qt is still constructing RViz. ++ try { ++ frame_->initialize(node_, display_config); ++ } catch (const rclcpp::exceptions::RCLError & ex) { ++ RVIZ_COMMON_LOG_ERROR_STREAM("Failed to initialize RViz: " << ex.what()); ++ delete frame_; ++ frame_ = nullptr; ++ return false; ++ } + + if (!fixed_frame.isEmpty()) { + frame_->getManager()->setFixedFrame(fixed_frame); +@@ -173,8 +182,10 @@ bool VisualizerApp::init(int argc, char ** argv) + VisualizerApp::~VisualizerApp() + { + delete continue_timer_; +- ros_client_abstraction_->shutdown(); ++ // RViz-owned objects can still use ROS while they release subscriptions, ++ // executors, and plugin instances. + delete frame_; ++ ros_client_abstraction_->shutdown(); + } + + void VisualizerApp::startContinueChecker() diff --git a/distros/humble/patch/ros2-rviz2.osx.patch b/distros/humble/patch/ros2-rviz2.osx.patch new file mode 100644 index 000000000..4dee886e7 --- /dev/null +++ b/distros/humble/patch/ros2-rviz2.osx.patch @@ -0,0 +1,96 @@ +diff --git a/src/main.cpp b/src/main.cpp +index a743271c..e7ec9d97 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -28,6 +28,7 @@ + * POSSIBILITY OF SUCH DAMAGE. + */ + ++#include + #include + #include + #include +@@ -41,40 +42,51 @@ + + int main(int argc, char ** argv) + { +- // remove ROS arguments before passing to QApplication +- std::vector non_ros_args = rclcpp::remove_ros_arguments(argc, argv); +- std::vector non_ros_args_c_strings; +- for (auto & arg : non_ros_args) { +- non_ros_args_c_strings.push_back(&arg.front()); +- } +- int non_ros_argc = static_cast(non_ros_args_c_strings.size()); +- +- QApplication qapp(non_ros_argc, non_ros_args_c_strings.data()); ++ int exit_code = 1; + +- // TODO(wjwwood): use node's logger here in stead +- auto logger = rclcpp::get_logger("rviz2"); +- // install logging handlers to route logging through ROS's logging system +- rviz_common::set_logging_handlers( +- [logger](const std::string & msg, const std::string &, size_t) { +- RCLCPP_DEBUG(logger, "%s", msg.c_str()); +- }, +- [logger](const std::string & msg, const std::string &, size_t) { +- RCLCPP_INFO(logger, "%s", msg.c_str()); +- }, +- [logger](const std::string & msg, const std::string &, size_t) { +- RCLCPP_WARN(logger, "%s", msg.c_str()); +- }, +- [logger](const std::string & msg, const std::string &, size_t) { +- RCLCPP_ERROR(logger, "%s", msg.c_str()); ++ { ++ // remove ROS arguments before passing to QApplication ++ std::vector non_ros_args = rclcpp::remove_ros_arguments(argc, argv); ++ std::vector non_ros_args_c_strings; ++ for (auto & arg : non_ros_args) { ++ non_ros_args_c_strings.push_back(&arg.front()); + } +- ); ++ int non_ros_argc = static_cast(non_ros_args_c_strings.size()); ++ ++ QApplication qapp(non_ros_argc, non_ros_args_c_strings.data()); + +- rviz_common::VisualizerApp vapp( +- std::make_unique()); +- vapp.setApp(&qapp); +- if (vapp.init(argc, argv)) { +- return qapp.exec(); +- } else { +- return 1; ++ // TODO(wjwwood): use node's logger here in stead ++ auto logger = rclcpp::get_logger("rviz2"); ++ // install logging handlers to route logging through ROS's logging system ++ rviz_common::set_logging_handlers( ++ [logger](const std::string & msg, const std::string &, size_t) { ++ RCLCPP_DEBUG(logger, "%s", msg.c_str()); ++ }, ++ [logger](const std::string & msg, const std::string &, size_t) { ++ RCLCPP_INFO(logger, "%s", msg.c_str()); ++ }, ++ [logger](const std::string & msg, const std::string &, size_t) { ++ RCLCPP_WARN(logger, "%s", msg.c_str()); ++ }, ++ [logger](const std::string & msg, const std::string &, size_t) { ++ RCLCPP_ERROR(logger, "%s", msg.c_str()); ++ } ++ ); ++ ++ rviz_common::VisualizerApp vapp( ++ std::make_unique()); ++ vapp.setApp(&qapp); ++ if (vapp.init(argc, argv)) { ++ exit_code = qapp.exec(); ++ } + } ++ ++#ifdef __APPLE__ ++ // On macOS, process-global class_loader teardown can throw after RViz has ++ // already shut down its own Qt and ROS objects. Avoid running static ++ // destructors after the application-level teardown has completed. ++ std::_Exit(exit_code); ++#else ++ return exit_code; ++#endif + } diff --git a/distros/humble/pkg_additional_info.yaml b/distros/humble/pkg_additional_info.yaml index 862e23d33..3d47886f4 100644 --- a/distros/humble/pkg_additional_info.yaml +++ b/distros/humble/pkg_additional_info.yaml @@ -176,11 +176,11 @@ rtabmap: rtabmap_rviz_plugins: # rviz on Qt 6 build_number: 26 rviz2: # rviz on Qt 6 - build_number: 26 + build_number: 26 # rviz on Qt 6 rviz_2d_overlay_plugins: # rviz on Qt 6 build_number: 26 rviz_common: # rviz on Qt 6 - build_number: 26 + build_number: 26 # rviz on Qt 6 rviz_default_plugins: # rviz on Qt 6 build_number: 26 rviz_imu_plugin: # rviz on Qt 6 From 04e3bb9b82d709c0a6f74692b0975408de34d59a Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Sun, 22 Nov 2026 08:50:25 +0000 Subject: [PATCH 05/10] jazzy: qt_gui_cpp finds OpenGL like humble (no legacy GL preference) With Qt 6, conda-forge's libglvnd setup has no libGL.so-only path for the sip module's find_package(OpenGL) (OPENGL_opengl/glx_LIBRARY not found on linux-aarch64); humble's Qt 6 qt_gui_cpp uses the default GLVND lookup and builds on Linux. Co-Authored-By: Claude Opus 5.5 --- distros/jazzy/patch/ros2-qt-gui-cpp.patch | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/distros/jazzy/patch/ros2-qt-gui-cpp.patch b/distros/jazzy/patch/ros2-qt-gui-cpp.patch index e330787a0..4ca4a459e 100644 --- a/distros/jazzy/patch/ros2-qt-gui-cpp.patch +++ b/distros/jazzy/patch/ros2-qt-gui-cpp.patch @@ -198,18 +198,12 @@ index 47c2495..cc68fea 100644 set(qt_gui_cpp_sip_LDFLAGS_OTHER ${qt_gui_cpp_LDFLAGS_OTHER}) ament_get_recursive_properties(deps_include_dirs deps_libraries ${pluginlib_TARGETS}) -@@ -51,16 +51,28 @@ cmake_minimum_required(VERSION 3.20) +@@ -51,16 +51,22 @@ cmake_minimum_required(VERSION 3.20) cmake_policy(SET CMP0094 NEW) set(Python3_FIND_UNVERSIONED_NAMES FIRST) -find_package(Python3 REQUIRED COMPONENTS Development) +find_package(Python REQUIRED COMPONENTS Development) -+# Prefer legacy libGL.so over the modular libOpenGL.so so that OpenGL::GL is -+# an IMPORTED library with a resolvable TARGET_FILE. conda-forge's -+# libglvnd-based libgl otherwise defaults OpenGL::GL to an INTERFACE wrapper, -+# which makes $ below fail with: -+# Target "OpenGL::GL" is not an executable or library. -+set(OpenGL_GL_PREFERENCE LEGACY) +find_package(OpenGL REQUIRED) set(_qt_gui_cpp_sip_LIBRARIES From 6ddf8bf634848388a1e314fc6896768bfc56a631 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Sun, 22 Nov 2026 09:26:34 +0000 Subject: [PATCH 06/10] humble, jazzy: Linux fixes from the linux-aarch64 build - rtabmap_rviz_plugins: upstream's aarch64-only find_library(message_filters) only looks in /opt/ros//lib; also look in the conda prefix. - rmf_visualization_rviz2_plugins (new with rmf_dev): Qt 6 like the rviz it plugs into. - rmf_traffic_editor (new with rmf_dev): 1.9 is Qt5-only (Qt6 from 1.14, as in lyrical); qt-main explicitly, like plotjuggler. Co-Authored-By: Claude Opus 5.5 --- distros/humble/patch/dependencies.yaml | 6 +++ ...ros2-rmf-visualization-rviz2-plugins.patch | 44 +++++++++++++++++++ .../patch/ros2-rtabmap-rviz-plugins.patch | 9 ++++ distros/jazzy/patch/dependencies.yaml | 6 +++ ...ros2-rmf-visualization-rviz2-plugins.patch | 43 ++++++++++++++++++ .../patch/ros2-rtabmap-rviz-plugins.patch | 9 ++++ 6 files changed, 117 insertions(+) create mode 100644 distros/humble/patch/ros2-rmf-visualization-rviz2-plugins.patch create mode 100644 distros/jazzy/patch/ros2-rmf-visualization-rviz2-plugins.patch diff --git a/distros/humble/patch/dependencies.yaml b/distros/humble/patch/dependencies.yaml index ee9dfdd2e..2299027b8 100644 --- a/distros/humble/patch/dependencies.yaml +++ b/distros/humble/patch/dependencies.yaml @@ -128,6 +128,12 @@ rclcpp_action: rclpy: add_host: ["typing_extensions"] add_run: ["typing_extensions"] +rmf_traffic_editor: + # 1.9 is Qt5-only (find_package(Qt5 ...), QRegExp etc.; Qt6 from 1.14); the Qt rosdep keys map to Qt6 + remove_host: ["qt6-main"] + remove_run: ["qt6-main"] + add_host: ["qt-main"] + add_run: ["qt-main"] rmw_implementation: add_host: - "ros2-yaml-cpp-vendor" diff --git a/distros/humble/patch/ros2-rmf-visualization-rviz2-plugins.patch b/distros/humble/patch/ros2-rmf-visualization-rviz2-plugins.patch new file mode 100644 index 000000000..de9116b16 --- /dev/null +++ b/distros/humble/patch/ros2-rmf-visualization-rviz2-plugins.patch @@ -0,0 +1,44 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f0e28900..e0b000fd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -31,7 +31,7 @@ find_package(rviz_common REQUIRED) + find_package(rviz_rendering REQUIRED) + find_package(rviz_default_plugins REQUIRED) + find_package(rmf_traffic_ros2 REQUIRED) +-find_package(Qt5 REQUIRED COMPONENTS Widgets Test) ++find_package(Qt6 REQUIRED COMPONENTS Widgets Test) + + if(BUILD_TESTING) + find_package(ament_cmake_uncrustify REQUIRED) +@@ -66,7 +66,7 @@ target_link_libraries(${PROJECT_NAME} + rviz_common::rviz_common + ${rviz_rendering_LIBRARIES} + ${rviz_default_plugins_LIBRARIES} +- ${Qt5Widgets_LIBRARIES} ++ ${Qt6Widgets_LIBRARIES} + rmf_traffic_ros2::rmf_traffic_ros2 + ) + +@@ -81,7 +81,7 @@ target_include_directories(${PROJECT_NAME} + ${rviz_common_INCLUDE_DIRS} + ${rviz_rendering_INCLUDE_DIRS} + ${rviz_default_plugins_INCLUDE_DIRS} +- ${Qt5Widgets_INCLUDE_DIRS} ++ ${Qt6Widgets_INCLUDE_DIRS} + ${QT5_INCLUDE_DIRS} + ) + +@@ -95,10 +95,10 @@ ament_export_include_directories(include) + ament_export_targets(${PROJECT_NAME} HAS_LIBRARY_TARGET) + + ament_export_dependencies( +- Qt5 ++ Qt6 + rviz_common + rclcpp +- Qt5Widgets ++ Qt6Widgets + ) + + install( diff --git a/distros/humble/patch/ros2-rtabmap-rviz-plugins.patch b/distros/humble/patch/ros2-rtabmap-rviz-plugins.patch index 3c3c1230a..84d00b385 100644 --- a/distros/humble/patch/ros2-rtabmap-rviz-plugins.patch +++ b/distros/humble/patch/ros2-rtabmap-rviz-plugins.patch @@ -2,6 +2,15 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e47a684a..9e071e0b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt +@@ -9,6 +9,7 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") + # issues #1285 #1288 + find_library( + message_filters_LIB NAMES message_filters +- PATHS "/opt/ros/$ENV{ROS_DISTRO}/lib" ++ # RoboStack: message_filters is in the conda prefix, not /opt/ros ++ PATHS "$ENV{PREFIX}/lib" "/opt/ros/$ENV{ROS_DISTRO}/lib" + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH REQUIRED + ) @@ -15,7 +15,7 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") endif() diff --git a/distros/jazzy/patch/dependencies.yaml b/distros/jazzy/patch/dependencies.yaml index 4e3bf911a..4a38163c7 100644 --- a/distros/jazzy/patch/dependencies.yaml +++ b/distros/jazzy/patch/dependencies.yaml @@ -162,6 +162,12 @@ qt_gui_cpp: # bindings are optional (built only when python_qt_binding's shiboken_helper finds it). add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "pyqt-builder", "pep517", "qt6-main", "pyqt6", "sip <6.16"] add_run: ["pyqt-builder", "pep517", "qt6-main", "pyqt6"] +rmf_traffic_editor: + # 1.9 is Qt5-only (find_package(Qt5 ...), QRegExp etc.; Qt6 from 1.14); the Qt rosdep keys map to Qt6 + remove_host: ["qt6-main"] + remove_run: ["qt6-main"] + add_host: ["qt-main"] + add_run: ["qt-main"] roboplan_example_models: # src/resources.cpp uses dladdr() from dlfcn.h, which is POSIX-only. # On Windows we need to depend on dlfcn-win32 instead. diff --git a/distros/jazzy/patch/ros2-rmf-visualization-rviz2-plugins.patch b/distros/jazzy/patch/ros2-rmf-visualization-rviz2-plugins.patch new file mode 100644 index 000000000..f052a543d --- /dev/null +++ b/distros/jazzy/patch/ros2-rmf-visualization-rviz2-plugins.patch @@ -0,0 +1,43 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bb8952ba..98a87cbf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -31,7 +31,7 @@ find_package(rviz_common REQUIRED) + find_package(rviz_rendering REQUIRED) + find_package(rviz_default_plugins REQUIRED) + find_package(rmf_traffic_ros2 REQUIRED) +-find_package(Qt5 REQUIRED COMPONENTS Widgets Test) ++find_package(Qt6 REQUIRED COMPONENTS Widgets Test) + + if(BUILD_TESTING) + find_package(ament_cmake_uncrustify REQUIRED) +@@ -71,14 +71,14 @@ ament_target_dependencies(${PROJECT_NAME} + target_link_libraries(${PROJECT_NAME} + PUBLIC + ${QT5_LIBRARIES} +- ${Qt5Widgets_LIBRARIES} ++ ${Qt6Widgets_LIBRARIES} + ) + + target_include_directories(${PROJECT_NAME} + PUBLIC + $ + $ +- ${Qt5Widgets_INCLUDE_DIRS} ++ ${Qt6Widgets_INCLUDE_DIRS} + ${QT5_INCLUDE_DIRS} + ) + +@@ -92,10 +92,10 @@ ament_export_include_directories(include) + ament_export_targets(${PROJECT_NAME} HAS_LIBRARY_TARGET) + + ament_export_dependencies( +- Qt5 ++ Qt6 + rviz_common + rclcpp +- Qt5Widgets ++ Qt6Widgets + ) + + install( diff --git a/distros/jazzy/patch/ros2-rtabmap-rviz-plugins.patch b/distros/jazzy/patch/ros2-rtabmap-rviz-plugins.patch index 3c3c1230a..84d00b385 100644 --- a/distros/jazzy/patch/ros2-rtabmap-rviz-plugins.patch +++ b/distros/jazzy/patch/ros2-rtabmap-rviz-plugins.patch @@ -2,6 +2,15 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e47a684a..9e071e0b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt +@@ -9,6 +9,7 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") + # issues #1285 #1288 + find_library( + message_filters_LIB NAMES message_filters +- PATHS "/opt/ros/$ENV{ROS_DISTRO}/lib" ++ # RoboStack: message_filters is in the conda prefix, not /opt/ros ++ PATHS "$ENV{PREFIX}/lib" "/opt/ros/$ENV{ROS_DISTRO}/lib" + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH REQUIRED + ) @@ -15,7 +15,7 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") endif() From 33b86df21728e89750052b095f0e9b5c48d73e8c Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Sun, 22 Nov 2026 09:28:02 +0000 Subject: [PATCH 07/10] jazzy: class_loader fix moves to its own PR (all distros) Co-Authored-By: Claude Opus 5.5 --- distros/jazzy/patch/ros2-class-loader.patch | 23 --------------------- distros/jazzy/pkg_additional_info.yaml | 2 -- 2 files changed, 25 deletions(-) delete mode 100644 distros/jazzy/patch/ros2-class-loader.patch diff --git a/distros/jazzy/patch/ros2-class-loader.patch b/distros/jazzy/patch/ros2-class-loader.patch deleted file mode 100644 index 168fcde0b..000000000 --- a/distros/jazzy/patch/ros2-class-loader.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/src/multi_library_class_loader.cpp b/src/multi_library_class_loader.cpp -index d7ba907..32a971c 100644 ---- a/src/multi_library_class_loader.cpp -+++ b/src/multi_library_class_loader.cpp -@@ -34,6 +34,8 @@ - #include - #include - -+#include "console_bridge/console.h" -+ - namespace class_loader - { - -@@ -55,6 +57,9 @@ protected: - class_loader::impl::getCurrentlyLoadingLibraryName(); - class_loader::impl::getCurrentlyActiveClassLoader(); - class_loader::impl::hasANonPurePluginLibraryBeenOpened(); -+ // ~ClassLoader() logs through console_bridge, so its output handler (a function-local -+ // static in console_bridge) has to outlive `class_loader_ptrs_` as well -+ console_bridge::getLogLevel(); - } - }; - diff --git a/distros/jazzy/pkg_additional_info.yaml b/distros/jazzy/pkg_additional_info.yaml index a68348ae3..ec233d7a9 100644 --- a/distros/jazzy/pkg_additional_info.yaml +++ b/distros/jazzy/pkg_additional_info.yaml @@ -156,8 +156,6 @@ zenoh_cpp_vendor: cartographer_ros: additional_cmake_args: "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON" build_number: 32 # offline_node.cpp out of the shared library (duplicate gflags abort) -class_loader: # console_bridge outlives the loaders at exit (macOS exit abort) - build_number: 32 fuse_viz: # rviz on Qt 6 build_number: 32 grid_map_rviz_plugin: # rviz on Qt 6 From 2205e1a1b94f1dc9ae136fef3bf97251f557f7fa Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Sun, 22 Nov 2026 09:46:09 +0000 Subject: [PATCH 08/10] jazzy: slam_toolbox picks up the netlib BLAS pin blas-devel alone resolved to BLIS, whose libblas aborts at load on some aarch64 hosts, so rosidl_generator_py's find_package(Python3 NumPy) failed (import numpy aborted). Co-Authored-By: Claude Opus 5.5 --- distros/jazzy/patch/dependencies.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/distros/jazzy/patch/dependencies.yaml b/distros/jazzy/patch/dependencies.yaml index 4a38163c7..ee4243561 100644 --- a/distros/jazzy/patch/dependencies.yaml +++ b/distros/jazzy/patch/dependencies.yaml @@ -188,7 +188,9 @@ sdformat_vendor: add_run: ["sdformat14"] slam_toolbox: add_build: ["${{ 'qt6-main' if (build_platform != target_platform) }}"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "blas-devel"] + # libblas/libcblas: picks up the netlib pin; blas-devel alone resolved to BLIS, whose + # libblas aborts at load (CPU detection) on some aarch64 hosts and breaks `import numpy` + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "blas-devel", "libblas", "libcblas"] spatio_temporal_voxel_layer: add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "openvdb"] swri_console: From 547faca2a3d79e3c3f1625ade432ccb9dc3938de Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Sun, 22 Nov 2026 10:22:52 +0000 Subject: [PATCH 09/10] humble: slam_toolbox picks up the netlib BLAS pin (as on jazzy) Co-Authored-By: Claude Opus 5.5 --- distros/humble/patch/dependencies.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/distros/humble/patch/dependencies.yaml b/distros/humble/patch/dependencies.yaml index 2299027b8..dbe86ccba 100644 --- a/distros/humble/patch/dependencies.yaml +++ b/distros/humble/patch/dependencies.yaml @@ -157,7 +157,9 @@ rviz_ogre_vendor: add_run: ["assimp"] slam_toolbox: add_build: ["${{ 'qt6-main' if (build_platform != target_platform) }}"] - add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}"] + # libblas/libcblas: picks up the netlib pin; the blas-devel ceres brings in otherwise resolves + # to BLIS, whose libblas aborts at load (CPU detection) on some aarch64 hosts and breaks `import numpy` + add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "libblas", "libcblas"] spatio_temporal_voxel_layer: add_host: ["${{ 'libgl-devel' if linux }}", "${{ 'libopengl-devel' if linux }}", "openvdb"] spdlog_vendor: From ae8eb4858f395f1c821afbf7e7663e7cf3d90f7f Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Sun, 22 Nov 2026 14:50:00 +0000 Subject: [PATCH 10/10] humble, jazzy: rtabmap_rviz_plugins keeps shared's patch; bump jazzy gz_gui_vendor - rtabmap_rviz_plugins: the distro patches replaced shared/patch/ros2-rtabmap-rviz-plugins.patch and lost its Windows fix (RTABMAP_RVIZ_PLUGINS_BUILDING_DLL; win-64 failed with C2491, dllimport static data member) and its aarch64 message_filters fix. They are now shared's patch plus find_package(Qt6) instead of Qt5: before lyrical the plugin links rviz_common with ament_target_dependencies, which only gets Qt's include directories when Qt 6 has been found first. - gz_gui_vendor (jazzy): its recipe changed (qt-main only), so CI rebuilt it at the same build number; bump so the new build wins over the published one. Co-Authored-By: Claude Opus 5.5 --- .../patch/ros2-rtabmap-rviz-plugins.patch | 48 ++++++++++++++++--- .../patch/ros2-rtabmap-rviz-plugins.patch | 48 ++++++++++++++++--- distros/jazzy/pkg_additional_info.yaml | 2 + 3 files changed, 86 insertions(+), 12 deletions(-) diff --git a/distros/humble/patch/ros2-rtabmap-rviz-plugins.patch b/distros/humble/patch/ros2-rtabmap-rviz-plugins.patch index 84d00b385..9ce738710 100644 --- a/distros/humble/patch/ros2-rtabmap-rviz-plugins.patch +++ b/distros/humble/patch/ros2-rtabmap-rviz-plugins.patch @@ -1,22 +1,58 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4e47a684a..9e071e0b8 100644 +index 4e47a684a..db6f3c128 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -9,6 +9,7 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") +@@ -9,13 +9,14 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") # issues #1285 #1288 find_library( message_filters_LIB NAMES message_filters - PATHS "/opt/ros/$ENV{ROS_DISTRO}/lib" -+ # RoboStack: message_filters is in the conda prefix, not /opt/ros -+ PATHS "$ENV{PREFIX}/lib" "/opt/ros/$ENV{ROS_DISTRO}/lib" - NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH REQUIRED +- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH REQUIRED ++ REQUIRED ) -@@ -15,7 +15,7 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") endif() # Make sure it is first to prevent Qt6 from claiming the generic versionless targets first -find_package(Qt5 QUIET COMPONENTS Widgets) ++# RoboStack: rviz is Qt 6 here; before lyrical, ament_target_dependencies(rviz_common) only ++# gets its Qt include directories when Qt 6 has been found first +find_package(Qt6 QUIET COMPONENTS Widgets) find_package(ament_cmake_ros REQUIRED) find_package(pcl_conversions REQUIRED) +@@ -61,6 +62,26 @@ SET(AmentLibraries + rtabmap_msgs + ) + ++# RoboStack: with a Qt 5 RViz, keep Qt 6 out of this plugin. conda-forge's VTK links Qt 6 ++# (VTK::GUISupportQt/RenderingQt, reached through PCL and rtabmap::core) and so does rtabmap's ++# GUI (rtabmap::gui, exported by rtabmap_conversions). The plugin uses none of them. ++if(Qt5_FOUND) ++ set(_rs_qt6_regex "Qt6::|VTK::GUISupportQt|VTK::RenderingQt|rtabmap::gui|pcl_visualization") ++ get_property(_rs_imported_targets DIRECTORY PROPERTY IMPORTED_TARGETS) ++ foreach(_rs_target ${_rs_imported_targets}) ++ get_target_property(_rs_libs ${_rs_target} INTERFACE_LINK_LIBRARIES) ++ if(_rs_libs) ++ list(FILTER _rs_libs EXCLUDE REGEX "${_rs_qt6_regex}") ++ set_property(TARGET ${_rs_target} PROPERTY INTERFACE_LINK_LIBRARIES "${_rs_libs}") ++ endif() ++ endforeach() ++ foreach(_rs_pkg ${AmentLibraries}) ++ if(${_rs_pkg}_LIBRARIES) ++ list(FILTER ${_rs_pkg}_LIBRARIES EXCLUDE REGEX "${_rs_qt6_regex}") ++ endif() ++ endforeach() ++endif() ++ + ########### + ## Build ## + ########### +@@ -96,7 +117,7 @@ ENDIF() + + # Causes the visibility macros to use dllexport rather than dllimport, + # which is appropriate when building the dll but not consuming it. +-target_compile_definitions(rtabmap_rviz_plugins PRIVATE "RTABMAP_ROS_BUILDING_LIBRARY") ++target_compile_definitions(rtabmap_rviz_plugins PRIVATE "RTABMAP_RVIZ_PLUGINS_BUILDING_DLL") + + # prevent pluginlib from using boost + target_compile_definitions(rtabmap_rviz_plugins PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS") diff --git a/distros/jazzy/patch/ros2-rtabmap-rviz-plugins.patch b/distros/jazzy/patch/ros2-rtabmap-rviz-plugins.patch index 84d00b385..9ce738710 100644 --- a/distros/jazzy/patch/ros2-rtabmap-rviz-plugins.patch +++ b/distros/jazzy/patch/ros2-rtabmap-rviz-plugins.patch @@ -1,22 +1,58 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4e47a684a..9e071e0b8 100644 +index 4e47a684a..db6f3c128 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -9,6 +9,7 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") +@@ -9,13 +9,14 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") # issues #1285 #1288 find_library( message_filters_LIB NAMES message_filters - PATHS "/opt/ros/$ENV{ROS_DISTRO}/lib" -+ # RoboStack: message_filters is in the conda prefix, not /opt/ros -+ PATHS "$ENV{PREFIX}/lib" "/opt/ros/$ENV{ROS_DISTRO}/lib" - NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH REQUIRED +- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH REQUIRED ++ REQUIRED ) -@@ -15,7 +15,7 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") endif() # Make sure it is first to prevent Qt6 from claiming the generic versionless targets first -find_package(Qt5 QUIET COMPONENTS Widgets) ++# RoboStack: rviz is Qt 6 here; before lyrical, ament_target_dependencies(rviz_common) only ++# gets its Qt include directories when Qt 6 has been found first +find_package(Qt6 QUIET COMPONENTS Widgets) find_package(ament_cmake_ros REQUIRED) find_package(pcl_conversions REQUIRED) +@@ -61,6 +62,26 @@ SET(AmentLibraries + rtabmap_msgs + ) + ++# RoboStack: with a Qt 5 RViz, keep Qt 6 out of this plugin. conda-forge's VTK links Qt 6 ++# (VTK::GUISupportQt/RenderingQt, reached through PCL and rtabmap::core) and so does rtabmap's ++# GUI (rtabmap::gui, exported by rtabmap_conversions). The plugin uses none of them. ++if(Qt5_FOUND) ++ set(_rs_qt6_regex "Qt6::|VTK::GUISupportQt|VTK::RenderingQt|rtabmap::gui|pcl_visualization") ++ get_property(_rs_imported_targets DIRECTORY PROPERTY IMPORTED_TARGETS) ++ foreach(_rs_target ${_rs_imported_targets}) ++ get_target_property(_rs_libs ${_rs_target} INTERFACE_LINK_LIBRARIES) ++ if(_rs_libs) ++ list(FILTER _rs_libs EXCLUDE REGEX "${_rs_qt6_regex}") ++ set_property(TARGET ${_rs_target} PROPERTY INTERFACE_LINK_LIBRARIES "${_rs_libs}") ++ endif() ++ endforeach() ++ foreach(_rs_pkg ${AmentLibraries}) ++ if(${_rs_pkg}_LIBRARIES) ++ list(FILTER ${_rs_pkg}_LIBRARIES EXCLUDE REGEX "${_rs_qt6_regex}") ++ endif() ++ endforeach() ++endif() ++ + ########### + ## Build ## + ########### +@@ -96,7 +117,7 @@ ENDIF() + + # Causes the visibility macros to use dllexport rather than dllimport, + # which is appropriate when building the dll but not consuming it. +-target_compile_definitions(rtabmap_rviz_plugins PRIVATE "RTABMAP_ROS_BUILDING_LIBRARY") ++target_compile_definitions(rtabmap_rviz_plugins PRIVATE "RTABMAP_RVIZ_PLUGINS_BUILDING_DLL") + + # prevent pluginlib from using boost + target_compile_definitions(rtabmap_rviz_plugins PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS") diff --git a/distros/jazzy/pkg_additional_info.yaml b/distros/jazzy/pkg_additional_info.yaml index ec233d7a9..416a78843 100644 --- a/distros/jazzy/pkg_additional_info.yaml +++ b/distros/jazzy/pkg_additional_info.yaml @@ -160,6 +160,8 @@ fuse_viz: # rviz on Qt 6 build_number: 32 grid_map_rviz_plugin: # rviz on Qt 6 build_number: 32 +gz_gui_vendor: # only qt-main now (the Qt rosdep keys map to Qt 6); was mixed qt-main + qt6-main + build_number: 32 moveit_ros_visualization: # rviz on Qt 6 build_number: 32 moveit_setup_app_plugins: # rviz on Qt 6