From e824da55fe1a454df671e68fcf02c241298cad69 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Sat, 10 Oct 2026 22:33:42 +1000 Subject: [PATCH] Name every patch after a package of its distribution vinca applies distros//patch/ros2-[.].patch only when is a package of the distribution, so 23 patch files were silently never applied. Rename the misnamed ones that are still needed (rosidl_cli in all distributions, rmw_implementation_cmake in jazzy) and delete the rest: their package isn't in the distribution, or (jazzy joint_limits, ament_cmake_vendor_package) upstream or an existing patch already has the change. The rosidl_cli patch now installs the completions like ros2cli's (#70): completions/rosidl, site-functions/_rosidl and, on lyrical and rolling, vendor_completions.d/rosidl.fish. Its test (shared/tests/ros2-rosidl.yaml) was misnamed too and moves to ros2-rosidl-cli.yaml. Bump the build numbers of the packages whose output changes. `rs check` now fails for a patch that names no package of its distribution (or, for shared/patch, of any distribution). Co-Authored-By: Claude Opus 5.5 --- distros/humble/patch/ros2-embree-vendor.patch | 22 - distros/humble/patch/ros2-mrpt2.patch | 846 ------------------ .../patch/ros2-nav2-recoveries.win.patch | 13 - distros/humble/patch/ros2-rosidl-cli.patch | 42 + distros/humble/patch/ros2-rosidl.patch | 33 - distros/humble/pkg_additional_info.yaml | 3 + .../patch/ros2-cmake-vendor-package.patch | 164 ---- .../jazzy/patch/ros2-iceoryx-dds.win.patch | 15 - .../patch/ros2-joint-limits-skip.win.patch | 12 - ...> ros2-rmw-implementation-cmake.osx.patch} | 0 distros/jazzy/patch/ros2-rosidl-cli.patch | 42 + distros/jazzy/patch/ros2-rosidl.patch | 31 - distros/jazzy/pkg_additional_info.yaml | 6 + .../lyrical/patch/ros2-grid-map-pcl.osx.patch | 16 - .../lyrical/patch/ros2-parameter-traits.patch | 13 - distros/lyrical/patch/ros2-rosidl-cli.patch | 54 ++ distros/lyrical/patch/ros2-rosidl.patch | 31 - .../patch/ros2-turtlebot3-node.win.patch | 17 - distros/lyrical/pkg_additional_info.yaml | 3 + .../patch/ros2-grid-map-core.osx.patch | 27 - .../rolling/patch/ros2-grid-map-core.patch | 28 - .../rolling/patch/ros2-grid-map-pcl.osx.patch | 16 - .../rolling/patch/ros2-parameter-traits.patch | 13 - distros/rolling/patch/ros2-rosidl-cli.patch | 54 ++ distros/rolling/patch/ros2-rosidl.patch | 31 - distros/rolling/patch/ros2-rplidar-ros.patch | 49 - distros/rolling/patch/ros2-sbg-driver.patch | 79 -- .../rolling/patch/ros2-sbg-driver.win.patch | 21 - .../rolling/patch/ros2-slam-toolbox.win.patch | 212 ----- .../patch/ros2-turtlebot3-node.win.patch | 17 - distros/rolling/pkg_additional_info.yaml | 3 + shared/tests/ros2-rosidl-cli.yaml | 14 + shared/tests/ros2-rosidl.yaml | 7 - tools/maintenance.py | 26 +- tools/tests/test_patch_names.py | 18 + 35 files changed, 262 insertions(+), 1716 deletions(-) delete mode 100644 distros/humble/patch/ros2-embree-vendor.patch delete mode 100644 distros/humble/patch/ros2-mrpt2.patch delete mode 100644 distros/humble/patch/ros2-nav2-recoveries.win.patch create mode 100644 distros/humble/patch/ros2-rosidl-cli.patch delete mode 100644 distros/humble/patch/ros2-rosidl.patch delete mode 100644 distros/jazzy/patch/ros2-cmake-vendor-package.patch delete mode 100644 distros/jazzy/patch/ros2-iceoryx-dds.win.patch delete mode 100644 distros/jazzy/patch/ros2-joint-limits-skip.win.patch rename distros/jazzy/patch/{ros2-rwm-implementation-cmake.osx.patch => ros2-rmw-implementation-cmake.osx.patch} (100%) create mode 100644 distros/jazzy/patch/ros2-rosidl-cli.patch delete mode 100644 distros/jazzy/patch/ros2-rosidl.patch delete mode 100644 distros/lyrical/patch/ros2-grid-map-pcl.osx.patch delete mode 100644 distros/lyrical/patch/ros2-parameter-traits.patch create mode 100644 distros/lyrical/patch/ros2-rosidl-cli.patch delete mode 100644 distros/lyrical/patch/ros2-rosidl.patch delete mode 100644 distros/lyrical/patch/ros2-turtlebot3-node.win.patch delete mode 100644 distros/rolling/patch/ros2-grid-map-core.osx.patch delete mode 100644 distros/rolling/patch/ros2-grid-map-core.patch delete mode 100644 distros/rolling/patch/ros2-grid-map-pcl.osx.patch delete mode 100644 distros/rolling/patch/ros2-parameter-traits.patch create mode 100644 distros/rolling/patch/ros2-rosidl-cli.patch delete mode 100644 distros/rolling/patch/ros2-rosidl.patch delete mode 100644 distros/rolling/patch/ros2-rplidar-ros.patch delete mode 100644 distros/rolling/patch/ros2-sbg-driver.patch delete mode 100644 distros/rolling/patch/ros2-sbg-driver.win.patch delete mode 100644 distros/rolling/patch/ros2-slam-toolbox.win.patch delete mode 100644 distros/rolling/patch/ros2-turtlebot3-node.win.patch create mode 100644 shared/tests/ros2-rosidl-cli.yaml delete mode 100644 shared/tests/ros2-rosidl.yaml create mode 100644 tools/tests/test_patch_names.py diff --git a/distros/humble/patch/ros2-embree-vendor.patch b/distros/humble/patch/ros2-embree-vendor.patch deleted file mode 100644 index 1727da7be..000000000 --- a/distros/humble/patch/ros2-embree-vendor.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7032216..a2d180f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -24,6 +24,8 @@ macro(build_embree) - set(cmake_configure_args - -Wno-dev - -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_install -+ -DEMBREE_TUTORIALS=OFF -+ -DEMBREE_STATIC_LIB=ON - -DEMBREE_ISPC_SUPPORT=OFF) - - include(ExternalProject) -@@ -63,7 +65,7 @@ macro(build_tbb) - ) - endmacro(build_tbb) - --build_tbb() -+# build_tbb() - build_embree() - - ament_export_include_directories(include) diff --git a/distros/humble/patch/ros2-mrpt2.patch b/distros/humble/patch/ros2-mrpt2.patch deleted file mode 100644 index a43970fd5..000000000 --- a/distros/humble/patch/ros2-mrpt2.patch +++ /dev/null @@ -1,846 +0,0 @@ -diff --git a/3rdparty/nanogui/CMakeLists.txt b/3rdparty/nanogui/CMakeLists.txt -index 5918d38..a48713e 100644 ---- a/3rdparty/nanogui/CMakeLists.txt -+++ b/3rdparty/nanogui/CMakeLists.txt -@@ -62,13 +62,16 @@ macro(CHECK_CXX_COMPILER_AND_LINKER_FLAGS _RESULT _CXX_FLAGS _LINKER_FLAGS) - endmacro() - - # GLFW: Build from sources in Windows, use system version in UNIX: --find_package(PkgConfig QUIET) -+# find_package(PkgConfig QUIET) - --if (PKG_CONFIG_FOUND) -- pkg_search_module(GLFW glfw3) --endif() -+# if (PKG_CONFIG_FOUND) -+# pkg_search_module(GLFW glfw3) -+# endif() -+ -+find_package(glfw3) -+set(GLFW_LIBRARIES glfw) - --if (GLFW_FOUND) -+if (glfw3_FOUND) - message(STATUS "GLFW: System library found.") - #include_directories(${GLFW_INCLUDE_DIRS}) - #target_link_libraries(simple ${GLFW_LIBRARIES}) -@@ -377,7 +380,8 @@ elseif (APPLE) - find_library(iokit_library IOKit) - target_link_libraries(${PROJECT_NAME} PRIVATE ${cocoa_library} ${opengl_library} ${corevideo_library} ${iokit_library}) - elseif(CMAKE_SYSTEM MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "BSD") -- target_link_libraries(${PROJECT_NAME} PRIVATE GL Xxf86vm Xrandr X11 pthread) # Xinerama Xcursor Xi -+ find_package(X11) -+ target_link_libraries(${PROJECT_NAME} PRIVATE GL pthread ${X11_LIBRARIES}) # Xinerama Xcursor Xi - if (NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD") - target_link_libraries(${PROJECT_NAME} PRIVATE rt) - endif() -@@ -414,7 +418,7 @@ endif() - set_target_properties(${PROJECT_NAME} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS 0) - - # Includes: GLFW --if (GLFW_FOUND) -+if (glfw3_FOUND) - target_include_directories(${PROJECT_NAME} PUBLIC ${GLFW_INCLUDE_DIRS}) - target_link_libraries(${PROJECT_NAME} PUBLIC ${GLFW_LIBRARIES}) - else() -@@ -500,7 +504,7 @@ if (NANOGUI_INSTALL AND EXISTS "${MRPT_SOURCE_DIR}/parse-files/mrpt-xxx-config.c - ) - # 2/3: config file with manual list of dependencies: - set(MRPT_MODULE_NAME nanogui) -- if (NOT GLFW_FOUND) # for windows builds, mainly -+ if (NOT glfw3_FOUND) # for windows builds, mainly - set(ALL_DEPS_LIST glfw) - endif() - configure_file( -@@ -574,7 +578,7 @@ if (NANOGUI_INSTALL AND EXISTS "${MRPT_SOURCE_DIR}/parse-files/mrpt-xxx-config.c - ) - - # GLFW3 if not present in the system: -- if (NOT GLFW_FOUND) -+ if (NOT glfw3_FOUND) - # - install(DIRECTORY - ext/glfw/include/GLFW -diff --git a/apps/benchmarking-image-features/src/mainwindow.h b/apps/benchmarking-image-features/src/mainwindow.h -index 898de8f..7e27ae7 100644 ---- a/apps/benchmarking-image-features/src/mainwindow.h -+++ b/apps/benchmarking-image-features/src/mainwindow.h -@@ -215,7 +215,7 @@ class MainWindow : public QMainWindow - //! monocular single dataset - int tracking_image_counter; //!< counter for moving forward in the dataset - -- Tracker tracker_obj; // files_fullpath_tracking, int tracking_image_counter, - int remove_lost_feats, int add_new_feats, int max_feats, int patch_size, - int window_width, int window_height) -diff --git a/apps/benchmarking-image-features/src/tracker.h b/apps/benchmarking-image-features/src/tracker.h -index 36fe1bb..4ffb876 100644 ---- a/apps/benchmarking-image-features/src/tracker.h -+++ b/apps/benchmarking-image-features/src/tracker.h -@@ -51,10 +51,10 @@ using namespace mrpt::vision; - using namespace mrpt::math; - using namespace mrpt::img; - using namespace mrpt; --using namespace cv; -+//using namespace cv; - using namespace std; - --class Tracker -+class MRPTTracker - { - public: - bool hasResolution; -@@ -81,7 +81,7 @@ class Tracker - /** - * Tracker constructor to initialize the varibales for the tracker - */ -- Tracker(); -+ MRPTTracker(); - - /** - * trackThemAll this function tracks the features based on the parameters -diff --git a/cmakemodules/FindCSparse.cmake b/cmakemodules/FindCSparse.cmake -new file mode 100644 -index 0000000..5e21ffc ---- /dev/null -+++ b/cmakemodules/FindCSparse.cmake -@@ -0,0 +1,28 @@ -+# Look for csparse; note the difference in the directory specifications! -+find_path(CSPARSE_INCLUDE_DIR NAMES cs.h -+ PATHS -+ /usr/include/suitesparse -+ /usr/include -+ /opt/local/include -+ /usr/local/include -+ /sw/include -+ /usr/include/ufsparse -+ /opt/local/include/ufsparse -+ /usr/local/include/ufsparse -+ /sw/include/ufsparse -+ PATH_SUFFIXES -+ suitesparse -+ ) -+ -+find_library(CSPARSE_LIBRARY NAMES cxsparse libcxsparse -+ PATHS -+ /usr/lib -+ /usr/local/lib -+ /opt/local/lib -+ /sw/lib -+ ) -+ -+include(FindPackageHandleStandardArgs) -+find_package_handle_standard_args(CSparse DEFAULT_MSG -+ CSPARSE_INCLUDE_DIR CSPARSE_LIBRARY) -+ -diff --git a/cmakemodules/FindFTDI.cmake b/cmakemodules/FindFTDI.cmake -new file mode 100644 -index 0000000..c442527 ---- /dev/null -+++ b/cmakemodules/FindFTDI.cmake -@@ -0,0 +1,38 @@ -+# SPDX-FileCopyrightText: 2012-2021 Istituto Italiano di Tecnologia (IIT) -+# SPDX-FileCopyrightText: 2010 Ze Ji -+# SPDX-License-Identifier: BSD-3-Clause -+ -+#[=======================================================================[.rst: -+FindFTDI -+-------- -+ -+Try to find ftdi. -+Once done this will define:: -+ -+ FTDI_FOUND - system has ftdi -+ FTDI_INCLUDE_DIR - ~ the ftdi include directory -+ FTDI_LIBRARY - Link these to use ftdi -+#]=======================================================================] -+ -+include(FindPackageHandleStandardArgs) -+ -+find_path(FTDI_INCLUDE_DIR -+ NAMES ftdi.h libftdi1/ftdi.h -+ PATHS /usr/local/include -+ /usr/include -+ /usr/include/libftdi -+ /usr/local/include/libftdi) -+ -+find_library(FTDI_LIBRARY -+ NAMES ftdi ftdi1 -+ PATHS /usr/lib -+ /usr/local/lib) -+ -+find_package_handle_standard_args(FTDI DEFAULT_MSG FTDI_LIBRARY) -+ -+# Set package properties if FeatureSummary was included -+if(COMMAND set_package_properties) -+ set_package_properties(FTDI PROPERTIES DESCRIPTION "libFTDI - FTDI USB driver with bitbang mode") -+ set_package_properties(FTDI PROPERTIES URL "http://www.intra2net.com/en/developer/libftdi/") -+endif() -+ -diff --git a/cmakemodules/FindJsonCpp.cmake b/cmakemodules/FindJsonCpp.cmake -new file mode 100644 -index 0000000..7520442 ---- /dev/null -+++ b/cmakemodules/FindJsonCpp.cmake -@@ -0,0 +1,33 @@ -+find_path(JsonCpp_INCLUDE_DIR "json/json.h" -+ PATH_SUFFIXES "jsoncpp" -+ DOC "jsoncpp include directory") -+mark_as_advanced(JsonCpp_INCLUDE_DIR) -+ -+find_library(JsonCpp_LIBRARY -+ NAMES jsoncpp -+ DOC "jsoncpp library") -+mark_as_advanced(JsonCpp_LIBRARY) -+ -+if (JsonCpp_INCLUDE_DIR AND EXISTS "${JsonCpp_INCLUDE_DIR}/json/version.h") -+ file(STRINGS "${JsonCpp_INCLUDE_DIR}/json/version.h" _JsonCpp_version_lines -+ REGEX "JSONCPP_VERSION_[A-Z]+") -+ string(REGEX REPLACE ".*# *define +JSONCPP_VERSION_MAJOR +([0-9]+).*" "\\1" _JsonCpp_version_major "${_JsonCpp_version_lines}") -+ string(REGEX REPLACE ".*# *define +JSONCPP_VERSION_MINOR +([0-9]+).*" "\\1" _JsonCpp_version_minor "${_JsonCpp_version_lines}") -+ string(REGEX REPLACE ".*# *define +JSONCPP_VERSION_PATCH +([0-9]+).*" "\\1" _JsonCpp_version_patch "${_JsonCpp_version_lines}") -+ set(JsonCpp_VERSION "${_JsonCpp_version_major}.${_JsonCpp_version_minor}.${_JsonCpp_version_patch}") -+ unset(_JsonCpp_version_major) -+ unset(_JsonCpp_version_minor) -+ unset(_JsonCpp_version_patch) -+ unset(_JsonCpp_version_lines) -+endif () -+ -+include(FindPackageHandleStandardArgs) -+find_package_handle_standard_args(JsonCpp -+ REQUIRED_VARS JsonCpp_LIBRARY JsonCpp_INCLUDE_DIR -+ VERSION_VAR JsonCpp_VERSION) -+ -+if (JsonCpp_FOUND) -+ set(JsonCpp_INCLUDE_DIRS "${JsonCpp_INCLUDE_DIR}") -+ set(JsonCpp_LIBRARIES "${JsonCpp_LIBRARY}") -+endif () -+ -diff --git a/cmakemodules/Findlibusb-1.0.cmake b/cmakemodules/Findlibusb-1.0.cmake -index 6c8e5e7..92993ac 100644 ---- a/cmakemodules/Findlibusb-1.0.cmake -+++ b/cmakemodules/Findlibusb-1.0.cmake -@@ -81,11 +81,11 @@ else (LIBUSB_1_LIBRARIES AND LIBUSB_1_INCLUDE_DIRS) - endif (LIBUSB_1_INCLUDE_DIRS AND LIBUSB_1_LIBRARIES) - - if (LIBUSB_1_FOUND) -- if ($ENV{VERBOSE}) -+ # if ($ENV{VERBOSE}) - message(STATUS "Found libusb-1.0:") - message(STATUS " - Includes: ${LIBUSB_1_INCLUDE_DIRS}") - message(STATUS " - Libraries: ${LIBUSB_1_LIBRARIES}") -- endif ($ENV{VERBOSE}) -+ # endif ($ENV{VERBOSE}) - else (LIBUSB_1_FOUND) - if (libusb_1_FIND_REQUIRED) - message(FATAL_ERROR "Could not find libusb") -@@ -95,4 +95,4 @@ else (LIBUSB_1_LIBRARIES AND LIBUSB_1_INCLUDE_DIRS) - # show the LIBUSB_1_INCLUDE_DIRS and LIBUSB_1_LIBRARIES variables only in the advanced view - mark_as_advanced(LIBUSB_1_INCLUDE_DIRS LIBUSB_1_LIBRARIES) - --endif (LIBUSB_1_LIBRARIES AND LIBUSB_1_INCLUDE_DIRS) -\ No newline at end of file -+endif (LIBUSB_1_LIBRARIES AND LIBUSB_1_INCLUDE_DIRS) -diff --git a/cmakemodules/Findudev.cmake b/cmakemodules/Findudev.cmake -new file mode 100644 -index 0000000..f91e893 ---- /dev/null -+++ b/cmakemodules/Findudev.cmake -@@ -0,0 +1,77 @@ -+# - try to find the udev library -+# -+# Cache Variables: (probably not for direct use in your scripts) -+# UDEV_INCLUDE_DIR -+# UDEV_SOURCE_DIR -+# UDEV_LIBRARY -+# -+# Non-cache variables you might use in your CMakeLists.txt: -+# UDEV_FOUND -+# UDEV_INCLUDE_DIRS -+# UDEV_LIBRARIES -+# -+# Requires these CMake modules: -+# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) -+# -+# Original Author: -+# Copyright 2014 Kevin M. Godby -+# SPDX-License-Identifier: BSL-1.0 -+# -+# Distributed under the Boost Software License, Version 1.0. -+# (See accompanying file LICENSE_1_0.txt or copy at -+# http://www.boost.org/LICENSE_1_0.txt) -+ -+set(UDEV_ROOT_DIR -+ "${UDEV_ROOT_DIR}" -+ CACHE -+ PATH -+ "Directory to search for udev") -+ -+find_package(PkgConfig QUIET) -+if(PKG_CONFIG_FOUND) -+ pkg_check_modules(PC_LIBUDEV libudev) -+endif() -+ -+find_library(UDEV_LIBRARY -+ NAMES -+ udev -+ PATHS -+ ${PC_LIBUDEV_LIBRARY_DIRS} -+ ${PC_LIBUDEV_LIBDIR} -+ HINTS -+ "${UDEV_ROOT_DIR}" -+ PATH_SUFFIXES -+ lib -+ ) -+ -+get_filename_component(_libdir "${UDEV_LIBRARY}" PATH) -+ -+find_path(UDEV_INCLUDE_DIR -+ NAMES -+ libudev.h -+ PATHS -+ ${PC_LIBUDEV_INCLUDE_DIRS} -+ ${PC_LIBUDEV_INCLUDEDIR} -+ HINTS -+ "${_libdir}" -+ "${_libdir}/.." -+ "${UDEV_ROOT_DIR}" -+ PATH_SUFFIXES -+ include -+ ) -+ -+include(FindPackageHandleStandardArgs) -+find_package_handle_standard_args(udev -+ DEFAULT_MSG -+ UDEV_LIBRARY -+ UDEV_INCLUDE_DIR -+ ) -+ -+if(UDEV_FOUND) -+ list(APPEND UDEV_LIBRARIES ${UDEV_LIBRARY}) -+ list(APPEND UDEV_INCLUDE_DIRS ${UDEV_INCLUDE_DIR}) -+ mark_as_advanced(UDEV_ROOT_DIR) -+endif() -+ -+mark_as_advanced(UDEV_INCLUDE_DIR -+ UDEV_LIBRARY) -diff --git a/cmakemodules/script_assimp.cmake b/cmakemodules/script_assimp.cmake -index 00df742..b1e3a46 100644 ---- a/cmakemodules/script_assimp.cmake -+++ b/cmakemodules/script_assimp.cmake -@@ -1,8 +1,8 @@ - # Check for system libassimp: - # http://assimp.sourceforge.net/ - # =================================================== --set(CMAKE_MRPT_HAS_ASSIMP 0) --set(CMAKE_MRPT_HAS_ASSIMP_SYSTEM 0) -+set(CMAKE_MRPT_HAS_ASSIMP 1) -+set(CMAKE_MRPT_HAS_ASSIMP_SYSTEM 1) - - option(DISABLE_ASSIMP "Force not using ASSIMP library" "OFF") - mark_as_advanced(DISABLE_ASSIMP) -@@ -10,100 +10,15 @@ if(DISABLE_ASSIMP) - return() - endif() - --set(ASSIMP_FOUND_VIA_CMAKE 0) -+find_package(assimp REQUIRED) -+set(ASSIMP_FOUND_VIA_CMAKE 1) - - set(EMBEDDED_ASSIMP_DIR "${MRPT_BINARY_DIR}/3rdparty/assimp") - --# 1st) Try to locate the pkg via pkg-config: --find_package(PkgConfig QUIET) --if(PKG_CONFIG_FOUND) -- PKG_CHECK_MODULES(ASSIMP QUIET assimp) -- if (ASSIMP_FOUND) -- if ($ENV{VERBOSE}) -- message(STATUS "Assimp: Found via pkg-config") -- message(STATUS " ASSIMP_LIBRARIES=${ASSIMP_LIBRARIES}") -- message(STATUS " ASSIMP_INCLUDE_DIRS=${ASSIMP_INCLUDE_DIRS}") -- endif ($ENV{VERBOSE}) -- -- set(CMAKE_MRPT_HAS_ASSIMP 1) -- set(CMAKE_MRPT_HAS_ASSIMP_SYSTEM 1) -- -- set(ASSIMP_CXX_FLAGS ${ASSIMP_CFLAGS}) -- endif (ASSIMP_FOUND) --endif(PKG_CONFIG_FOUND) -- --if (NOT ASSIMP_FOUND) -- set(BUILD_ASSIMP ON CACHE BOOL "Build an embedded version of Assimp (3D models importer)") -- if (BUILD_ASSIMP) -- -- # Use embedded version: -- # -------------------------- -- # Include embedded version headers: -- include(ExternalProject) -- # download from GH -- ExternalProject_Add(EP_assimp -- URL "https://github.com/assimp/assimp/archive/v4.1.0.tar.gz" -- URL_MD5 "83b53a10c38d964bd1e69da0606e2727" -- SOURCE_DIR "${MRPT_BINARY_DIR}/3rdparty/assimp/" -- CMAKE_ARGS -- -DASSIMP_BUILD_ASSIMP_TOOLS=OFF -- -DASSIMP_BUILD_SAMPLES=OFF -- -DASSIMP_BUILD_STATIC_LIB=ON -- -DASSIMP_BUILD_TESTS=OFF -- -DASSIMP_LIBRARY_SUFFIX=-mrpt -- -DCMAKE_LIBRARY_OUTPUT_PATH=${MRPT_BINARY_DIR}/lib -- -DLIBRARY_OUTPUT_PATH=${MRPT_BINARY_DIR}/lib -- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${MRPT_BINARY_DIR}/bin -- -DRUNTIME_OUTPUT_DIRECTORY=${MRPT_BINARY_DIR}/bin -- -DCMAKE_DEBUG_POSTFIX=${CMAKE_DEBUG_POSTFIX} -- -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -- INSTALL_COMMAND "" -- TEST_COMMAND "" -- ) -- -- # 2nd attempt: via cmake -- set(ASSIMP_DIR "${EMBEDDED_ASSIMP_DIR}" CACHE PATH "Path to ASSIMP CMake config file" FORCE) -- find_package(ASSIMP QUIET) -- -- set(ASSIMP_FOUND_VIA_CMAKE 1) -- -- set(CMAKE_MRPT_HAS_ASSIMP 1) -- set(CMAKE_MRPT_HAS_ASSIMP_SYSTEM 0) -- endif (BUILD_ASSIMP) --endif() -- - if (ASSIMP_FOUND_VIA_CMAKE) - # override wrong target libs in -config.cmake file: -- set(ASSIMP_LIBRARIES "") -- -- if(MSVC12) -- set(ASSIMP_MSVC_VERSION "vc120") -- elseif(MSVC14) -- set(ASSIMP_MSVC_VERSION "vc140") -- endif(MSVC12) -- -- if(MSVC12 OR MSVC14) -- set(ASSIMP_CUSTOM_LIB_NAME "assimp-mrpt-${ASSIMP_MSVC_VERSION}-mt") -- else() -- set(ASSIMP_CUSTOM_LIB_NAME "assimp") -- set(ASSIMP_LIBRARY_DIRS "${MRPT_BINARY_DIR}/lib") -- endif() -- -- list(APPEND ASSIMP_LIBRARIES optimized "${ASSIMP_CUSTOM_LIB_NAME}" debug "${ASSIMP_CUSTOM_LIB_NAME}${CMAKE_DEBUG_POSTFIX}") -- -- # override wrong include dirs: -- set(ASSIMP_INCLUDE_DIRS -- "${MRPT_BINARY_DIR}/3rdparty/assimp/include/" -- "${MRPT_BINARY_DIR}/EP_assimp-prefix/src/EP_assimp-build/include/" -- ) -- -- # Install assimp DLLs (for binary packages) -- if(WIN32) -- file(GLOB_RECURSE EXTRA_DLLS "${MRPT_BINARY_DIR}/bin/Release/assimp-*.dll" "${MRPT_BINARY_DIR}/bin/Debug/assimp-*.dll") -- foreach(F ${EXTRA_DLLS}) -- install(FILES "${F}" DESTINATION bin) -- endforeach(F) -- endif() -+ set(ASSIMP_LIBRARIES assimp::assimp) -+ set(ASSIMP_INCLUDE_DIRS ${assimp_INCLUDE_DIRS}) - endif (ASSIMP_FOUND_VIA_CMAKE) - - # ASSIMP_ROOT_DIR - the root directory where the installation can be found -diff --git a/cmakemodules/script_ftdi.cmake b/cmakemodules/script_ftdi.cmake -index e089245..87b23dc 100644 ---- a/cmakemodules/script_ftdi.cmake -+++ b/cmakemodules/script_ftdi.cmake -@@ -4,7 +4,7 @@ - set(CMAKE_MRPT_HAS_FTDI 0) - - # This option will be available only on Linux, hence it's declared here: --option(DISABLE_FTDI "Do not use the USB driver for FTDI chips" 0) -+option(DISABLE_FTDI "Do not use the USB driver for FTDI chips" 1) - mark_as_advanced(DISABLE_FTDI) - - if (DISABLE_FTDI) -@@ -13,14 +13,15 @@ endif() - - if(UNIX) - # 1st: try to find LIBFTDI1 (1.2+) -- find_package(LibFTDI1 QUIET) -- if (LibFTDI1_FOUND) -+ find_package(FTDI REQUIRED) -+ if (FTDI_FOUND) -+ message(WARNING "USE FTDI1") - set(CMAKE_MRPT_HAS_FTDI 1) - set(CMAKE_MRPT_HAS_FTDI_SYSTEM 1) - -- set(FTDI_INCLUDE_DIRS ${LIBFTDI_INCLUDE_DIRS}) -- set(FTDI_LINK_DIRS ${LIBFTDI_LIBRARY_DIRS}) -- set(FTDI_LIBS ${LIBFTDI_LIBRARIES}) -+ set(FTDI_INCLUDE_DIRS ${FTDI_INCLUDE_DIR}) -+ # set(FTDI_LINK_DIRS ${LIBFTDI_LIBRARY_DIRS}) -+ set(FTDI_LIBS ${FTDI_LIBRARY}) - else() - # 2nd: Find old libftdi - find_file(FTDI_CONFIG_FILE libftdi-config) -@@ -45,15 +46,15 @@ if(UNIX) - - pkgconfig_parse(${CMAKE_FTDI_LIBS} "FTDI") - endif(FTDI_CONFIG_FILE) -- endif (LibFTDI1_FOUND) -+ endif (FTDI_FOUND) - - if(CMAKE_MRPT_HAS_FTDI) -- if($ENV{VERBOSE}) -+# if($ENV{VERBOSE}) - message(STATUS "libftdi configuration:") - message(STATUS " FTDI_INCLUDE_DIRS: ${FTDI_INCLUDE_DIRS}") - message(STATUS " FTDI_LINK_DIRS: ${FTDI_LINK_DIRS}") - message(STATUS " FTDI_LIBS: ${FTDI_LIBS}") -- endif($ENV{VERBOSE}) -+# endif($ENV{VERBOSE}) - - add_library(imp_ftdi INTERFACE IMPORTED) - set_target_properties(imp_ftdi -diff --git a/cmakemodules/script_openni2.cmake b/cmakemodules/script_openni2.cmake -index a0fe762..619d865 100644 ---- a/cmakemodules/script_openni2.cmake -+++ b/cmakemodules/script_openni2.cmake -@@ -4,7 +4,7 @@ - # ========================================================= - set(CMAKE_MRPT_HAS_OPENNI2 0) - --option(DISABLE_OPENNI2 "Disable the OpenNI2 library, even if automatically found" "OFF") -+option(DISABLE_OPENNI2 "Disable the OpenNI2 library, even if automatically found" "ON") - mark_as_advanced(DISABLE_OPENNI2) - - if (DISABLE_OPENNI2) # Allow the user to force not using this lib -diff --git a/cmakemodules/script_suitesparse.cmake b/cmakemodules/script_suitesparse.cmake -index d3453d3..b6957ad 100644 ---- a/cmakemodules/script_suitesparse.cmake -+++ b/cmakemodules/script_suitesparse.cmake -@@ -29,9 +29,9 @@ else() - endif() - - if(SuiteSparse_FOUND) -- if($ENV{VERBOSE}) -+# if($ENV{VERBOSE}) - message(STATUS "SuiteSparse_LIBS: ${SuiteSparse_LIBRARIES}") -- endif() -+# endif() - - set(CMAKE_MRPT_HAS_SUITESPARSE 1) - set(CMAKE_MRPT_HAS_SUITESPARSE_SYSTEM 1) -diff --git a/cmakemodules/script_wxwidgets.cmake b/cmakemodules/script_wxwidgets.cmake -index 9cbd648..87ede40 100644 ---- a/cmakemodules/script_wxwidgets.cmake -+++ b/cmakemodules/script_wxwidgets.cmake -@@ -9,7 +9,7 @@ set(wxWidgets_MRPT_COMPONENTS_TO_SEARCH "base;core;gl;adv;aui;html" CACHE STRING - set(CMAKE_MRPT_HAS_WXWIDGETS 0) - set(wxWidgets_LIBRARIES "") - --set(DISABLE_WXWIDGETS OFF CACHE BOOL "Forces compilation WITHOUT wxWidgets") -+set(DISABLE_WXWIDGETS ON CACHE BOOL "Forces compilation WITHOUT wxWidgets") - mark_as_advanced(DISABLE_WXWIDGETS) - if(DISABLE_WXWIDGETS) - return() -diff --git a/cmakemodules/script_xsens.cmake b/cmakemodules/script_xsens.cmake -index 1ca7406..0cefb60 100644 ---- a/cmakemodules/script_xsens.cmake -+++ b/cmakemodules/script_xsens.cmake -@@ -24,7 +24,7 @@ else(WIN32) - endif (PKG_LIBUDEV_FOUND) - endif (PKG_CONFIG_FOUND) - endif(WIN32) --set(BUILD_XSENS "${DEFAULT_BUILD_MT4}" CACHE BOOL "Build xSens 4th generation libraries (interface 4th generation xSens MT* devices)") -+set(BUILD_XSENS OFF CACHE BOOL "Build xSens 4th generation libraries (interface 4th generation xSens MT* devices)") - - # Check user doesn't enable it without prerequisites: - if ("${DEFAULT_BUILD_MT4}" STREQUAL "OFF" AND BUILD_XSENS) -@@ -46,7 +46,7 @@ if (BUILD_XSENS) - # In Linux: libusb-1.0 - if(PKG_LIBUSB10_FOUND) - # Perfect, we have libusb-1.0 -- set(XSENS4_LIBS ${XSENS4_LIBS} ${PKG_LIBUDEV_LIBRARIES}) -+ set(XSENS4_LIBS ${XSENS4_LIBS} ${PKG_LIBUDEV_LIBRARIES} ${PKG_LIBUSB10_LIBRARIES}) - else(PKG_LIBUSB10_FOUND) - message(SEND_ERROR "BUILD_XSENS requires libusb-1.0. Install it or disable BUILD_XSENS") - endif(PKG_LIBUSB10_FOUND) -diff --git a/libs/comms/CMakeLists.txt b/libs/comms/CMakeLists.txt -index 8e24def..a2b6bbf 100644 ---- a/libs/comms/CMakeLists.txt -+++ b/libs/comms/CMakeLists.txt -@@ -18,5 +18,10 @@ endif() - target_link_libraries(comms PRIVATE Threads::Threads) - - if(CMAKE_MRPT_HAS_FTDI_SYSTEM) -- target_link_libraries(comms PRIVATE imp_ftdi) -+ # find_package(PkgConfig) -+ # pkg_check_modules(udev REQUIRED libudev) -+ # pkg_check_modules(ftdi REQUIRED libftdi1) -+ # pkg_check_modules(libusb REQUIRED libusb-1.0) -+ target_link_libraries(comms PUBLIC ${FTDI_LIBS} ${UDEV_LIBRARIES}) -+ target_include_directories(comms PRIVATE ${FTDI_INCLUDE_DIRS} ${UDEV_INCLUDE_DIRS}) - endif() -diff --git a/libs/comms/src/CInterfaceFTDI_LIN.cpp b/libs/comms/src/CInterfaceFTDI_LIN.cpp -index 035a27a..246a27e 100644 ---- a/libs/comms/src/CInterfaceFTDI_LIN.cpp -+++ b/libs/comms/src/CInterfaceFTDI_LIN.cpp -@@ -15,12 +15,12 @@ - #if defined(MRPT_OS_LINUX) || defined(MRPT_OS_APPLE) - - #if MRPT_HAS_FTDI --#include --#if MRPT_FTDI_VERSION >= 0x120 -+#include -+//#if MRPT_FTDI_VERSION >= 0x120 - #include --#else --#include --#endif -+//#else -+//#include -+//#endif - #endif - - #include -diff --git a/libs/core/CMakeLists.txt b/libs/core/CMakeLists.txt -index 47c6feb..a2ef97f 100644 ---- a/libs/core/CMakeLists.txt -+++ b/libs/core/CMakeLists.txt -@@ -16,6 +16,10 @@ if(BUILD_mrpt-core) - - target_link_libraries(core PRIVATE Threads::Threads) # for WorkerThreads - -+ if(UNIX AND NOT APPLE) -+ target_link_libraries(core PRIVATE rt) -+ endif() -+ - # Enforce C++17 in all dependent projects: - mrpt_lib_target_requires_cpp17(core) - -diff --git a/libs/gui/CMakeLists.txt b/libs/gui/CMakeLists.txt -index e551b17..e2faf65 100644 ---- a/libs/gui/CMakeLists.txt -+++ b/libs/gui/CMakeLists.txt -@@ -65,4 +65,7 @@ if(BUILD_mrpt-gui) - target_link_libraries(gui PUBLIC mrpt::nanogui) - endif() - -+ find_package(X11) -+ target_link_libraries(gui PRIVATE ${X11_LIBRARIES}) -+ - endif() -diff --git a/libs/hwdrivers/CMakeLists.txt b/libs/hwdrivers/CMakeLists.txt -index c45fc79..7e85308 100644 ---- a/libs/hwdrivers/CMakeLists.txt -+++ b/libs/hwdrivers/CMakeLists.txt -@@ -2,6 +2,8 @@ - # See "DeclareMRPTLib.cmake" for explanations - # ------------------------------------------------- - -+find_package(libusb-1.0 REQUIRED) -+ - # Build Intersense devices? - if(CMAKE_MRPT_HAS_INTERSENSE) - list(APPEND hwdrivers_EXTRA_SRCS -@@ -78,7 +80,7 @@ endif() - - # XSens libs: - if(TARGET mrpt_xsens) -- target_link_libraries(hwdrivers PRIVATE mrpt_xsens) -+ target_link_libraries(hwdrivers PUBLIC mrpt_xsens) - endif() - - if(CMAKE_MRPT_HAS_OPENCV) -@@ -104,6 +106,10 @@ if(UNIX) - target_link_libraries(hwdrivers PRIVATE dl) - endif() - -+if(UNIX AND NOT APPLE) -+ target_link_libraries(hwdrivers PRIVATE rt) -+endif() -+ - if(CMAKE_MRPT_HAS_OPENNI2) - target_link_libraries(hwdrivers PRIVATE ${MRPT_OPENNI2_LIBRARIES}) - endif() -@@ -142,9 +148,12 @@ if(CMAKE_MRPT_HAS_FREENECT) - endif() - endif() - --if(NOT "${LIBUSB10_LIBS}" STREQUAL "") -- target_link_libraries(hwdrivers PRIVATE ${LIBUSB10_LIBS}) --endif() -+# if(NOT "${LIBUSB10_LIBS}" STREQUAL "") -+ -+find_package(udev REQUIRED) -+target_link_libraries(hwdrivers PUBLIC ${LIBUSB_1_LIBRARIES} ${UDEV_LIBRARIES}) -+# endif() -+ - - # build with link on Phidget21 lib - if(CMAKE_MRPT_HAS_PHIDGET) -diff --git a/libs/img/CMakeLists.txt b/libs/img/CMakeLists.txt -index 919b683..c4882b1 100644 ---- a/libs/img/CMakeLists.txt -+++ b/libs/img/CMakeLists.txt -@@ -21,13 +21,13 @@ if(BUILD_mrpt-img) - endif() - - if(CMAKE_MRPT_HAS_OPENCV) -- target_link_libraries(img PRIVATE imp_opencv) -+ target_link_libraries(img PUBLIC imp_opencv) - endif() - if(CMAKE_MRPT_HAS_JPEG) - if(NOT CMAKE_MRPT_HAS_JPEG_SYSTEM) - add_dependencies(img JPEG) - endif() -- target_link_libraries(img PRIVATE ${JPEG_LIBRARIES}) -+ target_link_libraries(img PUBLIC ${JPEG_LIBRARIES}) - endif() - - endif() -diff --git a/libs/math/CMakeLists.txt b/libs/math/CMakeLists.txt -index 5c9cfbb..69670b5 100644 ---- a/libs/math/CMakeLists.txt -+++ b/libs/math/CMakeLists.txt -@@ -82,12 +82,13 @@ if(BUILD_mrpt-math) - target_compile_options(math PRIVATE /Ob2) - endif() - -- if (NOT "${SuiteSparse_LIBRARIES}" STREQUAL "") -- target_link_libraries(math PRIVATE ${SuiteSparse_LIBRARIES}) -- endif () -- if (NOT "${SuiteSparse_LIBRARIES}" STREQUAL "") -- target_include_directories(math PUBLIC ${SuiteSparse_INCLUDE_DIRS}) -- endif () -+ find_package(CSparse REQUIRED) -+ # if (NOT "${SuiteSparse_LIBRARIES}" STREQUAL "") -+ target_link_libraries(math PUBLIC ${SuiteSparse_LIBRARIES} ${CSPARSE_LIBRARY}) -+ # endif () -+ # if (NOT "${SuiteSparse_LIBRARIES}" STREQUAL "") -+ target_include_directories(math PUBLIC ${SuiteSparse_INCLUDE_DIRS} ${CSPARSE_INCLUDE_DIR}) -+ # endif () - - # Minimize debug info for this module: - mrpt_reduced_debug_symbols(math) -diff --git a/libs/serialization/CMakeLists.txt b/libs/serialization/CMakeLists.txt -index 9b711d4..79850fe 100644 ---- a/libs/serialization/CMakeLists.txt -+++ b/libs/serialization/CMakeLists.txt -@@ -1,16 +1,8 @@ - # Extra dependencies required by unit tests in this module: - # Include jsoncpp only if present (optional) --if (CMAKE_MRPT_HAS_JSONCPP) -- if(TARGET "jsoncpp_lib") -- set(tst_json_dep "jsoncpp_lib") -- else() -- set(tst_json_dep "jsoncpp_lib_static") -- endif() --else() -- set(tst_json_dep "") --endif() -+find_package(JsonCpp REQUIRED) - # define those deps: --set_property(GLOBAL PROPERTY mrpt_serialization_UNIT_TEST_EXTRA_DEPS mrpt-io mrpt-poses ${tst_json_dep}) -+set_property(GLOBAL PROPERTY mrpt_serialization_UNIT_TEST_EXTRA_DEPS mrpt-io mrpt-poses ${JsonCpp_LIBRARIES}) - - #--------------------------------------------- - # Macro declared in "DeclareMRPTLib.cmake": -@@ -23,5 +15,5 @@ define_mrpt_lib( - ) - - if(BUILD_mrpt-serialization) -- target_link_libraries(serialization PRIVATE ${tst_json_dep}) -+ target_link_libraries(serialization PUBLIC ${JsonCpp_LIBRARIES}) - endif( ) -diff --git a/libs/serialization/include/mrpt/serialization/CSchemeArchive.h b/libs/serialization/include/mrpt/serialization/CSchemeArchive.h -index 744c14c..03ecf55 100644 ---- a/libs/serialization/include/mrpt/serialization/CSchemeArchive.h -+++ b/libs/serialization/include/mrpt/serialization/CSchemeArchive.h -@@ -70,12 +70,6 @@ class CSchemeArchive : public mrpt::serialization::CSchemeArchiveBase_impl - m_val = val; - return *m_parent; - } -- mrpt::serialization::CSchemeArchiveBase& operator=( -- const std::nullptr_t val) override -- { -- m_val = val; -- return *m_parent; -- } - mrpt::serialization::CSchemeArchiveBase& operator=( - const std::string val) override - { -diff --git a/libs/serialization/include/mrpt/serialization/CSchemeArchiveBase.h b/libs/serialization/include/mrpt/serialization/CSchemeArchiveBase.h -index dfaaf22..5ee7bc2 100644 ---- a/libs/serialization/include/mrpt/serialization/CSchemeArchiveBase.h -+++ b/libs/serialization/include/mrpt/serialization/CSchemeArchiveBase.h -@@ -32,7 +32,6 @@ class CSchemeArchiveBase_impl - virtual CSchemeArchiveBase& operator=(const uint64_t) = 0; - virtual CSchemeArchiveBase& operator=(const float) = 0; - virtual CSchemeArchiveBase& operator=(const double) = 0; -- virtual CSchemeArchiveBase& operator=(const std::nullptr_t) = 0; - virtual CSchemeArchiveBase& operator=(const std::string) = 0; - virtual CSchemeArchiveBase& operator=(bool) = 0; - -diff --git a/libs/system/CMakeLists.txt b/libs/system/CMakeLists.txt -index 37c858c..cb29260 100644 ---- a/libs/system/CMakeLists.txt -+++ b/libs/system/CMakeLists.txt -@@ -18,12 +18,15 @@ target_link_libraries(system PRIVATE Threads::Threads) - if(BUILD_mrpt-system) - if(WIN32) - target_link_libraries(system PRIVATE Dbghelp) # For mrpt::system::getCallStackBackTrace() -- else() -- target_link_libraries(system PRIVATE ${CMAKE_DL_LIBS}) # For mrpt::system::getCallStackBackTrace() -+ # else() -+ # target_link_libraries(system PRIVATE ${CMAKE_DL_LIBS}) # For mrpt::system::getCallStackBackTrace() - endif() - - # -ldl required by the plugin load mechanism loadPluginModule() - if(UNIX) - target_link_libraries(system PRIVATE dl) - endif() -+ if(UNIX AND NOT APPLE) -+ target_link_libraries(system PRIVATE rt) -+ endif() - endif() -diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt -index e7dd05b..75f5afb 100644 ---- a/python/CMakeLists.txt -+++ b/python/CMakeLists.txt -@@ -11,6 +11,7 @@ include_directories(include) - include_directories( - ${Boost_INCLUDE_DIRS} - ${PYTHON_INCLUDE_DIRS} -+ ${OpenCV_INCLUDE_DIRS} - ) - # Find Numpy include directory - execute_process( -@@ -60,7 +61,7 @@ add_definitions(-DROS_EXTENSIONS) - - target_link_libraries(pymrpt - ${Boost_LIBRARIES} -- ${Opencv_LIBRARIES} -+ ${OpenCV_LIBRARIES} - Python3::Python - ) - diff --git a/distros/humble/patch/ros2-nav2-recoveries.win.patch b/distros/humble/patch/ros2-nav2-recoveries.win.patch deleted file mode 100644 index cc7b4154b..000000000 --- a/distros/humble/patch/ros2-nav2-recoveries.win.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/nav2_recoveries/CMakeLists.txt b/nav2_recoveries/CMakeLists.txt -index 8af7c5b2f..fb83ff2a5 100644 ---- a/nav2_recoveries/CMakeLists.txt -+++ b/nav2_recoveries/CMakeLists.txt -@@ -1,6 +1,8 @@ - cmake_minimum_required(VERSION 3.5) - project(nav2_recoveries) - -+add_definitions(-DNOMINMAX) -+ - find_package(ament_cmake REQUIRED) - find_package(nav2_common REQUIRED) - find_package(rclcpp REQUIRED) diff --git a/distros/humble/patch/ros2-rosidl-cli.patch b/distros/humble/patch/ros2-rosidl-cli.patch new file mode 100644 index 000000000..82294e2f3 --- /dev/null +++ b/distros/humble/patch/ros2-rosidl-cli.patch @@ -0,0 +1,42 @@ +diff --git a/rosidl_cli/completion/conda/_rosidl b/rosidl_cli/completion/conda/_rosidl +new file mode 100644 +index 0000000..3cfe0ce +--- /dev/null ++++ b/rosidl_cli/completion/conda/_rosidl +@@ -0,0 +1,8 @@ ++#compdef rosidl ++# zsh autoloads this from $fpath (site-functions) the first time rosidl is ++# completed: register argcomplete's completion function for rosidl, which ++# replaces this one, and complete with it ++if (( $+commands[register-python-argcomplete] )); then ++ eval "$(register-python-argcomplete rosidl)" ++ _python_argcomplete "$@" ++fi +diff --git a/rosidl_cli/completion/conda/rosidl b/rosidl_cli/completion/conda/rosidl +new file mode 100644 +index 0000000..17666fb +--- /dev/null ++++ b/rosidl_cli/completion/conda/rosidl +@@ -0,0 +1,5 @@ ++# bash completion for rosidl, under the name bash-completion loads on demand ++# (completions/); pixi shell sources this directory when activating ++if type register-python-argcomplete > /dev/null 2>&1; then ++ eval "$(register-python-argcomplete rosidl)" ++fi +diff --git a/rosidl_cli/setup.py b/rosidl_cli/setup.py +index dd12abb..e4f9597 100644 +--- a/rosidl_cli/setup.py ++++ b/rosidl_cli/setup.py +@@ -23,6 +23,12 @@ setup( + 'completion/rosidl-argcomplete.bash', + 'completion/rosidl-argcomplete.zsh' + ]), ++ ++ # [conda] completion scripts under the names the shells load on demand ++ # (bash-completion: completions/, zsh: $fpath/_), which ++ # pixi shell activates ++ ('share/bash-completion/completions', ['completion/conda/rosidl']), ++ ('share/zsh/site-functions', ['completion/conda/_rosidl']), + ], + zip_safe=False, + author='Michel Hidalgo', diff --git a/distros/humble/patch/ros2-rosidl.patch b/distros/humble/patch/ros2-rosidl.patch deleted file mode 100644 index 965f200b6..000000000 --- a/distros/humble/patch/ros2-rosidl.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/rosidl_cli/completion/rosidl-argcomplete.bash b/rosidl_cli/completion/rosidl-argcomplete.bash -index 0262ec2..c3e8606 100644 ---- a/rosidl_cli/completion/rosidl-argcomplete.bash -+++ b/rosidl_cli/completion/rosidl-argcomplete.bash -@@ -12,8 +12,6 @@ - # See the License for the specific language governing permissions and - # limitations under the License. - --if type register-python-argcomplete3 > /dev/null 2>&1; then -- eval "$(register-python-argcomplete3 rosidl)" --elif type register-python-argcomplete > /dev/null 2>&1; then -+if type register-python-argcomplete > /dev/null 2>&1; then - eval "$(register-python-argcomplete rosidl)" - fi -diff --git a/rosidl_cli/setup.py b/rosidl_cli/setup.py -index bacc9e8..b4fd32c 100644 ---- a/rosidl_cli/setup.py -+++ b/rosidl_cli/setup.py -@@ -20,6 +20,14 @@ setup( - 'completion/rosidl-argcomplete.bash', - 'completion/rosidl-argcomplete.zsh' - ]), -+ -+ # [pixi] install autocompletion scripts -+ ('share/bash-completion/completions', [ -+ 'completion/rosidl-argcomplete.bash', -+ ]), -+ ('share/zsh/site-functions', [ -+ 'completion/rosidl-argcomplete.zsh' -+ ]), - ], - zip_safe=False, - author='Michel Hidalgo', diff --git a/distros/humble/pkg_additional_info.yaml b/distros/humble/pkg_additional_info.yaml index ae9a008c7..2f9da46e1 100644 --- a/distros/humble/pkg_additional_info.yaml +++ b/distros/humble/pkg_additional_info.yaml @@ -104,3 +104,6 @@ zenoh_cpp_vendor: ros2cli: # Rebuild with the shell completions under the names bash and zsh load (patch). build_number: 21 +rosidl_cli: + # Rebuild with the shell completions installed under the names bash and zsh load (patch). + build_number: 21 diff --git a/distros/jazzy/patch/ros2-cmake-vendor-package.patch b/distros/jazzy/patch/ros2-cmake-vendor-package.patch deleted file mode 100644 index 9dd817eb9..000000000 --- a/distros/jazzy/patch/ros2-cmake-vendor-package.patch +++ /dev/null @@ -1,164 +0,0 @@ -From 1132cb348f7267c51627ec596182bbcaa4d57c07 Mon Sep 17 00:00:00 2001 -From: Silvio -Date: Thu, 3 Jul 2025 10:14:56 +0200 -Subject: [PATCH] ament_vendor: Add IS_VENDORED_OUTPUT_VARIABLE_NAME argument - and AMENT_VENDOR_POLICY CMake option - -Signed-off-by: Silvio ---- - .../cmake/ament_vendor.cmake | 93 ++++++++++++++++++- - 1 file changed, 88 insertions(+), 5 deletions(-) - -diff --git a/ament_cmake_vendor_package/cmake/ament_vendor.cmake b/ament_cmake_vendor_package/cmake/ament_vendor.cmake -index c9b963cd..2ca2f40a 100644 ---- a/ament_cmake_vendor_package/cmake/ament_vendor.cmake -+++ b/ament_cmake_vendor_package/cmake/ament_vendor.cmake -@@ -48,6 +48,31 @@ - # project, expose the external project globally to any downstream CMake - # projects. - # :type GLOBAL_HOOK: option -+# :param IS_VENDORED_OUTPUT_VARIABLE_NAME: the name of the variable that -+# will be set to ``TRUE`` if the package has been vendored, or ``FALSE`` -+# otherwise. -+# :type IS_VENDORED_OUTPUT_VARIABLE_NAME: string -+# -+# Beside proper CMake macro arguments, the macro also is influenced by the -+# following CMake advanced options, that can be set from the CMake command -+# line when the project that contains the 'ament_vendor' call is configured. -+# -+# AMENT_VENDOR_POLICY: String option that specifies how ament_vendor behaves, -+# the allowed values are listed in the following. -+# DEFAULT: Vendor if ``SATISFIED`` argument is not supplied or false, -+# do not vendor otherwise. -+# FORCE_BUILD_VENDOR: Always vendor, independently of the value of the -+# ``SATISFIED`` argument. -+# NEVER_VENDOR: Never vendor, and raise an error if ``SATISFIED`` argument -+# is not supplied or false. -+# NEVER_VENDOR_IGNORE_SATISFIED_CHECK: Never vendor, and do not raise -+# an error even if ``SATISFIED`` argument is not supplied -+# or false. This option is in unsupported by most packages, -+# so use at your own risk, as it could break the buid. -+# -+# To check if a package has been actually vendored, downstream users of -+# ``ament_vendor` can pass a variable name to IS_VENDORED_OUTPUT_VARIABLE_NAME -+# argument, and check its value. - # - # @public - # -@@ -60,7 +85,7 @@ macro(ament_vendor TARGET_NAME) - message(FATAL_ERROR "ament_vendor() must be called before ament_package()") - endif() - -- cmake_parse_arguments(_ARG "GLOBAL_HOOK;SKIP_INSTALL" "SOURCE_SUBDIR;VCS_TYPE;VCS_URL;VCS_VERSION;SATISFIED" "CMAKE_ARGS;PATCHES" ${ARGN}) -+ cmake_parse_arguments(_ARG "GLOBAL_HOOK;SKIP_INSTALL" "SOURCE_SUBDIR;VCS_TYPE;VCS_URL;VCS_VERSION;SATISFIED;IS_VENDORED_OUTPUT_VARIABLE_NAME" "CMAKE_ARGS;PATCHES" ${ARGN}) - if(_ARG_UNPARSED_ARGUMENTS) - message(FATAL_ERROR "ament_vendor() called with unused arguments: " - "${_ARG_UNPARSED_ARGUMENTS}") -@@ -93,15 +118,57 @@ macro(ament_vendor TARGET_NAME) - set(_ARG_SATISFIED FALSE) - endif() - -+ # If defined, let's set ${_ARG_IS_VENDORED_OUTPUT_VARIABLE_NAME} to FALSE, it will be set -+ # to TRUE if the package is actually vendored -+ if(DEFINED _ARG_IS_VENDORED_OUTPUT_VARIABLE_NAME) -+ # There is no PARENT_SCOPE as this is a cmake macro, -+ # if it is converted to a function PARENT_SCOPE will need to be added -+ set(${_ARG_IS_VENDORED_OUTPUT_VARIABLE_NAME} FALSE) -+ endif() -+ - option(FORCE_BUILD_VENDOR_PKG - "Build vendor packages from source, even if system-installed packages are available" - OFF) -+ mark_as_advanced(FORCE_BUILD_VENDOR_PKG) -+ -+ set(_AMENT_VENDOR_POLICY_DOCS "Specify how ament_vendor behaves, allowed values are DEFAULT, FORCE_BUILD_VENDOR, NEVER_VENDOR and NEVER_VENDOR_IGNORE_SATISFIED_CHECK.") -+ set(AMENT_VENDOR_POLICY "DEFAULT" CACHE STRING ${_AMENT_VENDOR_POLICY_DOCS}) -+ set_property(CACHE AMENT_VENDOR_POLICY PROPERTY STRINGS "DEFAULT" "FORCE_BUILD_VENDOR" "NEVER_VENDOR" "NEVER_VENDOR_IGNORE_SATISFIED_CHECK") -+ mark_as_advanced(AMENT_VENDOR_POLICY) - -- if(NOT _ARG_SATISFIED OR FORCE_BUILD_VENDOR_PKG) -+ if(FORCE_BUILD_VENDOR_PKG AND NOT AMENT_VENDOR_POLICY STREQUAL "FORCE_BUILD_VENDOR") -+ message(DEPRECATION "FORCE_BUILD_VENDOR_PKG set to ON detected, FORCE_BUILD_VENDOR_PKG variable is deprecated, please set AMENT_VENDOR_POLICY to FORCE_BUILD_VENDOR instead.") -+ set(CMAKE_BUILD_TYPE "FORCE_BUILD_VENDOR" CACHE STRING ${_AMENT_VENDOR_POLICY_DOCS} FORCE) -+ endif() -+ -+ # AMENT_VENDOR_POLICY -+ -+ if(AMENT_VENDOR_POLICY STREQUAL "FORCE_BUILD_VENDOR") -+ set(_call_ament_vendor TRUE) -+ if(_ARG_SATISFIED) -+ message(STATUS "Forcing vendor package build for '${TARGET_NAME}', which is already satisfied as AMENT_VENDOR_POLICY is set to FORCE_BUILD_VENDOR") -+ endif() -+ elseif(AMENT_VENDOR_POLICY STREQUAL "NEVER_VENDOR") -+ if(NOT _ARG_SATISFIED) -+ message(FATAL_ERROR "Error as SATISFIED argument is not TRUE, but AMENT_VENDOR_POLICY is set to NEVER_VENDOR") -+ endif() -+ set(_call_ament_vendor FALSE) -+ elseif(AMENT_VENDOR_POLICY STREQUAL "NEVER_VENDOR_IGNORE_SATISFIED_CHECK") -+ if(NOT _ARG_SATISFIED) -+ message(STATUS "Not vendoring even if SATISFIED is not TRUE as AMENT_VENDOR_POLICY is set to NEVER_VENDOR_IGNORE_SATISFIED_CHECK") -+ endif() -+ set(_call_ament_vendor FALSE) -+ else() -+ # This is the default case - if(_ARG_SATISFIED) -- message(STATUS "Forcing vendor package build for '${TARGET_NAME}', which is already satisfied") -+ message(STATUS "Skipping vendor package build for '${TARGET_NAME}', as SATISFIED is TRUE and AMENT_VENDOR_POLICY is set to DEFAULT") -+ set(_call_ament_vendor FALSE) -+ else() -+ set(_call_ament_vendor TRUE) - endif() -+ endif() - -+ if(_call_ament_vendor) - list_append_unique(_AMENT_CMAKE_VENDOR_PACKAGE_PREFIX_PATH "${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}-prefix/install") - - _ament_vendor( -@@ -115,6 +182,12 @@ macro(ament_vendor TARGET_NAME) - "${_ARG_SKIP_INSTALL}" - ) - -+ if(DEFINED _ARG_IS_VENDORED_OUTPUT_VARIABLE_NAME) -+ # There is no PARENT_SCOPE as this is a cmake macro, -+ # if it is converted to a function PARENT_SCOPE will need to be added -+ set(${_ARG_IS_VENDORED_OUTPUT_VARIABLE_NAME} TRUE) -+ endif() -+ - if(NOT _ament_vendor_called AND NOT _ARG_SKIP_INSTALL) - # Hooks for CMAKE_PREFIX_PATH - if(_ARG_GLOBAL_HOOK) -@@ -142,8 +215,6 @@ macro(ament_vendor TARGET_NAME) - - set(_ament_vendor_called TRUE) - endif() -- else() -- message(STATUS "Skipping vendor package build for '${TARGET_NAME}', which is already satisfied") - endif() - endmacro() - -@@ -241,6 +312,10 @@ function(_ament_vendor TARGET_NAME VCS_TYPE VCS_URL VCS_VERSION PATCHES CMAKE_AR - set(CMAKE_ARGS_CONTENT "${CMAKE_ARGS_CONTENT}\nset(CMAKE_BUILD_TYPE [=[${CMAKE_BUILD_TYPE}]=] CACHE INTERNAL \"\")") - endif() - -+ if(DEFINED CMAKE_IGNORE_PREFIX_PATH) -+ set(CMAKE_ARGS_CONTENT "${CMAKE_ARGS_CONTENT}\nset(CMAKE_IGNORE_PREFIX_PATH [=[${CMAKE_IGNORE_PREFIX_PATH}]=] CACHE INTERNAL \"\")") -+ endif() -+ - if(DEFINED CMAKE_MODULE_PATH) - set(CMAKE_ARGS_CONTENT "${CMAKE_ARGS_CONTENT}\nset(CMAKE_MODULE_PATH [=[${CMAKE_MODULE_PATH}]=] CACHE INTERNAL \"\")") - endif() -@@ -256,6 +331,14 @@ function(_ament_vendor TARGET_NAME VCS_TYPE VCS_URL VCS_VERSION PATCHES CMAKE_AR - set(CMAKE_ARGS_CONTENT "${CMAKE_ARGS_CONTENT}\nset(BUILD_SHARED_LIBS ON CACHE BOOL \"\")") - endif() - -+ if(DEFINED Python_EXECUTABLE) -+ set(CMAKE_ARGS_CONTENT "${CMAKE_ARGS_CONTENT}\nset(Python_EXECUTABLE [=[${Python_EXECUTABLE}]=] CACHE INTERNAL \"\")") -+ endif() -+ -+ if(DEFINED Python3_EXECUTABLE) -+ set(CMAKE_ARGS_CONTENT "${CMAKE_ARGS_CONTENT}\nset(CMAKE_IGNORE_PREFIX_PATH [=[${Python3_EXECUTABLE}]=] CACHE INTERNAL \"\")") -+ endif() -+ - file(GENERATE OUTPUT "${CMAKE_ARGS_FILE}" CONTENT "${CMAKE_ARGS_CONTENT}") - list(PREPEND CMAKE_ARGS "-C${CMAKE_ARGS_FILE}") - diff --git a/distros/jazzy/patch/ros2-iceoryx-dds.win.patch b/distros/jazzy/patch/ros2-iceoryx-dds.win.patch deleted file mode 100644 index 86453fd4f..000000000 --- a/distros/jazzy/patch/ros2-iceoryx-dds.win.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/iceoryx_dds/CMakeLists.txt b/iceoryx_dds/CMakeLists.txt -index ae1f9f83f..e79873a72 100644 ---- a/iceoryx_dds/CMakeLists.txt -+++ b/iceoryx_dds/CMakeLists.txt -@@ -16,6 +16,10 @@ - # SPDX-License-Identifier: Apache-2.0 - cmake_minimum_required(VERSION 3.16) - -+if(WIN32) -+ set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) -+endif() -+ - set(IOX_VERSION_STRING "2.0.6") - - project(iceoryx_dds VERSION ${IOX_VERSION_STRING}) diff --git a/distros/jazzy/patch/ros2-joint-limits-skip.win.patch b/distros/jazzy/patch/ros2-joint-limits-skip.win.patch deleted file mode 100644 index 2e5f35fe7..000000000 --- a/distros/jazzy/patch/ros2-joint-limits-skip.win.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/joint_limits/src/joint_soft_limiter.cpp b/joint_limits/src/joint_soft_limiter.cpp -index a2292cb033..622a320384 100644 ---- a/joint_limits/src/joint_soft_limiter.cpp -+++ b/joint_limits/src/joint_soft_limiter.cpp -@@ -13,6 +13,7 @@ - // limitations under the License. - - /// \author AdriĆ  Roig Moreno -+#define _USE_MATH_DEFINES - #include "joint_limits/joint_soft_limiter.hpp" - - namespace joint_limits diff --git a/distros/jazzy/patch/ros2-rwm-implementation-cmake.osx.patch b/distros/jazzy/patch/ros2-rmw-implementation-cmake.osx.patch similarity index 100% rename from distros/jazzy/patch/ros2-rwm-implementation-cmake.osx.patch rename to distros/jazzy/patch/ros2-rmw-implementation-cmake.osx.patch diff --git a/distros/jazzy/patch/ros2-rosidl-cli.patch b/distros/jazzy/patch/ros2-rosidl-cli.patch new file mode 100644 index 000000000..3228b76fb --- /dev/null +++ b/distros/jazzy/patch/ros2-rosidl-cli.patch @@ -0,0 +1,42 @@ +diff --git a/rosidl_cli/completion/conda/_rosidl b/rosidl_cli/completion/conda/_rosidl +new file mode 100644 +index 0000000..3cfe0ce +--- /dev/null ++++ b/rosidl_cli/completion/conda/_rosidl +@@ -0,0 +1,8 @@ ++#compdef rosidl ++# zsh autoloads this from $fpath (site-functions) the first time rosidl is ++# completed: register argcomplete's completion function for rosidl, which ++# replaces this one, and complete with it ++if (( $+commands[register-python-argcomplete] )); then ++ eval "$(register-python-argcomplete rosidl)" ++ _python_argcomplete "$@" ++fi +diff --git a/rosidl_cli/completion/conda/rosidl b/rosidl_cli/completion/conda/rosidl +new file mode 100644 +index 0000000..17666fb +--- /dev/null ++++ b/rosidl_cli/completion/conda/rosidl +@@ -0,0 +1,5 @@ ++# bash completion for rosidl, under the name bash-completion loads on demand ++# (completions/); pixi shell sources this directory when activating ++if type register-python-argcomplete > /dev/null 2>&1; then ++ eval "$(register-python-argcomplete rosidl)" ++fi +diff --git a/rosidl_cli/setup.py b/rosidl_cli/setup.py +index 8b1335a..fca7458 100644 +--- a/rosidl_cli/setup.py ++++ b/rosidl_cli/setup.py +@@ -23,6 +23,12 @@ setup( + 'completion/rosidl-argcomplete.bash', + 'completion/rosidl-argcomplete.zsh' + ]), ++ ++ # [conda] completion scripts under the names the shells load on demand ++ # (bash-completion: completions/, zsh: $fpath/_), which ++ # pixi shell activates ++ ('share/bash-completion/completions', ['completion/conda/rosidl']), ++ ('share/zsh/site-functions', ['completion/conda/_rosidl']), + ], + zip_safe=False, + author='Michel Hidalgo', diff --git a/distros/jazzy/patch/ros2-rosidl.patch b/distros/jazzy/patch/ros2-rosidl.patch deleted file mode 100644 index 2375cc603..000000000 --- a/distros/jazzy/patch/ros2-rosidl.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/rosidl_cli/completion/rosidl-argcomplete.zsh b/rosidl_cli/completion/rosidl-argcomplete.zsh -index 9a86dbd..c4a4253 100644 ---- a/rosidl_cli/completion/rosidl-argcomplete.zsh -+++ b/rosidl_cli/completion/rosidl-argcomplete.zsh -@@ -18,6 +18,6 @@ autoload -U +X bashcompinit && bashcompinit - # Get this scripts directory - __rosidl_cli_completion_dir=${0:a:h} - # Just source the bash version, it works in zsh too --source "$__rosidl_cli_completion_dir/rosidl-argcomplete.bash" -+source "$CONDA_PREFIX/share/bash-completion/completions/rosidl-argcomplete.bash" - # Cleanup - unset __rosidl_cli_completion_dir -diff --git a/rosidl_cli/setup.py b/rosidl_cli/setup.py -index 8b1335a..a012273 100644 ---- a/rosidl_cli/setup.py -+++ b/rosidl_cli/setup.py -@@ -23,6 +23,14 @@ setup( - 'completion/rosidl-argcomplete.bash', - 'completion/rosidl-argcomplete.zsh' - ]), -+ -+ # [pixi] install autocompletion scripts -+ ('share/bash-completion/completions', [ -+ 'completion/rosidl-argcomplete.bash', -+ ]), -+ ('share/zsh/site-functions', [ -+ 'completion/rosidl-argcomplete.zsh' -+ ]), - ], - zip_safe=False, - author='Michel Hidalgo', diff --git a/distros/jazzy/pkg_additional_info.yaml b/distros/jazzy/pkg_additional_info.yaml index ebd5ffc58..41984b7d1 100644 --- a/distros/jazzy/pkg_additional_info.yaml +++ b/distros/jazzy/pkg_additional_info.yaml @@ -135,6 +135,12 @@ urdfdom_headers: zenoh_cpp_vendor: additional_cmake_args: "-DAMENT_VENDOR_POLICY=NEVER_VENDOR_IGNORE_SATISFIED_CHECK -DUSE_SYSTEM_ZENOH=ON" # Remove build_number fields below on new full rebuild +rmw_implementation_cmake: + # Rebuild with CycloneDDS as the default RMW on macOS (patch, misnamed before so never applied). + build_number: 26 ros2cli: # Rebuild with the shell completions under the names bash and zsh load (patch). build_number: 26 +rosidl_cli: + # Rebuild with the shell completions installed under the names bash and zsh load (patch). + build_number: 26 diff --git a/distros/lyrical/patch/ros2-grid-map-pcl.osx.patch b/distros/lyrical/patch/ros2-grid-map-pcl.osx.patch deleted file mode 100644 index f11aff31f..000000000 --- a/distros/lyrical/patch/ros2-grid-map-pcl.osx.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/include/grid_map_pcl/helpers.hpp b/include/grid_map_pcl/helpers.hpp -index f3d9f38..fc94637 100644 ---- a/include/grid_map_pcl/helpers.hpp -+++ b/include/grid_map_pcl/helpers.hpp -@@ -42,7 +42,11 @@ void saveGridMap( - const std::string & mapTopic); - - inline void printTimeElapsedToRosInfoStream( -+#if defined(__APPLE__) -+ const std::chrono::steady_clock::time_point & start, -+#else - const std::chrono::system_clock::time_point & start, -+#endif - const std::string & prefix, - const rclcpp::Logger & node_logger) - { diff --git a/distros/lyrical/patch/ros2-parameter-traits.patch b/distros/lyrical/patch/ros2-parameter-traits.patch deleted file mode 100644 index 3f83bb735..000000000 --- a/distros/lyrical/patch/ros2-parameter-traits.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/include/parameter_traits/parameter_traits.hpp b/include/parameter_traits/parameter_traits.hpp -index a62153dc..f190922b 100644 ---- a/include/parameter_traits/parameter_traits.hpp -+++ b/include/parameter_traits/parameter_traits.hpp -@@ -34,7 +34,7 @@ - #include - - #include --#include -+#include - - #ifndef SILENCE_DEPRECATION_WARNINGS - #ifdef _MSC_VER diff --git a/distros/lyrical/patch/ros2-rosidl-cli.patch b/distros/lyrical/patch/ros2-rosidl-cli.patch new file mode 100644 index 000000000..321e721ae --- /dev/null +++ b/distros/lyrical/patch/ros2-rosidl-cli.patch @@ -0,0 +1,54 @@ +diff --git a/rosidl_cli/completion/conda/_rosidl b/rosidl_cli/completion/conda/_rosidl +new file mode 100644 +index 0000000..3cfe0ce +--- /dev/null ++++ b/rosidl_cli/completion/conda/_rosidl +@@ -0,0 +1,8 @@ ++#compdef rosidl ++# zsh autoloads this from $fpath (site-functions) the first time rosidl is ++# completed: register argcomplete's completion function for rosidl, which ++# replaces this one, and complete with it ++if (( $+commands[register-python-argcomplete] )); then ++ eval "$(register-python-argcomplete rosidl)" ++ _python_argcomplete "$@" ++fi +diff --git a/rosidl_cli/completion/conda/rosidl b/rosidl_cli/completion/conda/rosidl +new file mode 100644 +index 0000000..17666fb +--- /dev/null ++++ b/rosidl_cli/completion/conda/rosidl +@@ -0,0 +1,5 @@ ++# bash completion for rosidl, under the name bash-completion loads on demand ++# (completions/); pixi shell sources this directory when activating ++if type register-python-argcomplete > /dev/null 2>&1; then ++ eval "$(register-python-argcomplete rosidl)" ++fi +diff --git a/rosidl_cli/completion/conda/rosidl.fish b/rosidl_cli/completion/conda/rosidl.fish +new file mode 100644 +index 0000000..cb164c7 +--- /dev/null ++++ b/rosidl_cli/completion/conda/rosidl.fish +@@ -0,0 +1,5 @@ ++# fish completion for rosidl, under the name fish loads on demand ++# (vendor_completions.d/.fish) ++if type -q register-python-argcomplete ++ register-python-argcomplete --shell fish rosidl | source ++end +diff --git a/rosidl_cli/setup.py b/rosidl_cli/setup.py +index 6b48abf..d298ba8 100644 +--- a/rosidl_cli/setup.py ++++ b/rosidl_cli/setup.py +@@ -23,6 +23,13 @@ setup( + 'completion/rosidl-argcomplete.bash', + 'completion/rosidl-argcomplete.zsh' + ]), ++ ++ # [conda] completion scripts under the names the shells load on demand ++ # (bash-completion: completions/, zsh: $fpath/_, fish: ++ # vendor_completions.d/.fish), which pixi shell activates ++ ('share/bash-completion/completions', ['completion/conda/rosidl']), ++ ('share/zsh/site-functions', ['completion/conda/_rosidl']), ++ ('share/fish/vendor_completions.d', ['completion/conda/rosidl.fish']), + ], + package_data={'': ['py.typed']}, + zip_safe=False, diff --git a/distros/lyrical/patch/ros2-rosidl.patch b/distros/lyrical/patch/ros2-rosidl.patch deleted file mode 100644 index 0dedfdd19..000000000 --- a/distros/lyrical/patch/ros2-rosidl.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/rosidl_cli/completion/rosidl-argcomplete.zsh b/rosidl_cli/completion/rosidl-argcomplete.zsh -index 9a86dbd..a33f8e1 100644 ---- a/rosidl_cli/completion/rosidl-argcomplete.zsh -+++ b/rosidl_cli/completion/rosidl-argcomplete.zsh -@@ -18,6 +18,6 @@ autoload -U +X bashcompinit && bashcompinit - # Get this scripts directory - __rosidl_cli_completion_dir=${0:a:h} - # Just source the bash version, it works in zsh too --source "$__rosidl_cli_completion_dir/rosidl-argcomplete.bash" -+source "$CONDA_PREFIX/share/bash-completion/completions/rosidl-argcomplete.bash" - # Cleanup - unset __rosidl_cli_completion_dir -diff --git a/rosidl_cli/setup.py b/rosidl_cli/setup.py -index 6b48abf..950d23a 100644 ---- a/rosidl_cli/setup.py -+++ b/rosidl_cli/setup.py -@@ -23,6 +23,14 @@ setup( - 'completion/rosidl-argcomplete.bash', - 'completion/rosidl-argcomplete.zsh' - ]), -+ -+ # [pixi] install autocompletion scripts -+ ('share/bash-completion/completions', [ -+ 'completion/rosidl-argcomplete.bash', -+ ]), -+ ('share/zsh/site-functions', [ -+ 'completion/rosidl-argcomplete.zsh' -+ ]), - ], - package_data={'': ['py.typed']}, - zip_safe=False, diff --git a/distros/lyrical/patch/ros2-turtlebot3-node.win.patch b/distros/lyrical/patch/ros2-turtlebot3-node.win.patch deleted file mode 100644 index 4e86ef0f5..000000000 --- a/distros/lyrical/patch/ros2-turtlebot3-node.win.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/include/turtlebot3_node/odometry.hpp b/include/turtlebot3_node/odometry.hpp -index 75cf27e..7477d5c 100644 ---- a/include/turtlebot3_node/odometry.hpp -+++ b/include/turtlebot3_node/odometry.hpp -@@ -17,9 +17,9 @@ - #ifndef TURTLEBOT3_NODE__ODOMETRY_HPP_ - #define TURTLEBOT3_NODE__ODOMETRY_HPP_ - --#include --#include --#include -+#include -+#include -+#include - #include - #include - diff --git a/distros/lyrical/pkg_additional_info.yaml b/distros/lyrical/pkg_additional_info.yaml index 4dea6ba5b..b8ec69097 100644 --- a/distros/lyrical/pkg_additional_info.yaml +++ b/distros/lyrical/pkg_additional_info.yaml @@ -131,6 +131,9 @@ gz_sim_vendor: ros2cli: # Rebuild with the shell completions under the names bash/zsh/fish load (patch). build_number: 28 +rosidl_cli: + # Rebuild with the shell completions installed under the names bash/zsh/fish load (patch). + build_number: 28 rqt_plot: build_number: 28 rqt_py_common: diff --git a/distros/rolling/patch/ros2-grid-map-core.osx.patch b/distros/rolling/patch/ros2-grid-map-core.osx.patch deleted file mode 100644 index c64df277c..000000000 --- a/distros/rolling/patch/ros2-grid-map-core.osx.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/include/grid_map_core/BufferRegion.hpp b/include/grid_map_core/BufferRegion.hpp -index fbe2d20..873b4b6 100644 ---- a/include/grid_map_core/BufferRegion.hpp -+++ b/include/grid_map_core/BufferRegion.hpp -@@ -39,6 +39,8 @@ public: - BufferRegion( - const Index & startIndex, const Size & size, - const BufferRegion::Quadrant & quadrant); -+ BufferRegion(const BufferRegion & other) = default; -+ BufferRegion & operator=(const BufferRegion & other) = default; - virtual ~BufferRegion() = default; - - const Index & getStartIndex() const; -diff --git a/include/grid_map_core/Polygon.hpp b/include/grid_map_core/Polygon.hpp -index 9d7ad27..a02b133 100644 ---- a/include/grid_map_core/Polygon.hpp -+++ b/include/grid_map_core/Polygon.hpp -@@ -40,6 +40,9 @@ public: - */ - explicit Polygon(std::vector vertices); - -+ Polygon(const Polygon & other) = default; -+ Polygon & operator=(const Polygon & other) = default; -+ - /*! - * Destructor. - */ diff --git a/distros/rolling/patch/ros2-grid-map-core.patch b/distros/rolling/patch/ros2-grid-map-core.patch deleted file mode 100644 index b0243f318..000000000 --- a/distros/rolling/patch/ros2-grid-map-core.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/include/grid_map_core/eigen_plugins/FunctorsPlugin.hpp b/include/grid_map_core/eigen_plugins/FunctorsPlugin.hpp -index 3d104a8..a2d2ad6 100644 ---- a/include/grid_map_core/eigen_plugins/FunctorsPlugin.hpp -+++ b/include/grid_map_core/eigen_plugins/FunctorsPlugin.hpp -@@ -6,7 +6,6 @@ - template - struct scalar_sum_of_finites_op - { -- EIGEN_EMPTY_STRUCT_CTOR(scalar_sum_of_finites_op) - EIGEN_STRONG_INLINE const Scalar operator()(const Scalar & a, const Scalar & b) const - { - using std::isfinite; -@@ -29,7 +28,6 @@ struct functor_traits> - template - struct scalar_min_of_finites_op - { -- EIGEN_EMPTY_STRUCT_CTOR(scalar_min_of_finites_op) - EIGEN_STRONG_INLINE const Scalar operator()(const Scalar & a, const Scalar & b) const - { - using std::min; -@@ -53,7 +51,6 @@ struct functor_traits> - template - struct scalar_max_of_finites_op - { -- EIGEN_EMPTY_STRUCT_CTOR(scalar_max_of_finites_op) - EIGEN_STRONG_INLINE const Scalar operator()(const Scalar & a, const Scalar & b) const - { - using std::max; diff --git a/distros/rolling/patch/ros2-grid-map-pcl.osx.patch b/distros/rolling/patch/ros2-grid-map-pcl.osx.patch deleted file mode 100644 index f11aff31f..000000000 --- a/distros/rolling/patch/ros2-grid-map-pcl.osx.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/include/grid_map_pcl/helpers.hpp b/include/grid_map_pcl/helpers.hpp -index f3d9f38..fc94637 100644 ---- a/include/grid_map_pcl/helpers.hpp -+++ b/include/grid_map_pcl/helpers.hpp -@@ -42,7 +42,11 @@ void saveGridMap( - const std::string & mapTopic); - - inline void printTimeElapsedToRosInfoStream( -+#if defined(__APPLE__) -+ const std::chrono::steady_clock::time_point & start, -+#else - const std::chrono::system_clock::time_point & start, -+#endif - const std::string & prefix, - const rclcpp::Logger & node_logger) - { diff --git a/distros/rolling/patch/ros2-parameter-traits.patch b/distros/rolling/patch/ros2-parameter-traits.patch deleted file mode 100644 index 3f83bb735..000000000 --- a/distros/rolling/patch/ros2-parameter-traits.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/include/parameter_traits/parameter_traits.hpp b/include/parameter_traits/parameter_traits.hpp -index a62153dc..f190922b 100644 ---- a/include/parameter_traits/parameter_traits.hpp -+++ b/include/parameter_traits/parameter_traits.hpp -@@ -34,7 +34,7 @@ - #include - - #include --#include -+#include - - #ifndef SILENCE_DEPRECATION_WARNINGS - #ifdef _MSC_VER diff --git a/distros/rolling/patch/ros2-rosidl-cli.patch b/distros/rolling/patch/ros2-rosidl-cli.patch new file mode 100644 index 000000000..b0d11fd0e --- /dev/null +++ b/distros/rolling/patch/ros2-rosidl-cli.patch @@ -0,0 +1,54 @@ +diff --git a/rosidl_cli/completion/conda/_rosidl b/rosidl_cli/completion/conda/_rosidl +new file mode 100644 +index 0000000..3cfe0ce +--- /dev/null ++++ b/rosidl_cli/completion/conda/_rosidl +@@ -0,0 +1,8 @@ ++#compdef rosidl ++# zsh autoloads this from $fpath (site-functions) the first time rosidl is ++# completed: register argcomplete's completion function for rosidl, which ++# replaces this one, and complete with it ++if (( $+commands[register-python-argcomplete] )); then ++ eval "$(register-python-argcomplete rosidl)" ++ _python_argcomplete "$@" ++fi +diff --git a/rosidl_cli/completion/conda/rosidl b/rosidl_cli/completion/conda/rosidl +new file mode 100644 +index 0000000..17666fb +--- /dev/null ++++ b/rosidl_cli/completion/conda/rosidl +@@ -0,0 +1,5 @@ ++# bash completion for rosidl, under the name bash-completion loads on demand ++# (completions/); pixi shell sources this directory when activating ++if type register-python-argcomplete > /dev/null 2>&1; then ++ eval "$(register-python-argcomplete rosidl)" ++fi +diff --git a/rosidl_cli/completion/conda/rosidl.fish b/rosidl_cli/completion/conda/rosidl.fish +new file mode 100644 +index 0000000..cb164c7 +--- /dev/null ++++ b/rosidl_cli/completion/conda/rosidl.fish +@@ -0,0 +1,5 @@ ++# fish completion for rosidl, under the name fish loads on demand ++# (vendor_completions.d/.fish) ++if type -q register-python-argcomplete ++ register-python-argcomplete --shell fish rosidl | source ++end +diff --git a/rosidl_cli/setup.py b/rosidl_cli/setup.py +index 7b41f65..b1bf3a9 100644 +--- a/rosidl_cli/setup.py ++++ b/rosidl_cli/setup.py +@@ -23,6 +23,13 @@ setup( + 'completion/rosidl-argcomplete.bash', + 'completion/rosidl-argcomplete.zsh' + ]), ++ ++ # [conda] completion scripts under the names the shells load on demand ++ # (bash-completion: completions/, zsh: $fpath/_, fish: ++ # vendor_completions.d/.fish), which pixi shell activates ++ ('share/bash-completion/completions', ['completion/conda/rosidl']), ++ ('share/zsh/site-functions', ['completion/conda/_rosidl']), ++ ('share/fish/vendor_completions.d', ['completion/conda/rosidl.fish']), + ], + package_data={'': ['py.typed']}, + zip_safe=False, diff --git a/distros/rolling/patch/ros2-rosidl.patch b/distros/rolling/patch/ros2-rosidl.patch deleted file mode 100644 index 7d668c899..000000000 --- a/distros/rolling/patch/ros2-rosidl.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/rosidl_cli/completion/rosidl-argcomplete.zsh b/rosidl_cli/completion/rosidl-argcomplete.zsh -index 9a86dbd..a33f8e1 100644 ---- a/rosidl_cli/completion/rosidl-argcomplete.zsh -+++ b/rosidl_cli/completion/rosidl-argcomplete.zsh -@@ -18,6 +18,6 @@ autoload -U +X bashcompinit && bashcompinit - # Get this scripts directory - __rosidl_cli_completion_dir=${0:a:h} - # Just source the bash version, it works in zsh too --source "$__rosidl_cli_completion_dir/rosidl-argcomplete.bash" -+source "$CONDA_PREFIX/share/bash-completion/completions/rosidl-argcomplete.bash" - # Cleanup - unset __rosidl_cli_completion_dir -diff --git a/rosidl_cli/setup.py b/rosidl_cli/setup.py -index 7b41f65..36a71b3 100644 ---- a/rosidl_cli/setup.py -+++ b/rosidl_cli/setup.py -@@ -23,6 +23,14 @@ setup( - 'completion/rosidl-argcomplete.bash', - 'completion/rosidl-argcomplete.zsh' - ]), -+ -+ # [pixi] install autocompletion scripts -+ ('share/bash-completion/completions', [ -+ 'completion/rosidl-argcomplete.bash', -+ ]), -+ ('share/zsh/site-functions', [ -+ 'completion/rosidl-argcomplete.zsh' -+ ]), - ], - package_data={'': ['py.typed']}, - zip_safe=False, diff --git a/distros/rolling/patch/ros2-rplidar-ros.patch b/distros/rolling/patch/ros2-rplidar-ros.patch deleted file mode 100644 index 926541081..000000000 --- a/distros/rolling/patch/ros2-rplidar-ros.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 496fca1..fe9d13f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -26,6 +26,11 @@ FILE(GLOB RPLIDAR_SDK_SRC - ) - endif() - -+find_package(ament_cmake_auto REQUIRED) -+find_package(ament_cmake_ros REQUIRED) -+ -+ament_auto_find_build_dependencies(REQUIRED ${req_deps}) -+ - set(req_deps - "rclcpp" - "sensor_msgs" -@@ -33,10 +38,12 @@ set(req_deps - "rclcpp_components" - ) - --find_package(ament_cmake_auto REQUIRED) --find_package(ament_cmake_ros REQUIRED) -- --ament_auto_find_build_dependencies(REQUIRED ${req_deps}) -+set(req_target_deps -+ rclcpp::rclcpp -+ ${sensor_msgs_TARGETS} -+ ${std_srvs_TARGETS} -+ rclcpp_components::component -+) - - include_directories( - ${RPLIDAR_SDK_PATH}/include -@@ -49,13 +56,13 @@ add_library(rplidar_composition_node SHARED - src/rplidar_node.cpp - ${RPLIDAR_SDK_SRC} - ) --ament_target_dependencies(rplidar_composition_node ${req_deps}) -+target_link_libraries(rplidar_composition_node ${req_target_deps}) - rclcpp_components_register_nodes(rplidar_composition_node "rplidar_ros::rplidar_node") - - # build composition node - ament_auto_add_executable(rplidar_composition src/standalone_rplidar.cpp) - target_link_libraries(rplidar_composition rplidar_composition_node) --ament_target_dependencies(rplidar_composition ${req_deps}) -+target_link_libraries(rplidar_composition ${req_target_deps}) - - install( - TARGETS rplidar_composition diff --git a/distros/rolling/patch/ros2-sbg-driver.patch b/distros/rolling/patch/ros2-sbg-driver.patch deleted file mode 100644 index efd2b074c..000000000 --- a/distros/rolling/patch/ros2-sbg-driver.patch +++ /dev/null @@ -1,79 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a4a3964..4063ea2 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -23,17 +23,17 @@ find_package(builtin_interfaces REQUIRED) - ## Generate messages in the 'msg' folder - - set (USED_LIBRARIES -- rclcpp -- sensor_msgs -- std_msgs -- std_srvs -- geometry_msgs -- nav_msgs -- rtcm_msgs -- tf2_ros -- tf2_msgs -- tf2_geometry_msgs -- nmea_msgs -+ rclcpp::rclcpp -+ ${sensor_msgs_TARGETS} -+ ${std_msgs_TARGETS} -+ ${std_srvs_TARGETS} -+ ${geometry_msgs_TARGETS} -+ ${nav_msgs_TARGETS} -+ ${rtcm_msgs_TARGETS} -+ tf2_ros::tf2_ros -+ ${tf2_msgs_TARGETS} -+ ${tf2_geometry_msgs_TARGETS} -+ ${nmea_msgs_TARGETS} - ) - - set (msg_files -@@ -125,8 +125,8 @@ endif() - target_link_libraries(sbg_device sbgECom) - target_link_libraries(sbg_device_mag sbgECom) - --ament_target_dependencies(sbg_device ${USED_LIBRARIES}) --ament_target_dependencies(sbg_device_mag ${USED_LIBRARIES}) -+target_link_libraries(sbg_device ${USED_LIBRARIES}) -+target_link_libraries(sbg_device_mag ${USED_LIBRARIES}) - - rosidl_get_typesupport_target(cpp_typesupport_target "${PROJECT_NAME}" "rosidl_typesupport_cpp") - target_link_libraries(sbg_device "${cpp_typesupport_target}") -diff --git a/include/sbg_driver/sbg_vector3.h b/include/sbg_driver/sbg_vector3.h -index 0bc5b80..0b1b02c 100644 ---- a/include/sbg_driver/sbg_vector3.h -+++ b/include/sbg_driver/sbg_vector3.h -@@ -115,7 +115,7 @@ public: - * \param[in] p_raw_data Pointer to data array. - * \param[in] array_size Array size (Should be defined as 3). - */ -- SbgVector3(const T* p_raw_data, size_t array_size) -+ SbgVector3(const T* p_raw_data, [[maybe_unused]] size_t array_size) - { - assert(array_size == 3); - -diff --git a/src/sbg_device.cpp b/src/sbg_device.cpp -index 820322e..b802365 100644 ---- a/src/sbg_device.cpp -+++ b/src/sbg_device.cpp -@@ -5,6 +5,8 @@ - #include - #include - #include -+#include -+#include - - // SbgECom headers - #include -@@ -118,7 +120,7 @@ void SbgDevice::onLogReceived(SbgEComClass msg_class, SbgEComMsgId msg, const Sb - log_replay_last_timestamp_ = timestamp; - } - -- usleep(time_to_sleep); -+ std::this_thread::sleep_for(std::chrono::microseconds(time_to_sleep)); - } - - // diff --git a/distros/rolling/patch/ros2-sbg-driver.win.patch b/distros/rolling/patch/ros2-sbg-driver.win.patch deleted file mode 100644 index 25251e930..000000000 --- a/distros/rolling/patch/ros2-sbg-driver.win.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/src/sbg_utm.cpp b/src/sbg_utm.cpp -index b49e84c..e0791e7 100644 ---- a/src/sbg_utm.cpp -+++ b/src/sbg_utm.cpp -@@ -1,2 +1,4 @@ -+#define _USE_MATH_DEFINES -+ - // File header - -diff --git a/src/message_wrapper.cpp b/src/message_wrapper.cpp -index d0c0b6d..2a646b9 100644 ---- a/src/message_wrapper.cpp -+++ b/src/message_wrapper.cpp -@@ -19,3 +19,7 @@ -+#ifndef M_SQRT2 -+#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */ -+#endif -+ - /*! - * Class to wrap the SBG logs into ROS messages. - */ diff --git a/distros/rolling/patch/ros2-slam-toolbox.win.patch b/distros/rolling/patch/ros2-slam-toolbox.win.patch deleted file mode 100644 index 3245b1f87..000000000 --- a/distros/rolling/patch/ros2-slam-toolbox.win.patch +++ /dev/null @@ -1,212 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3880aa7..90ee2a6 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -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) - -+if(MSVC) -+ add_compile_definitions(_USE_MATH_DEFINES) -+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) -+endif() -+ - #### Tool lib for mapping - add_library(toolbox_common src/slam_toolbox_common.cpp src/map_saver.cpp src/loop_closure_assistant.cpp src/laser_utils.cpp src/slam_mapper.cpp) - ament_target_dependencies(toolbox_common -@@ -155,26 +160,43 @@ ament_target_dependencies(toolbox_common - target_link_libraries(toolbox_common kartoSlamToolbox ${Boost_LIBRARIES}) - rosidl_get_typesupport_target(cpp_typesupport_target ${PROJECT_NAME} "rosidl_typesupport_cpp") - target_link_libraries(toolbox_common "${cpp_typesupport_target}") -+set_target_properties(toolbox_common PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) - - #### Mapping executibles - add_library(async_slam_toolbox src/slam_toolbox_async.cpp) -+set_target_properties(async_slam_toolbox PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) - target_link_libraries(async_slam_toolbox toolbox_common kartoSlamToolbox ${Boost_LIBRARIES}) - add_executable(async_slam_toolbox_node src/slam_toolbox_async_node.cpp) -+if(MSVC) -+ target_compile_options(async_slam_toolbox_node PRIVATE "/F 40000000") -+endif() - target_link_libraries(async_slam_toolbox_node async_slam_toolbox) - - add_library(sync_slam_toolbox src/slam_toolbox_sync.cpp) -+set_target_properties(sync_slam_toolbox PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) - target_link_libraries(sync_slam_toolbox toolbox_common kartoSlamToolbox ${Boost_LIBRARIES}) - add_executable(sync_slam_toolbox_node src/slam_toolbox_sync_node.cpp) -+if(MSVC) -+ target_compile_options(sync_slam_toolbox_node PRIVATE "/F 40000000") -+endif() - target_link_libraries(sync_slam_toolbox_node sync_slam_toolbox) - - add_library(localization_slam_toolbox src/slam_toolbox_localization.cpp) -+set_target_properties(localization_slam_toolbox PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) - target_link_libraries(localization_slam_toolbox toolbox_common kartoSlamToolbox ${Boost_LIBRARIES}) - add_executable(localization_slam_toolbox_node src/slam_toolbox_localization_node.cpp) -+if(MSVC) -+ target_compile_options(localization_slam_toolbox_node PRIVATE "/F 40000000") -+endif() - target_link_libraries(localization_slam_toolbox_node localization_slam_toolbox) - - add_library(lifelong_slam_toolbox src/experimental/slam_toolbox_lifelong.cpp) -+set_target_properties(lifelong_slam_toolbox PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) - target_link_libraries(lifelong_slam_toolbox toolbox_common kartoSlamToolbox ${Boost_LIBRARIES}) - add_executable(lifelong_slam_toolbox_node src/experimental/slam_toolbox_lifelong_node.cpp) -+if(MSVC) -+ target_compile_options(lifelong_slam_toolbox_node PRIVATE "/F 40000000") -+endif() - target_link_libraries(lifelong_slam_toolbox_node lifelong_slam_toolbox) - - add_library(map_and_localization_slam_toolbox src/experimental/slam_toolbox_map_and_localization.cpp) -diff --git a/include/slam_toolbox/merge_maps_kinematic.hpp b/include/slam_toolbox/merge_maps_kinematic.hpp -index 95c9931..c159ab8 100644 ---- a/include/slam_toolbox/merge_maps_kinematic.hpp -+++ b/include/slam_toolbox/merge_maps_kinematic.hpp -@@ -21,7 +21,9 @@ - - #include - #include -+#ifndef _WIN32 - #include -+#endif - #include - #include - #include -diff --git a/include/slam_toolbox/slam_toolbox_common.hpp b/include/slam_toolbox/slam_toolbox_common.hpp -index 96bd049..d6e9630 100644 ---- a/include/slam_toolbox/slam_toolbox_common.hpp -+++ b/include/slam_toolbox/slam_toolbox_common.hpp -@@ -19,7 +19,9 @@ - #ifndef SLAM_TOOLBOX__SLAM_TOOLBOX_COMMON_HPP_ - #define SLAM_TOOLBOX__SLAM_TOOLBOX_COMMON_HPP_ - -+#ifndef _WIN32 - #include -+#endif - #include - #include - #include -@@ -35,7 +37,7 @@ - #include "bond/msg/constants.hpp" - #include "rclcpp_lifecycle/lifecycle_node.hpp" - #include "rclcpp_lifecycle/lifecycle_publisher.hpp" --#include "message_filters/subscriber.h" -+#include "message_filters/subscriber.hpp" - #include "tf2_ros/transform_broadcaster.h" - #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 ---- a/lib/karto_sdk/CMakeLists.txt -+++ b/lib/karto_sdk/CMakeLists.txt -@@ -5,7 +5,9 @@ if(NOT CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 17) - endif() - set(CMAKE_BUILD_TYPE Release) #None, Debug, Release, RelWithDebInfo, MinSizeRel --set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-backtrace-limit=0") -+if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-backtrace-limit=0") -+endif() - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") - - find_package(ament_cmake REQUIRED) -@@ -29,6 +31,7 @@ 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) -+target_compile_definitions(kartoSlamToolbox PRIVATE KARTO_DYNAMIC) - ament_target_dependencies(kartoSlamToolbox ${dependencies}) - target_link_libraries(kartoSlamToolbox ${Boost_LIBRARIES} TBB::tbb) - -diff --git a/lib/karto_sdk/src/Mapper.cpp b/lib/karto_sdk/src/Mapper.cpp -index e969404..d87d33f 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) - m_RunningBufferMaximumSize = rScanBufferSize; - - std::vector names = GetSensorNames(); -- for (uint i = 0; i != names.size(); i++) { -+ for (unsigned int i = 0; i != names.size(); i++) { - GetScanManager(names[i])->SetRunningScanBufferSize(rScanBufferSize); - } - } -@@ -415,7 +415,7 @@ void MapperSensorManager::SetRunningScanBufferMaximumDistance(kt_double rScanBuf - m_RunningBufferMaximumDistance = rScanBufferMaxDistance; - - std::vector names = GetSensorNames(); -- for (uint i = 0; i != names.size(); i++) { -+ for (unsigned int i = 0; i != names.size(); i++) { - GetScanManager(names[i])->SetRunningScanBufferMaximumDistance(rScanBufferMaxDistance); - } - } -@@ -1868,7 +1868,7 @@ std::vector *> MapperGraph::FindNearByVertices( - - std::vector *> rtn_vertices; - rtn_vertices.reserve(ret_matches.size()); -- for (uint i = 0; i != ret_matches.size(); i++) { -+ for (unsigned int i = 0; i != ret_matches.size(); i++) { - rtn_vertices.push_back(vertices_to_search[ret_matches[i].first]); - } - return rtn_vertices; -@@ -2984,7 +2984,7 @@ void Mapper::ClearLocalizationBuffer() - } - - std::vector names = m_pMapperSensorManager->GetSensorNames(); -- for (uint i = 0; i != names.size(); i++) -+ for (unsigned int i = 0; i != names.size(); i++) - { - m_pMapperSensorManager->ClearRunningScans(names[i]); - m_pMapperSensorManager->ClearLastScan(names[i]); -diff --git a/rviz_plugin/slam_toolbox_rviz_plugin.hpp b/rviz_plugin/slam_toolbox_rviz_plugin.hpp -index dafa5d0..905d515 100644 ---- a/rviz_plugin/slam_toolbox_rviz_plugin.hpp -+++ b/rviz_plugin/slam_toolbox_rviz_plugin.hpp -@@ -32,6 +32,7 @@ - #include - #include - #include -+#undef NO_ERROR - // STL - #include - #include -diff --git a/src/merge_maps_kinematic.cpp b/src/merge_maps_kinematic.cpp -index 3ee0bde..cc8e505 100644 ---- a/src/merge_maps_kinematic.cpp -+++ b/src/merge_maps_kinematic.cpp -@@ -105,7 +105,11 @@ bool MergeMapsKinematic::addSubmapCallback( - "/map_" + std::to_string(num_submaps_), rclcpp::QoS(1))); - sstmS_.push_back(this->create_publisher( - "/map_metadata_" + std::to_string(num_submaps_), rclcpp::QoS(1))); -+#ifdef _WIN32 -+ Sleep(1000); -+#else - sleep(1.0); -+#endif - - 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 ---- a/src/slam_toolbox_common.cpp -+++ b/src/slam_toolbox_common.cpp -@@ -52,6 +52,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)) { -+#ifdef _WIN32 -+ if (stack_size != 40'000'000) { -+ RCLCPP_WARN(get_logger(), "Can't dynamically change stack size on Windows to %i. Node using stack size 40000000", (int)stack_size); -+ } -+#else - 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) - stack_limit.rlim_cur = stack_size; - } - setrlimit(RLIMIT_STACK, &stack_limit); -+#endif - } - } - // server side never times out from lifecycle manager diff --git a/distros/rolling/patch/ros2-turtlebot3-node.win.patch b/distros/rolling/patch/ros2-turtlebot3-node.win.patch deleted file mode 100644 index 4e86ef0f5..000000000 --- a/distros/rolling/patch/ros2-turtlebot3-node.win.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/include/turtlebot3_node/odometry.hpp b/include/turtlebot3_node/odometry.hpp -index 75cf27e..7477d5c 100644 ---- a/include/turtlebot3_node/odometry.hpp -+++ b/include/turtlebot3_node/odometry.hpp -@@ -17,9 +17,9 @@ - #ifndef TURTLEBOT3_NODE__ODOMETRY_HPP_ - #define TURTLEBOT3_NODE__ODOMETRY_HPP_ - --#include --#include --#include -+#include -+#include -+#include - #include - #include - diff --git a/distros/rolling/pkg_additional_info.yaml b/distros/rolling/pkg_additional_info.yaml index 98bf257ce..12b860c86 100644 --- a/distros/rolling/pkg_additional_info.yaml +++ b/distros/rolling/pkg_additional_info.yaml @@ -87,6 +87,9 @@ gz_sim_vendor: ros2cli: # Rebuild with the shell completions under the names bash/zsh/fish load (patch). build_number: 30 +rosidl_cli: + # Rebuild with the shell completions installed under the names bash/zsh/fish load (patch). + build_number: 30 rqt_plot: # Rebuild with qt6-main 6.11 (b29 was built against qt6-main 6.12, which pyqt6 6.11 can't install with). build_number: 30 diff --git a/shared/tests/ros2-rosidl-cli.yaml b/shared/tests/ros2-rosidl-cli.yaml new file mode 100644 index 000000000..62e9d6947 --- /dev/null +++ b/shared/tests/ros2-rosidl-cli.yaml @@ -0,0 +1,14 @@ +tests: + # the completion scripts are installed under the names the shells load on demand, + # like ros2cli's (https://github.com/RoboStack/ros-humble/issues/271) + - script: + - if: unix + then: + - test -f ${PREFIX}/share/bash-completion/completions/rosidl + - test -f ${PREFIX}/share/zsh/site-functions/_rosidl + # only rolling's and lyrical's ros2cli install a fish completion, rosidl_cli follows + - if: ros_distro in ["rolling", "lyrical"] + then: + - test -f ${PREFIX}/share/fish/vendor_completions.d/rosidl.fish + # and the bash one registers a completion for rosidl (as pixi shell sources it) + - bash -c ". ${PREFIX}/share/bash-completion/completions/rosidl && complete -p rosidl" diff --git a/shared/tests/ros2-rosidl.yaml b/shared/tests/ros2-rosidl.yaml deleted file mode 100644 index 9a42672a3..000000000 --- a/shared/tests/ros2-rosidl.yaml +++ /dev/null @@ -1,7 +0,0 @@ -tests: - # Regression test for https://github.com/RoboStack/ros-humble/issues/271 - - script: - - if: unix - then: - - test -f ${PREFIX}/share/bash-completion/completions/rosidl-argcomplete.bash - - test -f ${PREFIX}/share/zsh/site-functions/rosidl-argcomplete.zsh diff --git a/tools/maintenance.py b/tools/maintenance.py index 1d3f0c811..385c4ffad 100644 --- a/tools/maintenance.py +++ b/tools/maintenance.py @@ -706,9 +706,20 @@ def mutex_problems(vinca: dict) -> list[str]: return [] +PATCH_NAME = re.compile(r"^ros2-(?P[a-z0-9-]+)(\.(osx|linux|win|unix|emscripten))?\.patch$") + + +def unmatched_patches(patches: list[str], packages: set[str]) -> list[str]: + """Patches named after none of `packages`: vinca only applies ros2-[.].patch, + so a misnamed patch (or one for a package that left the distribution) silently does nothing.""" + names = {p.replace("_", "-") for p in packages} + return [p for p in patches if (m := PATCH_NAME.match(p)) and m["package"] not in names] + + def check() -> Result: """Sanity checks: every distribution assembles and its generated files are consistent.""" problems: list[str] = [] + all_packages: set[str] = set() known = {"channel_name", "upload_target", "conda_forge_pinning_version", "conda_forge_migrations", "pinning_overrides", "rosdistro_sync"} for distro in rs.distros(): @@ -738,14 +749,23 @@ def check() -> Result: if not vinca.get(key): problems.append(f"{distro}: vinca.yaml has no {key}") problems += [f"{distro}: {p}" for p in mutex_problems(vinca)] - for patch in (d / "patch").glob("*.patch"): - if not re.match(r"^ros2-[a-z0-9-]+(\.(osx|linux|win|unix|emscripten))?\.patch$", patch.name): - problems.append(f"{distro}: patch {patch.name} should be named ros2-[.].patch") + patches = sorted(p.name for p in (d / "patch").glob("*.patch")) + for patch in patches: + if not PATCH_NAME.match(patch): + problems.append(f"{distro}: patch {patch} should be named ros2-[.].patch") + packages = _available(distro) + all_packages |= packages + for patch in unmatched_patches(patches, packages): + problems.append(f"{distro}: patch {patch} matches no package of the distribution, so it is never applied") rendered = d / "conda_build_config.yaml" before = rendered.read_text() if rendered.is_file() else "" if rs.task(distro, "render-pinning", []) or rendered.read_text() != before: problems.append(f"{distro}: conda_build_config.yaml is out of date (pixi run rs {distro} render-pinning)") rendered.write_text(before) + # a shared patch applies to every distribution that has the package + shared = sorted(p.name for p in (rs.SHARED / "patch").glob("*.patch")) + for patch in unmatched_patches(shared, all_packages): + problems.append(f"shared: patch {patch} matches no package of any distribution, so it is never applied") # file names: .yaml everywhere (GitHub requires FUNDING.yml by that name) for yml in sorted(p for p in (rs.ROOT / ".github").rglob("*.yml") if p.name != "FUNDING.yml"): problems.append(f"{yml.relative_to(rs.ROOT)}: use the .yaml extension") diff --git a/tools/tests/test_patch_names.py b/tools/tests/test_patch_names.py new file mode 100644 index 000000000..c178ed325 --- /dev/null +++ b/tools/tests/test_patch_names.py @@ -0,0 +1,18 @@ +"""vinca applies a patch only when its file name names a package of the distribution.""" + +import maintenance + + +def test_unmatched_patches(): + packages = {"rosidl_cli", "rmw_implementation_cmake"} + patches = [ + "ros2-rosidl-cli.patch", + "ros2-rmw-implementation-cmake.osx.patch", + "ros2-rosidl.patch", # names a package that doesn't exist + "ros2-rwm-implementation-cmake.osx.patch", # typo + "README.patch", # misnamed, reported by the naming check instead + ] + assert maintenance.unmatched_patches(patches, packages) == [ + "ros2-rosidl.patch", + "ros2-rwm-implementation-cmake.osx.patch", + ]