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: 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..f61fe14 100644 --- a/navmap_rviz_plugin/CMakeLists.txt +++ b/navmap_rviz_plugin/CMakeLists.txt @@ -1,13 +1,11 @@ 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) +set(CMAKE_CXX_STANDARD 23) +set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(ament_cmake REQUIRED) find_package(rclcpp REQUIRED) @@ -20,26 +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) -qt5_wrap_cpp(NAVMAP_MOC_SRCS +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 @@ -47,8 +59,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 $ @@ -84,12 +94,12 @@ endif() ament_export_libraries(${PROJECT_NAME}) ament_export_targets(export_${PROJECT_NAME}) ament_export_dependencies( + Qt6 rclcpp pluginlib rviz_common rviz_rendering rviz_default_plugins - Qt5 navmap_ros_interfaces geometry_msgs std_msg