From c4b4e263677bc15feed24aaf2b60a08cf8860b5b Mon Sep 17 00:00:00 2001 From: Francisco Miguel Moreno Date: Tue, 3 Feb 2026 16:02:19 +0100 Subject: [PATCH 1/3] Update CI to use container workers --- .github/workflows/humble.yaml | 10 +++------- .github/workflows/humble_cron.yaml | 10 +++------- .github/workflows/jazzy.yaml | 10 +++------- .github/workflows/jazzy_cron.yaml | 10 +++------- .github/workflows/kilted.yaml | 10 +++------- .github/workflows/kilted_cron.yaml | 10 +++------- .github/workflows/rolling.yaml | 10 +++------- .github/workflows/rolling_cron.yaml | 10 +++------- 8 files changed, 24 insertions(+), 56 deletions(-) diff --git a/.github/workflows/humble.yaml b/.github/workflows/humble.yaml index 35fd8f8..b872da0 100644 --- a/.github/workflows/humble.yaml +++ b/.github/workflows/humble.yaml @@ -9,19 +9,15 @@ on: - humble jobs: build-and-test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-22.04] - fail-fast: false + runs-on: ubuntu-22.04 + container: + image: ubuntu:jammy steps: - uses: actions/checkout@v4 with: ref: humble - name: Setup ROS 2 uses: ros-tooling/setup-ros@0.7.15 - with: - required-ros-distributions: humble - name: build and test uses: ros-tooling/action-ros-ci@0.4.5 with: diff --git a/.github/workflows/humble_cron.yaml b/.github/workflows/humble_cron.yaml index e08d607..061a43d 100644 --- a/.github/workflows/humble_cron.yaml +++ b/.github/workflows/humble_cron.yaml @@ -5,19 +5,15 @@ on: - cron: '0 0 * * 6' jobs: build-and-test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-22.04] - fail-fast: false + runs-on: ubuntu-22.04 + container: + image: ubuntu:jammy steps: - uses: actions/checkout@v4 with: ref: humble - name: Setup ROS 2 uses: ros-tooling/setup-ros@0.7.15 - with: - required-ros-distributions: humble - name: build and test uses: ros-tooling/action-ros-ci@0.4.5 with: diff --git a/.github/workflows/jazzy.yaml b/.github/workflows/jazzy.yaml index 5aa2840..558b75c 100644 --- a/.github/workflows/jazzy.yaml +++ b/.github/workflows/jazzy.yaml @@ -9,19 +9,15 @@ on: - jazzy jobs: build-and-test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-24.04] - fail-fast: false + runs-on: ubuntu-24.04 + container: + image: ubuntu:noble steps: - uses: actions/checkout@v4 with: ref: jazzy - name: Setup ROS 2 uses: ros-tooling/setup-ros@0.7.15 - with: - required-ros-distributions: jazzy - name: build and test uses: ros-tooling/action-ros-ci@0.4.5 with: diff --git a/.github/workflows/jazzy_cron.yaml b/.github/workflows/jazzy_cron.yaml index ca6bfca..85c2a30 100644 --- a/.github/workflows/jazzy_cron.yaml +++ b/.github/workflows/jazzy_cron.yaml @@ -5,19 +5,15 @@ on: - cron: '0 0 * * 6' jobs: build-and-test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-24.04] - fail-fast: false + runs-on: ubuntu-24.04 + container: + image: ubuntu:noble steps: - uses: actions/checkout@v4 with: ref: jazzy - name: Setup ROS 2 uses: ros-tooling/setup-ros@0.7.15 - with: - required-ros-distributions: jazzy - name: build and test uses: ros-tooling/action-ros-ci@0.4.5 with: diff --git a/.github/workflows/kilted.yaml b/.github/workflows/kilted.yaml index cdd9384..c5b75e6 100644 --- a/.github/workflows/kilted.yaml +++ b/.github/workflows/kilted.yaml @@ -9,19 +9,15 @@ on: - kilted jobs: build-and-test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-24.04] - fail-fast: false + runs-on: ubuntu-24.04 + container: + image: ubuntu:noble steps: - uses: actions/checkout@v4 with: ref: kilted - name: Setup ROS 2 uses: ros-tooling/setup-ros@0.7.15 - with: - required-ros-distributions: kilted - name: build and test uses: ros-tooling/action-ros-ci@0.4.5 with: diff --git a/.github/workflows/kilted_cron.yaml b/.github/workflows/kilted_cron.yaml index 3d1ba39..df98c2f 100644 --- a/.github/workflows/kilted_cron.yaml +++ b/.github/workflows/kilted_cron.yaml @@ -5,19 +5,15 @@ on: - cron: '0 0 * * 6' jobs: build-and-test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-24.04] - fail-fast: false + runs-on: ubuntu-24.04 + container: + image: ubuntu:noble steps: - uses: actions/checkout@v4 with: ref: kilted - name: Setup ROS 2 uses: ros-tooling/setup-ros@0.7.15 - with: - required-ros-distributions: kilted - name: build and test uses: ros-tooling/action-ros-ci@0.4.5 with: diff --git a/.github/workflows/rolling.yaml b/.github/workflows/rolling.yaml index e50131c..8d5ec03 100644 --- a/.github/workflows/rolling.yaml +++ b/.github/workflows/rolling.yaml @@ -9,19 +9,15 @@ on: - rolling jobs: build-and-test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-24.04] - fail-fast: false + runs-on: ubuntu-24.04 + container: + image: ubuntu:noble steps: - uses: actions/checkout@v4 with: ref: rolling - name: Setup ROS 2 uses: ros-tooling/setup-ros@0.7.15 - with: - required-ros-distributions: rolling - name: build and test uses: ros-tooling/action-ros-ci@0.4.5 with: diff --git a/.github/workflows/rolling_cron.yaml b/.github/workflows/rolling_cron.yaml index 039d9f9..4134591 100644 --- a/.github/workflows/rolling_cron.yaml +++ b/.github/workflows/rolling_cron.yaml @@ -5,19 +5,15 @@ on: - cron: '0 0 * * 6' jobs: build-and-test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-24.04] - fail-fast: false + runs-on: ubuntu-24.04 + container: + image: ubuntu:noble steps: - uses: actions/checkout@v4 with: ref: rolling - name: Setup ROS 2 uses: ros-tooling/setup-ros@0.7.15 - with: - required-ros-distributions: rolling - name: build and test uses: ros-tooling/action-ros-ci@0.4.5 with: From 5e0103761417e4e9d7e5f6b8ae6d6cb2247c61c1 Mon Sep 17 00:00:00 2001 From: estherag Date: Fri, 6 Feb 2026 09:24:46 +0100 Subject: [PATCH 2/3] PCL private linkage: avoid Qt5/6 conflicts --- navmap_ros/CMakeLists.txt | 7 +++++-- navmap_rviz_plugin/CMakeLists.txt | 18 ------------------ 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/navmap_ros/CMakeLists.txt b/navmap_ros/CMakeLists.txt index e2b6a3e..cb2e721 100644 --- a/navmap_ros/CMakeLists.txt +++ b/navmap_ros/CMakeLists.txt @@ -28,16 +28,18 @@ target_include_directories(${PROJECT_NAME} PUBLIC $ ${PCL_INCLUDE_DIRS} ) +target_link_libraries(${PROJECT_NAME} PRIVATE + pcl_conversions::pcl_conversions + ${PCL_LIBRARIES} +) target_link_libraries(${PROJECT_NAME} PUBLIC rclcpp::rclcpp navmap_core::navmap_core - pcl_conversions::pcl_conversions ${navmap_ros_interfaces_TARGETS} ${geometry_msgs_TARGETS} ${nav_msgs_TARGETS} ${sensor_msgs_TARGETS} ${std_srvs_TARGETS} - ${PCL_LIBRARIES} ) add_executable(slam_server_app src/slam_server_app.cpp @@ -76,6 +78,7 @@ ament_export_dependencies( rclcpp navmap_core navmap_ros_interfaces + nav_msgs geometry_msgs sensor_msgs std_srvs diff --git a/navmap_rviz_plugin/CMakeLists.txt b/navmap_rviz_plugin/CMakeLists.txt index e33505b..c1dd3b8 100644 --- a/navmap_rviz_plugin/CMakeLists.txt +++ b/navmap_rviz_plugin/CMakeLists.txt @@ -1,14 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(navmap_rviz_plugin) -# 1) Qt y AUTOMOC -find_package(Qt5 REQUIRED COMPONENTS Core Widgets) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_AUTOUIC ON) - -# add_definitions(-DQT_NO_KEYWORDS) - find_package(ament_cmake REQUIRED) find_package(rclcpp REQUIRED) find_package(rviz_common REQUIRED) @@ -23,12 +15,6 @@ find_package(navmap_core REQUIRED) set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED ON) -qt5_wrap_cpp(NAVMAP_MOC_SRCS - include/navmap_rviz_plugin/NavMapDisplay.hpp - include/navmap_rviz_plugin/navmap_goal_tool.hpp - include/navmap_rviz_plugin/navmap_pose_tool.hpp -) - add_library(${PROJECT_NAME} SHARED src/navmap_rviz_plugin/NavMapDisplay.cpp src/navmap_rviz_plugin/navmap_goal_tool.cpp @@ -36,7 +22,6 @@ add_library(${PROJECT_NAME} SHARED include/navmap_rviz_plugin/NavMapDisplay.hpp include/navmap_rviz_plugin/navmap_goal_tool.hpp include/navmap_rviz_plugin/navmap_pose_tool.hpp - ${NAVMAP_MOC_SRCS} ) target_link_libraries(navmap_rviz_plugin PUBLIC ${navmap_ros_interfaces_TARGETS} @@ -47,8 +32,6 @@ target_link_libraries(navmap_rviz_plugin PUBLIC rviz_common::rviz_common rviz_rendering::rviz_rendering rviz_default_plugins::rviz_default_plugins - Qt5::Core - Qt5::Widgets ) target_include_directories(${PROJECT_NAME} PUBLIC $ @@ -89,7 +72,6 @@ ament_export_dependencies( rviz_common rviz_rendering rviz_default_plugins - Qt5 navmap_ros_interfaces geometry_msgs std_msg From 6c50808e7a2b34ccba78be9fa6741afc63e1d134 Mon Sep 17 00:00:00 2001 From: estherag Date: Fri, 6 Feb 2026 11:40:54 +0100 Subject: [PATCH 3/3] Set Qt6 references and moc to proper plugin export --- navmap_rviz_plugin/CMakeLists.txt | 38 +++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/navmap_rviz_plugin/CMakeLists.txt b/navmap_rviz_plugin/CMakeLists.txt index c1dd3b8..f61fe14 100644 --- a/navmap_rviz_plugin/CMakeLists.txt +++ b/navmap_rviz_plugin/CMakeLists.txt @@ -1,6 +1,12 @@ cmake_minimum_required(VERSION 3.10) project(navmap_rviz_plugin) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(CMAKE_CXX_STANDARD 23) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + find_package(ament_cmake REQUIRED) find_package(rclcpp REQUIRED) find_package(rviz_common REQUIRED) @@ -12,19 +18,40 @@ find_package(navmap_ros_interfaces REQUIRED) find_package(navmap_ros REQUIRED) find_package(navmap_core REQUIRED) -set(CMAKE_CXX_STANDARD 23) -set(CMAKE_CXX_STANDARD_REQUIRED ON) +find_package(QT NAMES Qt6 REQUIRED COMPONENTS Widgets Core) +find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets Core) + +set(QT_LIBRARIES + Qt${QT_VERSION_MAJOR}::Core + Qt${QT_VERSION_MAJOR}::Gui +) + +set(NAVMAP_MOC_SRCS + include/navmap_rviz_plugin/NavMapDisplay.hpp + include/navmap_rviz_plugin/navmap_goal_tool.hpp + include/navmap_rviz_plugin/navmap_pose_tool.hpp +) + +if (${QT_VERSION_MAJOR} GREATER "5") + qt_standard_project_setup() + qt_wrap_cpp(NAVMAP_MOC_SRCS + include/navmap_rviz_plugin/NavMapDisplay.hpp + include/navmap_rviz_plugin/navmap_goal_tool.hpp + include/navmap_rviz_plugin/navmap_pose_tool.hpp +) +endif() add_library(${PROJECT_NAME} SHARED src/navmap_rviz_plugin/NavMapDisplay.cpp src/navmap_rviz_plugin/navmap_goal_tool.cpp src/navmap_rviz_plugin/navmap_pose_tool.cpp - include/navmap_rviz_plugin/NavMapDisplay.hpp - include/navmap_rviz_plugin/navmap_goal_tool.hpp - include/navmap_rviz_plugin/navmap_pose_tool.hpp + ${NAVMAP_MOC_SRCS} ) target_link_libraries(navmap_rviz_plugin PUBLIC ${navmap_ros_interfaces_TARGETS} + ${QT_QTCORE_LIBRARY} + ${QT_QTGUI_LIBRARY} + Qt${QT_VERSION_MAJOR}::Widgets navmap_ros::navmap_ros navmap_core::navmap_core pluginlib::pluginlib @@ -67,6 +94,7 @@ endif() ament_export_libraries(${PROJECT_NAME}) ament_export_targets(export_${PROJECT_NAME}) ament_export_dependencies( + Qt6 rclcpp pluginlib rviz_common