diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..1591282b --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +github: RoboStack +open_collective: robostack diff --git a/.github/workflows/build_robostack.yml b/.github/workflows/build_robostack.yml new file mode 100644 index 00000000..acea4da0 --- /dev/null +++ b/.github/workflows/build_robostack.yml @@ -0,0 +1,90 @@ +name: Build RoboStack installer +on: [workflow_dispatch] + +jobs: + build: + name: ${{ matrix.MINIFORGE_NAME }}-${{ matrix.OS_NAME }}-${{ matrix.ARCH }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: windows-latest + ARCH: x86_64 + MINIFORGE_NAME: "rosdesktop" + OS_NAME: "Windows" + + - os: macos-latest + ARCH: x86_64 + MINIFORGE_NAME: "rosdesktop" + OS_NAME: "MacOSX" + + - os: ubuntu-latest + ARCH: aarch64 + DOCKER_ARCH: arm64v8 + DOCKERIMAGE: condaforge/linux-anvil-aarch64 + MINIFORGE_NAME: "rosdesktop" + OS_NAME: "Linux" + + - os: ubuntu-latest + ARCH: x86_64 + DOCKER_ARCH: amd64 + DOCKERIMAGE: condaforge/linux-anvil-comp7 + MINIFORGE_NAME: "rosdesktop" + OS_NAME: "Linux" + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - uses: conda-incubator/setup-miniconda@v2 + with: + miniconda-version: "latest" + if: contains(matrix.OS_NAME, 'Windows') + + - name: Build and test miniforge + env: + ARCH: ${{ matrix.ARCH }} + MINIFORGE_NAME: ${{ matrix.MINIFORGE_NAME }} + OS_NAME: ${{ matrix.OS_NAME }} + DOCKERIMAGE: ${{ matrix.DOCKERIMAGE }} + DOCKER_ARCH: ${{ matrix.DOCKER_ARCH }} + run: | + cd constructor_scripts; + if [[ "$GITHUB_REF" == refs/tags/* ]]; then + export MINIFORGE_VERSION=${GITHUB_REF##*/}; + fi + if [[ "$OS_NAME" == "Linux" ]]; then + bash build_robostack_installer.sh; + EXT=sh + fi + if [[ "$OS_NAME" == "MacOSX" ]]; then + bash build_robostack_installer_osx.sh; + EXT=sh + fi + if [[ "$OS_NAME" == "Windows" ]]; then + source /c/Miniconda3/Scripts/activate; + source build_robostack_installer_win.sh; + EXT=exe + fi + # Copy for latest release + cp build/$MINIFORGE_NAME-*-$OS_NAME-$ARCH.$EXT build/$MINIFORGE_NAME-$OS_NAME-$ARCH.$EXT + ls -alh build + shell: bash + + - name: Upload robostack installer to Github artifact + # if: ${{ !startsWith(github.ref, 'refs/tags/') }} + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.MINIFORGE_NAME }}-${{ matrix.OS_NAME }}-${{ matrix.ARCH }} + path: constructor_scripts/build/${{ matrix.MINIFORGE_NAME }}-${{ matrix.OS_NAME }}-${{ matrix.ARCH }}* + + - name: Upload robostack installer to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: constructor_scripts/build/${{ matrix.MINIFORGE_NAME }}-${{ matrix.OS_NAME }}-${{ matrix.ARCH }}* + tag: ${{ github.ref }} + overwrite: true + file_glob: true + if: startsWith(github.ref, 'refs/tags/') \ No newline at end of file diff --git a/.scripts/build_linux.sh b/.scripts/build_linux.sh new file mode 100755 index 00000000..2b70ac2f --- /dev/null +++ b/.scripts/build_linux.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env bash + +# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here +# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent +# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also +# benefit from the improvement. + +set -xeuo pipefail +export PYTHONUNBUFFERED=1 +export FEEDSTOCK_ROOT="${FEEDSTOCK_ROOT:-/home/conda/feedstock_root}" +export RECIPE_ROOT="${RECIPE_ROOT:-/home/conda/recipe_root}" +# export CI_SUPPORT="${FEEDSTOCK_ROOT}/.ci_support" +# export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" + +cat >~/.condarc </dev/null && pwd )" +PROVIDER_DIR="$(basename $THISDIR)" + +FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) +RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe" + +if [ -z ${FEEDSTOCK_NAME} ]; then + export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) +fi + +docker info + +# In order for the conda-build process in the container to write to the mounted +# volumes, we need to run with the same id as the host machine, which is +# normally the owner of the mounted volumes, or at least has write permission +export HOST_USER_ID=$(id -u) +# Check if docker-machine is being used (normally on OSX) and get the uid from +# the VM +if hash docker-machine 2> /dev/null && docker-machine active > /dev/null; then + export HOST_USER_ID=$(docker-machine ssh $(docker-machine active) id -u) +fi + +ARTIFACTS="$FEEDSTOCK_ROOT/build_artifacts" + +# if [ -z "$CONFIG" ]; then +# set +x +# FILES=`ls .ci_support/linux_*` +# CONFIGS="" +# for file in $FILES; do +# CONFIGS="${CONFIGS}'${file:12:-5}' or "; +# done +# echo "Need to set CONFIG env variable. Value can be one of ${CONFIGS:0:-4}" +# exit 1 +# fi + +# if [ -z "${DOCKER_IMAGE}" ]; then +# SHYAML_INSTALLED="$(shyaml -h || echo NO)" +# if [ "${SHYAML_INSTALLED}" == "NO" ]; then +# echo "WARNING: DOCKER_IMAGE variable not set and shyaml not installed. Falling back to condaforge/linux-anvil-comp7" +# DOCKER_IMAGE="condaforge/linux-anvil-comp7" +# else +# DOCKER_IMAGE="$(cat "${FEEDSTOCK_ROOT}/.ci_support/${CONFIG}.yaml" | shyaml get-value docker_image.0 condaforge/linux-anvil-comp7 )" +# fi +# fi + +# DOCKER_IMAGE="condaforge/linux-anvil-comp7" +# Docker image is set in the pipeline + +mkdir -p "$ARTIFACTS" +# DONE_CANARY="$ARTIFACTS/conda-forge-build-done-${CONFIG}" +# rm -f "$DONE_CANARY" + +# Allow people to specify extra default arguments to `docker run` (e.g. `--rm`) +DOCKER_RUN_ARGS="${CONDA_FORGE_DOCKER_RUN_ARGS}" +if [ -z "${CI}" ]; then + DOCKER_RUN_ARGS="-it ${DOCKER_RUN_ARGS}" +fi + +export UPLOAD_PACKAGES="${UPLOAD_PACKAGES:-True}" +docker run --rm ${DOCKER_RUN_ARGS} \ + -v "${RECIPE_ROOT}":/home/conda/recipe_root:rw,z \ + -v "${FEEDSTOCK_ROOT}":/home/conda/feedstock_root:rw,z \ + -e HOST_USER_ID \ + -e UPLOAD_PACKAGES \ + -e GIT_BRANCH \ + -e UPLOAD_ON_BRANCH \ + -e CI \ + -e FEEDSTOCK_NAME \ + -e CPU_COUNT \ + -e ANACONDA_API_TOKEN \ + -e CURRENT_RECIPES \ + $DOCKER_IMAGE \ + bash \ + /home/conda/feedstock_root/${PROVIDER_DIR}/build_linux.sh + + # -e CONFIG \ + +# verify that the end of the script was reached +# test -f "$DONE_CANARY" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..321fdf43 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,63 @@ +# Contributing + +Many thanks for taking the time to read this and for contributing to RoboStack! + +This project is in early stages and we are looking for contributors to help it grow. +The developers are on [gitter](https://gitter.im/RoboStack/Lobby) where we discuss steps forward. + +We welcome all kinds of contribution -- code or non-code -- and value them +highly. We pledge to treat everyones contribution fairly and with respect and +we are here to help awesome pull requests over the finish line. + +Please note we have a code of conduct, and follow it in all your interactions with the project. + +We follow the [NumFOCUS code of conduct](https://numfocus.org/code-of-conduct). + + +# Adding new packages via pull requests +You can open a pull request that will get build automatically in our CI. + +An example can be found [here](https://github.com/RoboStack/ros-galactic/pull/44). Simply add the required packages to the `vinca_*.yaml` files, where the * indicates the desired platform (linux_64, osx, win or linux_aarch64). Ideally, try to add packages to all of these platforms. + +Sometimes, it may be required to patch the packages. An example of how to do so can be found in [this PR](https://github.com/RoboStack/ros-galactic/pull/32). + + +# Testing changes locally + +1. Install conda build tools in base environemnt: +``` +conda install -n base conda-build mamba +``` + +2. Create a new conda environment and add the conda-forge and robostack channels: +``` +conda create -n ros_galactic python=3.9 +conda activate ros_galactic +conda config --append channels defaults +conda config --add channels conda-forge +conda config --add channels robostack-experimental +conda config --set channel_priority strict +``` +3. Install some dependencies: +``` +mamba install anaconda-client catkin_pkg ruamel_yaml rosdistro empy networkx requests ruamel ruamel.yaml boa +``` +4. Install vinca: `pip install git+https://github.com/RoboStack/vinca.git@master --no-deps` +5. Clone this repo: `git clone https://github.com/RoboStack/ros-galactic.git` +6. `cd ros-galactic` +7. `cp vinca_linux_64.yaml vinca.yaml` (replace with your platform as necessary) +8. Modify `vinca.yaml` as you please, e.g. add new packages to be built. +9. Run vinca to generate the recipe by executing `vinca --multiple` +10. Copy the generated recipe to the current folder: `cp recipes/ros-galactic-XXX.yaml recipe.yaml` - note that at least one package needs to be (re)build for this folder to show up. See more info below. +11. Build the recipe using boa: `boa build . -m ./.ci_support/conda_forge_pinnings.yaml -m ./conda_build_config.yaml` + +# How does it work? +- The `vinca.yaml` file specifies which packages should be built. + - Add the desired package under `packages_select_by_deps`. This will automatically pull in all dependencies of that package, too. + - Note that all packages that are already build in one of the channels listed under `skip_existing` will be skipped. You can also add your local channel to that list by e.g. adding `/home/ubuntu/miniconda3/conda-bld/linux-64/repodata.json`. + - If you want to manually skip packages, you can list them under `packages_skip_by_deps`. + - If you set `skip_all_deps` to `True`, you will only build packages listed under `packages_select_by_deps` but none of their dependencies. + - The `packages_remove_from_deps` list allows you to never build packages, even if they are listed as dependencies of other packages. We use it for e.g. the stage simulator which is not available in conda-forge, but is listed as one of the dependencies of the ros-simulator metapackage. + - If you want to manually rebuild a package that already exists, you need to comment out the channels listed under `skip_existing`. You probably want to set `skip_all_deps: true`, otherwise all dependencies will be rebuilt in this case. +- If the package does not build successfully out of the box, you might need to patch it. To do so, create a new file `ros-galactic-$PACKAGENAME.patch` in the `patch` directory (replace `$PACKAGENAME$` with the name of the package, and replace any underscores with hyphens). You can also use platform specifiers to only apply the patch on a specific platform, e.g. `ros-galactic-$PACKAGENAME.win.patch`. +- The `robostack.yaml` and `packages-ignore.yaml` files are the equivalent of the [rosdep.yaml](http://wiki.ros.org/rosdep/rosdep.yaml) and translate ROS dependencies into conda package names (or in the case of the dependencies listed in `packages-ignore.yaml` the dependencies are ignored by specifying an empty list). diff --git a/README.md b/README.md new file mode 100644 index 00000000..465132da --- /dev/null +++ b/README.md @@ -0,0 +1,63 @@ +# Contributing + +Many thanks for taking the time to read this and for contributing to RoboStack! + +This project is in early stages and we are looking for contributors to help it grow. +The developers are on [gitter](https://gitter.im/RoboStack/Lobby) where we discuss steps forward. + +We welcome all kinds of contribution -- code or non-code -- and value them +highly. We pledge to treat everyones contribution fairly and with respect and +we are here to help awesome pull requests over the finish line. + +Please note we have a code of conduct, and follow it in all your interactions with the project. + +We follow the [NumFOCUS code of conduct](https://numfocus.org/code-of-conduct). + + +# Adding new packages via pull requests +You can open a pull request that will get build automatically in our CI. + +An example can be found [here](https://github.com/RoboStack/ros-humble/pull/44). Simply add the required packages to the `vinca_*.yaml` files, where the * indicates the desired platform (linux_64, osx, win or linux_aarch64). Ideally, try to add packages to all of these platforms. + +Sometimes, it may be required to patch the packages. An example of how to do so can be found in [this PR](https://github.com/RoboStack/ros-humble/pull/32). + + +# Testing changes locally + +1. Install conda build tools in base environemnt: +``` +conda install -n base conda-build mamba +``` + +2. Create a new conda environment and add the conda-forge and robostack channels: +``` +conda create -n ros_humble python=3.9 +conda activate ros_humble +conda config --append channels defaults +conda config --add channels conda-forge +conda config --add channels robostack-experimental +conda config --set channel_priority strict +``` +3. Install some dependencies: +``` +mamba install anaconda-client catkin_pkg ruamel_yaml rosdistro empy networkx requests ruamel ruamel.yaml boa +``` +4. Install vinca: `pip install git+https://github.com/RoboStack/vinca.git@master --no-deps` +5. Clone this repo: `git clone https://github.com/RoboStack/ros-humble.git` +6. `cd ros-humble` +7. `cp vinca_linux_64.yaml vinca.yaml` (replace with your platform as necessary) +8. Modify `vinca.yaml` as you please, e.g. add new packages to be built. +9. Run vinca to generate the recipe by executing `vinca --multiple` +10. Copy the generated recipe to the current folder: `cp recipes/ros-humble-XXX.yaml recipe.yaml` - note that at least one package needs to be (re)build for this folder to show up. See more info below. +11. Build the recipe using boa: `boa build . -m ./.ci_support/conda_forge_pinnings.yaml -m ./conda_build_config.yaml` + +# How does it work? +- The `vinca.yaml` file specifies which packages should be built. + - Add the desired package under `packages_select_by_deps`. This will automatically pull in all dependencies of that package, too. + - Note that all packages that are already build in one of the channels listed under `skip_existing` will be skipped. You can also add your local channel to that list by e.g. adding `/home/ubuntu/miniconda3/conda-bld/linux-64/repodata.json`. + - If you want to manually skip packages, you can list them under `packages_skip_by_deps`. + - If you set `skip_all_deps` to `True`, you will only build packages listed under `packages_select_by_deps` but none of their dependencies. + - The `packages_remove_from_deps` list allows you to never build packages, even if they are listed as dependencies of other packages. We use it for e.g. the stage simulator which is not available in conda-forge, but is listed as one of the dependencies of the ros-simulator metapackage. + - If you want to manually rebuild a package that already exists, you need to comment out the channels listed under `skip_existing`. You probably want to set `skip_all_deps: true`, otherwise all dependencies will be rebuilt in this case. +- If the package does not build successfully out of the box, you might need to patch it. To do so, create a new file `ros-humble-$PACKAGENAME.patch` in the `patch` directory (replace `$PACKAGENAME$` with the name of the package, and replace any underscores with hyphens). You can also use platform specifiers to only apply the patch on a specific platform, e.g. `ros-humble-$PACKAGENAME.win.patch`. +- The `robostack.yaml` and `packages-ignore.yaml` files are the equivalent of the [rosdep.yaml](http://wiki.ros.org/rosdep/rosdep.yaml) and translate ROS dependencies into conda package names (or in the case of the dependencies listed in `packages-ignore.yaml` the dependencies are ignored by specifying an empty list). diff --git a/additional_recipes/ros2-distro-mutex/recipe.yaml b/additional_recipes/ros2-distro-mutex/recipe.yaml new file mode 100644 index 00000000..5c1f9804 --- /dev/null +++ b/additional_recipes/ros2-distro-mutex/recipe.yaml @@ -0,0 +1,51 @@ +package: + name: ros2-distro-mutex + version: 0.2.0 + +build: + number: 0 + string: humble + run_exports: + # NOTE MANUALLY EDIT THIS!!!! + - ros2-distro-mutex 0.1 humble + +requirements: + # NOTE: + # The idea with automatically adding versions to run_exports doesn't + # work since we don't want all these dependencies as run deps of all ROS + # packages. Therefore I am currently manually adding them to run_constrained. + # This has to be synchronized with our current conda_build_config all the time :( + # host: + # # values here should + # - boost-cpp + # - log4cxx + # - poco + # - pcl + # - opencv + # - gazebo + # - ogre + # - qt + # run: + # values here should be applied from run_exports! + # if the upstream package does not have run_exports + # please change it in the conda_build_config.yaml! + run_constrained: + - boost-cpp 1.74 + - log4cxx 0.11 + - pcl 1.12 + - libopencv 4.5.5 + - poco 1.11 + - gazebo 11 + - ogre 1.12 + - libpqxx 6 + +about: + home: https://github.com/robostack/ros-humble + license: BSD-3-Clause + summary: | + The ROS2 distro mutex. To switch between ROS2 versions, you need to change the mutex. + E.g. mamba install ros2-distro-mutex=*=humble to switch to humble. + +extra: + recipe-maintainers: + - ros-forge diff --git a/packages-ignore.yaml b/packages-ignore.yaml new file mode 100644 index 00000000..eb1a6162 --- /dev/null +++ b/packages-ignore.yaml @@ -0,0 +1,40 @@ +# This package is closed source?! +rti-connext-dds-5.3.1: + conda-forge: [] + +# rmw_cyclonedds_cpp: +# conda-forge: [] +# rviz_ogre_vendor: +# conda-forge: [] +rmw_opensplice_cpp: + conda-forge: [] +# rmw_connext_cpp: +# conda-forge: [] +# gmock_vendor: +# conda-forge: [] +# gtest_vendor: +# conda-forge: [] +# libyaml_vendor: +# conda-forge: [] +# connext_cmake_module: +# conda-forge: [] +# opensplice_cmake_module: +# conda-forge: [] +# rosidl_typesupport_connext_c: +# conda-forge: [] +# rosidl_typesupport_connext_cpp: +# conda-forge: [] +# rosidl_typesupport_opensplice_cpp: +# conda-forge: [] +# rosidl_typesupport_opensplice_c: +# conda-forge: [] +# test_msgs: +# conda-forge: [] +# rttest: +# conda-forge: [] +# tlsf: +# conda-forge: [] +# tlsf_cpp: +# conda-forge: [] +# pendulum_control: +# conda-forge: [] diff --git a/patch/dependencies.yaml b/patch/dependencies.yaml new file mode 100644 index 00000000..4e2f52d3 --- /dev/null +++ b/patch/dependencies.yaml @@ -0,0 +1,124 @@ +cartographer_ros: + add_host: ["cartographer 1.*"] +ackermann_msgs: + add_host: ["numpy"] + add_run: ["numpy"] +velodyne_pointcloud: + add_host: ["pkg-config"] +iceoryx_utils: + add_host: ["pkg-config"] +cartographer: + add_host: ["pkg-config"] +libyaml_vendor: + add_host: ["yaml-cpp", "yaml"] + add_run: ["yaml-cpp", "yaml"] +yaml_cpp_vendor: + add_host: ["yaml-cpp"] + add_run: ["yaml-cpp"] +zstd_vendor: + add_host: ["zstd", {sel(not win): zstd-static}] + add_run: ["zstd"] +sqlite3_vendor: + add_host: ["sqlite"] + add_run: ["sqlite"] +foonathan_memory_vendor: + add_host: ["foonathan-memory"] + add_run: ["foonathan-memory"] +rviz_assimp_vendor: + add_host: ["assimp"] + add_run: ["assimp"] +sdl2_vendor: + add_host: ["sdl2"] + add_run: ["sdl2"] +libcurl_vendor: + add_host: ["libcurl"] + add_run: ["libcurl"] +intra_process_demo: + add_host: ["REQUIRE_OPENGL"] +rviz_ogre_vendor: + add_host: ["ogre"] + add_run: ["assimp"] +pcl_conversions: + add_host: ["REQUIRE_OPENGL"] +pcl_ros: + add_host: ["REQUIRE_OPENGL"] +rviz_rendering: + add_host: ["glew"] +behaviortree_cpp_v3: + add_host: ["boost-cpp", "cppzmq"] + add_run: ["boost-cpp"] +nav2_util: + add_host: ["boost-cpp"] +plotjuggler: + add_host: ["libxcb", "elfutils", "ros-galactic-ros-workspace"] +# rviz_ogre_vendor: +# add_host: ["ogre"] +# add_run: ["ogre"] +embree_vendor: + add_host: ["REQUIRE_OPENGL", "libpng", "libjpeg-turbo", "openimageio", "tbb", "tbb-devel", "embree"] +ign_rviz_common: + add_host: ["REQUIRE_OPENGL"] +ign_rviz: + add_host: ["REQUIRE_OPENGL"] +ign_rviz_plugins: + add_host: ["REQUIRE_OPENGL"] +image_view: + add_host: ["REQUIRE_OPENGL"] +nao_lola: + add_host: ["boost"] +ros_ign_gazebo: + add_host: ["ros-galactic-std-msgs", "ros-galactic-rclcpp"] +ros_ign_gazebo_demos: + add_host: ["REQUIRE_OPENGL"] +rosbag2_bag_v2_plugins: + add_host: ["ros-noetic-roscpp"] +tvm_vendor: + add_host: ["libblas", "openblas", "libcblas"] +libphidget22: + add_host: ["libusb"] +libg2o: + add_host: ["qt", "libglu", "freeglut"] +fmilibrary_vendor: + add_host: ["fmilib"] +mrpt2: + add_host: ["assimp", "octomap", "tinyxml2", "boost-cpp", "jsoncpp", "gtest", "boost", "libdc1394", "xorg-libxcomposite", "libftdi", "ros-galactic-octomap", "pkg-config"] + add_run: ["assimp", "octomap", "tinyxml2", "boost-cpp", "jsoncpp", "gtest", "boost", "libdc1394", "xorg-libxcomposite", "libftdi", "ros-galactic-octomap"] + add_build: [{"sel(linux)": "{{ cdt('libxcomposite-devel') }}"}] +ros1_rosbag_storage_vendor: + add_host: ["ros-noetic-roscpp", "ros-noetic-roslz4", "ros-noetic-rostest"] + add_run: ["ros-noetic-roscpp", "ros-noetic-roslz4"] +popf: + add_host: ["perl"] +rtabmap: + add_host: ["REQUIRE_OPENGL", "ceres-solver", "libdc1394", "numpy", "pkg-config", "libusb", "vtk"] +backward_ros: + add_host: [{sel(linux or (osx and x86_64)): binutils}, {sel(linux): elfutils}] +nav2_smac_planner: + add_build: [{"sel(osx)": "llvm-openmp"}] + add_host: [{"sel(osx)": "llvm-openmp"}] +pybind11_vendor: + add_host: ["pybind11"] + add_run: ["pybind11"] +action_tutorials_interfaces: + add_host: ["numpy"] + add_run: ["numpy"] +map_msgs: + add_host: ["numpy"] + add_run: ["numpy"] +example_interfaces: + add_host: ["numpy"] + add_run: ["numpy"] +pendulum_msgs: + add_host: ["numpy"] + add_run: ["numpy"] +dwb_msgs: + add_host: ["numpy"] + add_run: ["numpy"] +python_qt_binding: + add_host: ["pyqt-builder"] + add_run: ["pyqt-builder"] +qt_gui_cpp: + add_host: ["pyqt-builder"] + add_run: ["pyqt-builder"] +moveit_ros_planning: + add_host: ["pkg-config"] diff --git a/patch/ros-galactic-ament-cmake-core.patch b/patch/ros-galactic-ament-cmake-core.patch new file mode 100644 index 00000000..555f3fc9 --- /dev/null +++ b/patch/ros-galactic-ament-cmake-core.patch @@ -0,0 +1,18 @@ +diff --git a/cmake/package_templates/templates_2_cmake.py b/cmake/package_templates/templates_2_cmake.py +index b7c0faf..328cc38 100644 +--- a/cmake/package_templates/templates_2_cmake.py ++++ b/cmake/package_templates/templates_2_cmake.py +@@ -68,12 +68,7 @@ def generate_cmake_code(): + """ + variables = [] + +- if not IS_WINDOWS: +- variables.append(( +- 'ENVIRONMENT_HOOK_LIBRARY_PATH', +- '"%s"' % get_environment_hook_template_path('library_path.sh'))) +- else: +- variables.append(('ENVIRONMENT_HOOK_LIBRARY_PATH', '')) ++ variables.append(('ENVIRONMENT_HOOK_LIBRARY_PATH', '')) + + ext = '.bat.in' if IS_WINDOWS else '.sh.in' + variables.append(( diff --git a/patch/ros-galactic-ament-package.patch b/patch/ros-galactic-ament-package.patch new file mode 100644 index 00000000..ae032894 --- /dev/null +++ b/patch/ros-galactic-ament-package.patch @@ -0,0 +1,22 @@ +diff --git a/ament_package/template/environment_hook/library_path.sh b/ament_package/template/environment_hook/library_path.sh +deleted file mode 100644 +index 292e518..0000000 +--- a/ament_package/template/environment_hook/library_path.sh ++++ /dev/null +@@ -1,16 +0,0 @@ +-# copied from ament_package/template/environment_hook/library_path.sh +- +-# detect if running on Darwin platform +-_UNAME=`uname -s` +-_IS_DARWIN=0 +-if [ "$_UNAME" = "Darwin" ]; then +- _IS_DARWIN=1 +-fi +-unset _UNAME +- +-if [ $_IS_DARWIN -eq 0 ]; then +- ament_prepend_unique_value LD_LIBRARY_PATH "$AMENT_CURRENT_PREFIX/lib" +-else +- ament_prepend_unique_value DYLD_LIBRARY_PATH "$AMENT_CURRENT_PREFIX/lib" +-fi +-unset _IS_DARWIN diff --git a/patch/ros-galactic-apriltag.patch b/patch/ros-galactic-apriltag.patch new file mode 100644 index 00000000..1c482813 --- /dev/null +++ b/patch/ros-galactic-apriltag.patch @@ -0,0 +1,13 @@ +diff --git a/python_build_flags.py b/python_build_flags.py +index f3f0e79..865c85b 100644 +--- a/python_build_flags.py ++++ b/python_build_flags.py +@@ -21,7 +21,7 @@ + print(conf.get('BLDSHARED', '').split()[0], end=';') + + print('LDFLAGS', end=';') +-print(' '.join(conf.get('BLDSHARED', '').split()[1:]) + ' ' + conf.get('BLDLIBRARY', '') + ' ' + conf.get('LDFLAGS', ''), end=';') ++print(' '.join(conf.get('BLDSHARED', '').split()[1:]) + ' ' + conf.get('LDFLAGS', ''), end=';') + + print('EXT_SUFFIX', end=';') + ext_suffix = '.so' diff --git a/patch/ros-galactic-backward-ros.patch b/patch/ros-galactic-backward-ros.patch new file mode 100644 index 00000000..e8fc7b31 --- /dev/null +++ b/patch/ros-galactic-backward-ros.patch @@ -0,0 +1,20 @@ +diff --git a/cmake/BackwardConfigAment.cmake b/cmake/BackwardConfigAment.cmake +index 273a51a..aefb857 100644 +--- a/cmake/BackwardConfigAment.cmake ++++ b/cmake/BackwardConfigAment.cmake +@@ -24,5 +24,14 @@ foreach(lib ${backward_ros_forced_LIBRARIES}) + set(backward_ros_full_path_LIBRARIES "${backward_ros_full_path_LIBRARIES} ${lib}") + endif() + endforeach() +-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--no-as-needed ${backward_ros_full_path_LIBRARIES} -Wl,--as-needed ${CMAKE_EXE_LINKER_FLAGS}") ++ ++set(no_as_needed) ++set(as_needed) ++ ++if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") ++ set(no_as_needed "-Wl,--no-as-needed") ++ set(as_needed "-Wl,--as-needed") ++endif() ++ ++SET(CMAKE_EXE_LINKER_FLAGS "${no_as_needed} ${backward_ros_full_path_LIBRARIES} ${as_needed} ${CMAKE_EXE_LINKER_FLAGS}") + diff --git a/patch/ros-galactic-behaviortree-cpp-v3.win.patch b/patch/ros-galactic-behaviortree-cpp-v3.win.patch new file mode 100644 index 00000000..93dd7423 --- /dev/null +++ b/patch/ros-galactic-behaviortree-cpp-v3.win.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a390aed..fa4f293 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -200,7 +200,8 @@ endif() + if (WIN32) + set(CMAKE_DEBUG_POSTFIX "d") + list(APPEND BT_SOURCE src/shared_library_WIN.cpp ) +- add_library(${BEHAVIOR_TREE_LIBRARY} STATIC ${BT_SOURCE} ) ++ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) ++ add_library(${BEHAVIOR_TREE_LIBRARY} SHARED ${BT_SOURCE} ) + endif() + + if( ZMQ_FOUND ) diff --git a/patch/ros-galactic-bondcpp.osx.patch b/patch/ros-galactic-bondcpp.osx.patch new file mode 100644 index 00000000..82bde64f --- /dev/null +++ b/patch/ros-galactic-bondcpp.osx.patch @@ -0,0 +1,32 @@ +diff --git a/bondcpp/CMakeLists.txt b/bondcpp/CMakeLists.txt +index f84c947..c4d2b15 100644 +--- a/bondcpp/CMakeLists.txt ++++ b/bondcpp/CMakeLists.txt +@@ -16,25 +16,19 @@ find_package(rclcpp_lifecycle REQUIRED) + find_package(smclib REQUIRED) + find_package(Threads REQUIRED) + +-find_package(PkgConfig REQUIRED) +-pkg_check_modules(UUID REQUIRED uuid) +-# we have to find the absolute path to uuid as target_link_directories is not available before cmake 3.13 +-find_library(uuid_ABS_PATH ${UUID_LIBRARIES} PATHS ${UUID_LIBRARY_DIRS}) +- + add_library(${PROJECT_NAME} + SHARED + src/bond.cpp + src/BondSM_sm.cpp) + target_include_directories(${PROJECT_NAME} PUBLIC + $ +- $ +- ${UUID_INCLUDE_DIRS}) ++ $) + ament_target_dependencies(${PROJECT_NAME} + bond + rclcpp + rclcpp_lifecycle + smclib) +-target_link_libraries(${PROJECT_NAME} ${uuid_ABS_PATH}) ++target_link_libraries(${PROJECT_NAME}) + + install( + TARGETS ${PROJECT_NAME} diff --git a/patch/ros-galactic-bondcpp.win.patch b/patch/ros-galactic-bondcpp.win.patch new file mode 100644 index 00000000..a01dc87f --- /dev/null +++ b/patch/ros-galactic-bondcpp.win.patch @@ -0,0 +1,34 @@ +diff --git a/bondcpp/CMakeLists.txt b/bondcpp/CMakeLists.txt +index f84c947..987924a 100644 +--- a/bondcpp/CMakeLists.txt ++++ b/bondcpp/CMakeLists.txt +@@ -5,9 +5,12 @@ if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 14) + endif() + ++set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) ++ + if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + add_compile_options(-Wall -Wextra -Wpedantic) + endif() ++add_definitions(-DNOMINMAX) + + find_package(ament_cmake REQUIRED) + find_package(bond REQUIRED) +@@ -17,9 +20,13 @@ find_package(smclib REQUIRED) + find_package(Threads REQUIRED) + + find_package(PkgConfig REQUIRED) +-pkg_check_modules(UUID REQUIRED uuid) +-# we have to find the absolute path to uuid as target_link_directories is not available before cmake 3.13 +-find_library(uuid_ABS_PATH ${UUID_LIBRARIES} PATHS ${UUID_LIBRARY_DIRS}) ++if (NOT WIN32) ++ pkg_check_modules(UUID REQUIRED uuid) ++ # we have to find the absolute path to uuid as target_link_directories is not available before cmake 3.13 ++ find_library(uuid_ABS_PATH ${UUID_LIBRARIES} PATHS ${UUID_LIBRARY_DIRS}) ++else () ++ set(uuid_ABS_PATH Rpcrt4.lib) ++endif () + + add_library(${PROJECT_NAME} + SHARED diff --git a/patch/ros-galactic-cartographer-ros.patch b/patch/ros-galactic-cartographer-ros.patch new file mode 100644 index 00000000..5da87dd1 --- /dev/null +++ b/patch/ros-galactic-cartographer-ros.patch @@ -0,0 +1,46 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ae3c115..4b361d5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -48,7 +48,14 @@ find_package(tf2_eigen REQUIRED) + find_package(tf2_msgs REQUIRED) + find_package(visualization_msgs REQUIRED) + +-find_package(LuaGoogle REQUIRED) ++# find_package(LuaGoogle REQUIRED) ++if(WIN32) ++ find_library(LUA_LIBRARY NAMES lua) ++ set(LUA_LIBRARIES "${LUA_LIBRARY}") ++else() ++ set(LUA_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/liblua${CMAKE_SHARED_LIBRARY_SUFFIX}) ++endif() ++find_package(Lua REQUIRED) + find_package(PCL REQUIRED COMPONENTS common) + find_package(Eigen3 REQUIRED) + find_package(urdfdom_headers REQUIRED) +@@ -59,6 +66,14 @@ if(DEFINED urdfdom_headers_VERSION) + endif() + endif() + ++find_package(gflags REQUIRED) ++find_package(glog REQUIRED) ++find_package(Protobuf REQUIRED) ++ ++find_package(PkgConfig) ++pkg_search_module(cairo cairo REQUIRED) ++ ++ + include_directories( + include + "." +@@ -105,7 +120,9 @@ ament_target_dependencies(${PROJECT_NAME} PUBLIC + ) + add_subdirectory("cartographer_ros") + +-target_link_libraries(${PROJECT_NAME} PUBLIC cartographer) ++target_link_directories(${PROJECT_NAME} PUBLIC ${cairo_LIBRARY_DIRS}) ++target_link_libraries(${PROJECT_NAME} PUBLIC cartographer ${gflags_LIBRARIES} ${glog_LIBRARIES} ${cairo_LINK_LIBRARIES} ${Protobuf_LIBRARIES}) ++target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${cartographer_INCLUDE_DIRS}) + + # Lua + target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${LUA_INCLUDE_DIR}) diff --git a/patch/ros-galactic-cv-bridge.patch b/patch/ros-galactic-cv-bridge.patch new file mode 100644 index 00000000..d5e81df0 --- /dev/null +++ b/patch/ros-galactic-cv-bridge.patch @@ -0,0 +1,87 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 642d32f..f0d26ac 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,30 +12,12 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + add_compile_options(-Wall -Wextra) + endif() + +-if(NOT ANDROID) +- find_package(PythonLibs) +- if(PYTHONLIBS_VERSION_STRING VERSION_LESS 3) +- find_package(Boost REQUIRED python) +- else() +- find_package(Boost QUIET) +- if(Boost_VERSION LESS 106500) +- find_package(Boost REQUIRED python) +- else() +- # This is a bit of a hack to suppress a warning +- # No header defined for python3; skipping header check +- # Which should only affect Boost versions < 1.67 +- # Resolution for newer versions: +- # https://gitlab.kitware.com/cmake/cmake/issues/16391 +- if (Boost_VERSION LESS 106700) +- set(_Boost_PYTHON3_HEADERS "boost/python.hpp") +- endif() +- find_package(Boost COMPONENTS python3 REQUIRED) +- endif() +- endif() +-else() +- find_package(Boost REQUIRED) ++if(WIN32) ++add_definitions(/DBOOST_PYTHON_STATIC_LIB) + endif() + ++find_package(Boost REQUIRED python) ++ + find_package(sensor_msgs REQUIRED) + + find_package(OpenCV 4 QUIET +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 9e2cf45..9581fd4 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -10,9 +10,14 @@ ament_target_dependencies(${PROJECT_NAME} + "OpenCV" + "sensor_msgs" + ) ++link_directories(${Boost_LIBRARY_DIRS}) + target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES} ${OpenCV_LIBRARIES}) + +-install(TARGETS ${PROJECT_NAME} DESTINATION lib) ++install(TARGETS ${PROJECT_NAME} ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib ++ RUNTIME DESTINATION bin ++) + + install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}_export.h +@@ -38,7 +43,7 @@ if(NOT PYTHON_NUMPY_INCLUDE_DIR) + endif() + endif() + +-include_directories(${PYTHON_INCLUDE_PATH} ${PYTHON_NUMPY_INCLUDE_DIR}) ++include_directories(${PYTHON_INCLUDE_PATH} ${PYTHON_NUMPY_INCLUDE_DIR} ${Boost_INCLUDE_DIRS}) + + if(PYTHON_VERSION_MAJOR VERSION_EQUAL 3) + add_definitions(-DPYTHON3) +@@ -56,6 +61,7 @@ endif() + target_link_libraries(${PROJECT_NAME}_boost + ${PYTHON_LIBRARIES} + ${PROJECT_NAME} ++ ${Boost_LIBRARIES} + ) + + set_target_properties(${PROJECT_NAME}_boost PROPERTIES +@@ -66,6 +72,10 @@ if(APPLE) + set_target_properties(${PROJECT_NAME}_boost PROPERTIES + SUFFIX ".so") + endif() ++if(MSVC) ++ set_target_properties(${PROJECT_NAME}_boost PROPERTIES ++ SUFFIX ".pyd") ++endif() + + install(TARGETS ${PROJECT_NAME}_boost DESTINATION ${PYTHON_INSTALL_DIR}/${PROJECT_NAME}/boost/) + endif() diff --git a/patch/ros-galactic-cyclonedds.patch b/patch/ros-galactic-cyclonedds.patch new file mode 100644 index 00000000..370d535e --- /dev/null +++ b/patch/ros-galactic-cyclonedds.patch @@ -0,0 +1,777 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1e8eef1..2fda4c7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -27,6 +27,12 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + "Debug" "Release" "MinSizeRel" "RelWithDebInfo") + endif() + ++if(CMAKE_CROSSCOMPILING) ++ set(not_crosscompiling OFF) ++else() ++ set(not_crosscompiling ON) ++endif() ++ + # By default don't treat warnings as errors, else anyone building it with a different compiler that + # just happens to generate a warning, as well as anyone adding or modifying something and making a + # small mistake would run into errors. CI builds can be configured differently. +@@ -34,7 +40,9 @@ option(WERROR "Treat compiler warnings as errors" OFF) + + set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/Modules") + +-option(BUILD_IDLC "Build IDL preprocessor" ON) ++option(BUILD_IDLC "Build IDL preprocessor" ${not_crosscompiling}) ++option(BUILD_DDSCONF "Build DDSCONF buildtool" ${not_crosscompiling}) ++ + + set(CMAKE_C_STANDARD 99) + if(CMAKE_SYSTEM_NAME STREQUAL "VxWorks") +@@ -238,15 +246,11 @@ set(MEMORYCHECK_COMMAND_OPTIONS "--track-origins=yes --leak-check=full --trace-c + # since not everybody has CUnit, and because it is not strictly required to + # build the product itself, switch to off by default. + option(BUILD_TESTING "Build the testing tree." OFF) ++ + # Disable building examples by default because it is not strictly required. + option(BUILD_EXAMPLES "Build examples." OFF) + + option(BUILD_DOCS "Build documentation." OFF) +-if(CMAKE_CROSSCOMPILING) +- set(not_crosscompiling OFF) +-else() +- set(not_crosscompiling ON) +-endif() + option(BUILD_SCHEMA "Build generated schema for configuration options." ${not_crosscompiling}) + + # Build all executables and libraries into the top-level /bin and /lib folders. +@@ -303,7 +307,7 @@ install( + COMPONENT dev) + + add_subdirectory(src) +-if(BUILD_IDLC AND BUILD_EXAMPLES) ++if(BUILD_EXAMPLES) + add_subdirectory(examples) + endif() + +diff --git a/cmake/Modules/Generate.cmake b/cmake/Modules/Generate.cmake +new file mode 100644 +index 0000000..c5c0d67 +--- /dev/null ++++ b/cmake/Modules/Generate.cmake +@@ -0,0 +1,85 @@ ++# ++# Copyright(c) 2021 ADLINK Technology Limited and others ++# ++# This program and the accompanying materials are made available under the ++# terms of the Eclipse Public License v. 2.0 which is available at ++# http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License ++# v. 1.0 which is available at ++# http://www.eclipse.org/org/documents/edl-v10.php. ++# ++# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause ++# ++ ++ ++function(IDLC_GENERATE) ++ set(one_value_keywords TARGET) ++ set(multi_value_keywords FILES FEATURES) ++ cmake_parse_arguments( ++ IDLC "" "${one_value_keywords}" "${multi_value_keywords}" "" ${ARGN}) ++ ++ if (CMAKE_CROSSCOMPILING) ++ find_program(_idlc_executable idlc NO_CMAKE_FIND_ROOT_PATH REQUIRED) ++ ++ if (_idlc_executable) ++ set(_idlc_depends "") ++ else() ++ message(FATAL_ERROR "Cannot find idlc executable") ++ endif() ++ else() ++ set(_idlc_executable CycloneDDS::idlc) ++ set(_idlc_depends CycloneDDS::idlc) ++ endif() ++ ++ if(NOT IDLC_TARGET AND NOT IDLC_FILES) ++ # assume deprecated invocation: TARGET FILE [FILE..] ++ list(GET IDLC_UNPARSED_ARGUMENTS 0 IDLC_TARGET) ++ list(REMOVE_AT IDLC_UNPARSED_ARGUMENTS 0 IDLC_) ++ set(IDLC_FILES ${IDLC_UNPARSED_ARGUMENTS}) ++ if (IDLC_TARGET AND IDLC_FILES) ++ message(WARNING " Deprecated use of idlc_generate. \n" ++ " Consider switching to keyword based invocation.") ++ endif() ++ # Java based compiler used to be case sensitive ++ list(APPEND IDLC_FEATURES "case-sensitive") ++ endif() ++ ++ if(NOT IDLC_TARGET) ++ message(FATAL_ERROR "idlc_generate called without TARGET") ++ elseif(NOT IDLC_FILES) ++ message(FATAL_ERROR "idlc_generate called without FILES") ++ endif() ++ ++ # remove duplicate features ++ if(IDLC_FEATURES) ++ list(REMOVE_DUPLICATES IDLC_FEATURES) ++ endif() ++ foreach(_feature ${IDLC_FEATURES}) ++ list(APPEND IDLC_ARGS "-f" ${_feature}) ++ endforeach() ++ ++ set(_dir ${CMAKE_CURRENT_BINARY_DIR}) ++ set(_target ${IDLC_TARGET}) ++ foreach(_file ${IDLC_FILES}) ++ get_filename_component(_path ${_file} ABSOLUTE) ++ list(APPEND _files "${_path}") ++ endforeach() ++ ++ foreach(_file ${_files}) ++ get_filename_component(_name ${_file} NAME_WE) ++ set(_source "${_dir}/${_name}.c") ++ set(_header "${_dir}/${_name}.h") ++ list(APPEND _sources "${_source}") ++ list(APPEND _headers "${_header}") ++ add_custom_command( ++ OUTPUT "${_source}" "${_header}" ++ COMMAND ${_idlc_executable} ++ ARGS ${_file} ${IDLC_ARGS} ++ DEPENDS ${_files} ${_idlc_depends}) ++ endforeach() ++ ++ add_custom_target("${_target}_generate" DEPENDS "${_sources}" "${_headers}") ++ add_library(${_target} INTERFACE) ++ target_sources(${_target} INTERFACE ${_sources} ${_headers}) ++ target_include_directories(${_target} INTERFACE "${_dir}") ++ add_dependencies(${_target} "${_target}_generate") ++endfunction() +diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt +index 624b31b..dc12e08 100644 +--- a/docs/CMakeLists.txt ++++ b/docs/CMakeLists.txt +@@ -19,11 +19,11 @@ set(options_md "${CMAKE_CURRENT_BINARY_DIR}/manual/options.md") + if(BUILD_SCHEMA OR BUILD_DOCS) + add_custom_command( + OUTPUT "${cyclonedds_rnc}" "${cyclonedds_xsd}" "${options_md}" +- COMMAND ddsconf ARGS -f rnc -o "${cyclonedds_rnc}" +- COMMAND ddsconf ARGS -f xsd -o "${cyclonedds_xsd}" ++ COMMAND ddsconf-native ARGS -f rnc -o "${cyclonedds_rnc}" ++ COMMAND ddsconf-native ARGS -f xsd -o "${cyclonedds_xsd}" + COMMAND ${CMAKE_COMMAND} -E make_directory manual +- COMMAND ddsconf ARGS -f md -o "${options_md}" +- DEPENDS ddsconf) ++ COMMAND ddsconf-native ARGS -f md -o "${options_md}" ++ DEPENDS ddsconf-native) + add_custom_target( + schema ALL DEPENDS "${cyclonedds_rnc}" "${cyclonedds_xsd}" "${options_md}") + endif() +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +index d592001..2e50f3e 100644 +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -11,6 +11,8 @@ + # + set(CMAKE_INSTALL_EXAMPLESDIR "${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/examples") + ++include("${CMAKE_SOURCE_DIR}/cmake/Modules/Generate.cmake") ++ + install( + FILES + helloworld/HelloWorldData.idl +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index c193c57..e8ba113 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -115,7 +115,7 @@ configure_file(features.h.in "${CMAKE_CURRENT_BINARY_DIR}/core/include/dds/featu + + add_subdirectory(tools) + add_subdirectory(ddsrt) +-if(NOT CMAKE_CROSSCOMPILING AND BUILD_IDLC) ++if(BUILD_IDLC) + add_subdirectory(idl) + endif() + add_subdirectory(security) +diff --git a/src/core/ddsi/CMakeLists.txt b/src/core/ddsi/CMakeLists.txt +index f9fa37d..bc1f57a 100644 +--- a/src/core/ddsi/CMakeLists.txt ++++ b/src/core/ddsi/CMakeLists.txt +@@ -11,10 +11,11 @@ + # + set(defconfig_src "${CMAKE_CURRENT_BINARY_DIR}/defconfig.c") + ++ + add_custom_command( + OUTPUT ${defconfig_src} +- COMMAND ddsconf -f defconfig -o ${defconfig_src} +- DEPENDS ddsconf) ++ COMMAND ddsconf-native -f defconfig -o ${defconfig_src} ++ DEPENDS ddsconf-native) + + set(srcs_ddsi + ddsi_eth.c +diff --git a/src/core/xtests/cdrtest/CMakeLists.txt b/src/core/xtests/cdrtest/CMakeLists.txt +index 40678a5..0aeb1ad 100644 +--- a/src/core/xtests/cdrtest/CMakeLists.txt ++++ b/src/core/xtests/cdrtest/CMakeLists.txt +@@ -11,7 +11,7 @@ + # + cmake_minimum_required(VERSION 3.5) + +-find_package(CycloneDDS COMPONENTS idlc) ++find_package(CycloneDDS REQUIRED) + + add_compile_options("-I${PROJECT_SOURCE_DIR}/src/ddsrt/include") + add_compile_options("-I${PROJECT_SOURCE_DIR}/src/core/ddsc/include") +diff --git a/src/idl/src/parser.y b/src/idl/src/parser.y +index 8a7ebc6..6bc96ca 100644 +--- a/src/idl/src/parser.y ++++ b/src/idl/src/parser.y +@@ -35,21 +35,22 @@ _Pragma("GCC diagnostic ignored \"-Wanalyzer-free-of-non-heap\"") + #endif + #endif + +-static void yyerror(idl_location_t *, idl_pstate_t *, const char *); ++static void yyerror(idl_location_t *, idl_pstate_t *, idl_retcode_t *, const char *); + + /* convenience macros to complement YYABORT */ + #define NO_MEMORY() \ + do { \ + yylen = 0; \ +- goto yyexhaustedlab; \ ++ *result = IDL_RETCODE_NO_MEMORY; \ ++ YYABORT; \ + } while(0) + +-#define SEMANTIC_ERROR(state, loc, ...) \ ++#define SEMANTIC_ERROR(loc, ...) \ + do { \ +- idl_error(state, loc, __VA_ARGS__); \ ++ idl_error(pstate, loc, __VA_ARGS__); \ + yylen = 0; /* pop right-hand side tokens */ \ +- yyresult = IDL_RETCODE_SEMANTIC_ERROR; \ +- goto yyreturn; \ ++ *result = IDL_RETCODE_SEMANTIC_ERROR; \ ++ YYABORT; \ + } while(0) + + #define YYLLOC_DEFAULT(Cur, Rhs, N) \ +@@ -75,19 +76,12 @@ static void yyerror(idl_location_t *, idl_pstate_t *, const char *); + switch ((_ret_ = (action))) { \ + case IDL_RETCODE_OK: \ + break; \ +- case IDL_RETCODE_NO_MEMORY: \ +- yylen = 0; /* pop right-hand side tokens */ \ +- (void)(except);\ +- goto yyexhaustedlab; \ +- case IDL_RETCODE_SYNTAX_ERROR: \ +- yylen = 0; /* pop right-hand side tokens */ \ +- (void)(except); \ +- goto yyabortlab; \ + default: \ + yylen = 0; \ +- yyresult = _ret_; \ + (void)(except); \ +- goto yyreturn; \ ++ *result = (_ret_); \ ++ YYABORT; \ ++ break; \ + } \ + } while(0) + +@@ -163,6 +157,7 @@ void idl_yypstate_delete_stack(idl_yypstate *yyps); + %locations + + %param { idl_pstate_t *pstate } ++%parse-param { idl_retcode_t *result } + + %token-table + +@@ -366,7 +361,7 @@ const_type: + TRY(idl_resolve(pstate, 0u, $1, &declaration)); + node = idl_unalias(declaration->node, 0u); + if (!(idl_mask(node) & (IDL_BASE_TYPE|IDL_STRING|IDL_ENUM))) +- SEMANTIC_ERROR(pstate, &@1, fmt, $1->identifier); ++ SEMANTIC_ERROR(&@1, fmt, $1->identifier); + $$ = idl_reference_node((idl_node_t *)declaration->node); + idl_delete_scoped_name($1); + } +@@ -470,7 +465,7 @@ primary_expr: + "Scoped name '%s' does not resolve to an enumerator or a contant"; + TRY(idl_resolve(pstate, 0u, $1, &declaration)); + if (!(idl_mask(declaration->node) & (IDL_CONST|IDL_ENUMERATOR))) +- SEMANTIC_ERROR(pstate, &@1, fmt, $1->identifier); ++ SEMANTIC_ERROR(&@1, fmt, $1->identifier); + $$ = idl_reference_node((idl_node_t *)declaration->node); + } + idl_delete_scoped_name($1); +@@ -605,7 +600,7 @@ simple_type_spec: + "Scoped name '%s' does not resolve to a type"; + TRY(idl_resolve(pstate, 0u, $1, &declaration)); + if (!declaration || !idl_is_type_spec(declaration->node)) +- SEMANTIC_ERROR(pstate, &@1, fmt, $1->identifier); ++ SEMANTIC_ERROR(&@1, fmt, $1->identifier); + $$ = idl_reference_node((idl_node_t *)declaration->node); + idl_delete_scoped_name($1); + } +@@ -718,7 +713,7 @@ struct_inherit_spec: + TRY(idl_resolve(pstate, 0u, $2, &declaration)); + node = idl_unalias(declaration->node, 0u); + if (!idl_is_struct(node)) +- SEMANTIC_ERROR(pstate, &@2, fmt, $2->identifier); ++ SEMANTIC_ERROR(&@2, fmt, $2->identifier); + TRY(idl_create_inherit_spec(pstate, &@2, idl_reference_node(node), &$$)); + idl_delete_scoped_name($2); + } +@@ -895,7 +890,7 @@ identifier: + else if (pstate->parser.state == IDL_PARSE_ANNOTATION) + n = 0; + else if (!(n = ($1[0] == '_')) && idl_iskeyword(pstate, $1, nocase)) +- SEMANTIC_ERROR(pstate, &@1, "Identifier '%s' collides with a keyword", $1); ++ SEMANTIC_ERROR(&@1, "Identifier '%s' collides with a keyword", $1); + + if (pstate->parser.state != IDL_PARSE_UNKNOWN_ANNOTATION_APPL_PARAMS) + TRY(idl_create_name(pstate, &@1, idl_strdup($1+n), &$$)); +@@ -1040,7 +1035,7 @@ annotation_appl_keyword_param: + if (declaration && (idl_mask(declaration->node) & IDL_DECLARATOR)) + node = (idl_annotation_member_t *)((const idl_node_t *)declaration->node)->parent; + if (!node || !(idl_mask(node) & IDL_ANNOTATION_MEMBER)) +- SEMANTIC_ERROR(pstate, &@1, fmt, $1->identifier); ++ SEMANTIC_ERROR(&@1, fmt, $1->identifier); + node = idl_reference_node((idl_node_t *)node); + } + $$ = node; +@@ -1081,7 +1076,7 @@ void idl_yypstate_delete_stack(idl_yypstate *yyps) + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", +- yystos[*yyssp], yyvsp, yylsp, NULL); ++ yystos[*yyssp], yyvsp, yylsp, NULL, NULL); + YYPOPSTACK (1); + } + } +@@ -1102,7 +1097,14 @@ int idl_iskeyword(idl_pstate_t *pstate, const char *str, int nc) + && cmp(yytname[i] + 1, str, n) == 0 + && yytname[i][n + 1] == '"' + && yytname[i][n + 2] == '\0') { ++#if YYBISON >= 30800 ++ // "yytname" is long deprecated and "yytokname" has been removed in bison 3.8. ++ // This hack seems to be enough to buy us some time to rewrite the keyword ++ // recognition to not rely on anything deprecated ++ toknum = (int) (255 + i); ++#else + toknum = yytoknum[i]; ++#endif + } + } + +@@ -1131,7 +1133,8 @@ int idl_iskeyword(idl_pstate_t *pstate, const char *str, int nc) + } + + static void +-yyerror(idl_location_t *loc, idl_pstate_t *pstate, const char *str) ++yyerror(idl_location_t *loc, idl_pstate_t *pstate, idl_retcode_t *result, const char *str) + { + idl_error(pstate, loc, str); ++ *result = IDL_RETCODE_SYNTAX_ERROR; + } +diff --git a/src/idl/src/processor.c b/src/idl/src/processor.c +index bf84a8d..a0a9191 100644 +--- a/src/idl/src/processor.c ++++ b/src/idl/src/processor.c +@@ -294,7 +294,6 @@ idl_warning( + + static idl_retcode_t parse_grammar(idl_pstate_t *pstate, idl_token_t *tok) + { +- idl_retcode_t ret; + IDL_YYSTYPE yylval; + + switch (tok->code) { +@@ -316,23 +315,21 @@ static idl_retcode_t parse_grammar(idl_pstate_t *pstate, idl_token_t *tok) + break; + } + +- switch ((ret = idl_yypush_parse( +- pstate->parser.yypstate, tok->code, &yylval, &tok->location, pstate))) ++ idl_retcode_t result = IDL_RETCODE_BAD_PARAMETER; ++ switch (idl_yypush_parse(pstate->parser.yypstate, tok->code, &yylval, &tok->location, pstate, &result)) + { +- case 0: /* success */ +- break; +- case 1: /* parse error */ +- return IDL_RETCODE_SYNTAX_ERROR; +- case 2: /* out of memory */ ++ case 0: ++ return IDL_RETCODE_OK; ++ case 1: ++ return result; ++ case 2: + return IDL_RETCODE_NO_MEMORY; +- case 4: /* push more */ ++ case YYPUSH_MORE: + return IDL_RETCODE_PUSH_MORE; + default: +- assert(ret < 0); +- return ret; ++ assert (0); + } +- +- return IDL_RETCODE_OK; ++ return IDL_RETCODE_BAD_PARAMETER; + } + + idl_retcode_t idl_parse(idl_pstate_t *pstate) +diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt +index 72fdcfe..32591fe 100644 +--- a/src/tools/CMakeLists.txt ++++ b/src/tools/CMakeLists.txt +@@ -12,8 +12,6 @@ + set(CMAKE_INSTALL_TOOLSDIR "${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/tools") + add_subdirectory(pubsub) + add_subdirectory(ddsconf) +-if(BUILD_IDLC) +- add_subdirectory(idlpp) +- add_subdirectory(idlc) +- add_subdirectory(ddsperf) +-endif() ++add_subdirectory(idlpp) ++add_subdirectory(idlc) ++add_subdirectory(ddsperf) +diff --git a/src/tools/ddsconf/CMakeLists.txt b/src/tools/ddsconf/CMakeLists.txt +index b11783a..d3ba427 100644 +--- a/src/tools/ddsconf/CMakeLists.txt ++++ b/src/tools/ddsconf/CMakeLists.txt +@@ -9,14 +9,8 @@ + # + # SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause + # +-if(CMAKE_CROSSCOMPILING) +- find_program(DDSCONF_EXECUTABLE ddsconf REQUIRED) +- if(NOT DDSCONF_EXECUTABLE) +- message(FATAL_ERROR "ddsconf not found!") +- endif() +- add_executable(ddsconf IMPORTED GLOBAL) +- set_property(TARGET ddsconf PROPERTY IMPORTED_LOCATION ${DDSCONF_EXECUTABLE}) +-else() ++ ++if (BUILD_DDSCONF) + include(GenerateDummyExportHeader) + + add_executable(ddsconf +@@ -37,4 +31,42 @@ else() + "${CMAKE_CURRENT_BINARY_DIR}/include" + $> + $) ++ ++ add_executable(${PROJECT_NAME}::ddsconf ALIAS ddsconf) ++ ++ install( ++ TARGETS ddsconf ++ EXPORT "${CMAKE_PROJECT_NAME}" ++ DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ COMPONENT dev) ++ ++ if (CMAKE_CROSSCOMPILING) ++ find_program(_executable ddsconf REQUIRED NO_CMAKE_FIND_ROOT_PATH) ++ ++ # REQUIRED is not working until cmake 3.18 so it might still not exist ++ if (NOT _executable) ++ message(FATAL_ERROR "Could not find a native ddsconf executable, please make sure it is available on PATH") ++ endif() ++ ++ add_executable(ddsconf-native IMPORTED GLOBAL) ++ set_property(TARGET ddsconf-native PROPERTY IMPORTED_LOCATION "${_executable}") ++ message(STATUS "Using imported native ddsconf ${_executable}") ++ else() ++ add_executable(ddsconf-native ALIAS ddsconf) ++ endif() ++else() ++ # Note, no if crosscompiling statement here, ddsconf is _required_ ++ # so if you don't BUILD_DDSCONF it has to be found ++ find_program(_executable ddsconf REQUIRED NO_CMAKE_FIND_ROOT_PATH) ++ ++ # REQUIRED is not working until cmake 3.18 so it might still not exist ++ if (NOT _executable) ++ message(FATAL_ERROR "Could not find a native ddsconf executable, please make sure it is available on PATH") ++ endif() ++ ++ add_executable(ddsconf-native IMPORTED GLOBAL) ++ set_property(TARGET ddsconf-native PROPERTY IMPORTED_LOCATION "${_executable}") ++ message(STATUS "Using imported native ddsconf ${_executable}") + endif() ++ ++ +diff --git a/src/tools/ddsperf/CMakeLists.txt b/src/tools/ddsperf/CMakeLists.txt +index ddf87b2..aba9221 100644 +--- a/src/tools/ddsperf/CMakeLists.txt ++++ b/src/tools/ddsperf/CMakeLists.txt +@@ -10,6 +10,8 @@ + # SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause + # + ++include(Generate) ++ + idlc_generate(TARGET ddsperf_types FILES ddsperf_types.idl) + add_executable(ddsperf ddsperf.c cputime.c cputime.h netload.c netload.h) + target_link_libraries(ddsperf ddsperf_types ddsc) +@@ -29,4 +31,4 @@ if (MSVC) + COMPONENT dev + OPTIONAL + ) +-endif() ++endif() +\ No newline at end of file +diff --git a/src/tools/idlc/CMakeLists.txt b/src/tools/idlc/CMakeLists.txt +index 86cc5b8..cf27145 100644 +--- a/src/tools/idlc/CMakeLists.txt ++++ b/src/tools/idlc/CMakeLists.txt +@@ -9,87 +9,88 @@ + # + # SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause + # +-if(CMAKE_CROSSCOMPILING) +- find_program(IDLC_EXECUTABLE idlc REQUIRED) +- add_executable(CycloneDDS::idlc IMPORTED GLOBAL) +- set_property(TARGET CycloneDDS::idlc PROPERTY IMPORTED_LOCATION ${IDLC_EXECUTABLE}) +-else() +- include(CheckIncludeFile) + +- check_include_file(getopt.h HAVE_GETOPT_H) ++if (NOT BUILD_IDLC) ++ return() ++endif() + +- configure_file(src/config.h.in config.h) ++include(CheckIncludeFile) + +- set(headers +- src/descriptor.h +- src/generator.h +- src/options.h +- src/plugin.h +- include/idlc/generator.h +- ${CMAKE_CURRENT_BINARY_DIR}/config.h) +- set(sources +- src/idlc.c +- src/plugin.c +- src/options.c +- src/generator.c +- src/descriptor.c +- src/types.c) +- add_executable(idlc ${sources} ${headers}) ++check_include_file(getopt.h HAVE_GETOPT_H) + +- if(MSVC) +- # ignore warnings C6255 and 6263 about _alloca +- target_compile_options(idlc PRIVATE /wd6255 /wd6263) +- endif() +- target_link_libraries(idlc PRIVATE idl idlpp ${CMAKE_DL_LIBS}) +- target_include_directories( +- idlc PRIVATE +- include +- ${CMAKE_CURRENT_BINARY_DIR} +- $>) ++configure_file(src/config.h.in config.h) + +- if(WIN32 OR NOT HAVE_GETOPT_H) +- # use getopt.h from ddsrt +- file(READ "${CMAKE_SOURCE_DIR}/src/ddsrt/include/getopt.h.in" getopt_h) +- # remove occurrences of DDS_EXPORT +- string(REGEX REPLACE "\n[ \t]*DDS_EXPORT[ \t]+" "\n" getopt_h "${getopt_h}") +- # remove dds/* includes +- string(REGEX REPLACE "\n[ \t]*#[ \t]*include[ \t]+[<\"]dds/[^\n]*" "" getopt_h "${getopt_h}") +- # generate getopt.h +- file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/getopt.h" CONTENT "${getopt_h}") +- target_include_directories(idlc PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") +- # add getopt.c +- configure_file( +- "${CMAKE_SOURCE_DIR}/src/ddsrt/src/getopt.c" +- "${CMAKE_CURRENT_BINARY_DIR}/getopt.c" +- COPYONLY) +- target_sources(idlc PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/getopt.c) +- endif() ++set(headers ++ src/descriptor.h ++ src/generator.h ++ src/options.h ++ src/plugin.h ++ include/idlc/generator.h ++ ${CMAKE_CURRENT_BINARY_DIR}/config.h) ++set(sources ++ src/idlc.c ++ src/plugin.c ++ src/options.c ++ src/generator.c ++ src/descriptor.c ++ src/types.c) ++add_executable(idlc ${sources} ${headers}) + +- add_executable(${PROJECT_NAME}::idlc ALIAS idlc) ++if(MSVC) ++ # ignore warnings C6255 and 6263 about _alloca ++ target_compile_options(idlc PRIVATE /wd6255 /wd6263) ++endif() ++target_link_libraries(idlc PRIVATE idl idlpp ${CMAKE_DL_LIBS}) ++target_include_directories( ++ idlc PRIVATE ++ include ++ ${CMAKE_CURRENT_BINARY_DIR} ++ $>) + +- install( +- DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/idlc" +- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" +- COMPONENT dev +- FILES_MATCHING PATTERN "*.h") ++if(WIN32 OR NOT HAVE_GETOPT_H) ++ # use getopt.h from ddsrt ++ file(READ "${CMAKE_SOURCE_DIR}/src/ddsrt/include/getopt.h.in" getopt_h) ++ # remove occurrences of DDS_EXPORT ++ string(REGEX REPLACE "\n[ \t]*DDS_EXPORT[ \t]+" "\n" getopt_h "${getopt_h}") ++ # remove dds/* includes ++ string(REGEX REPLACE "\n[ \t]*#[ \t]*include[ \t]+[<\"]dds/[^\n]*" "" getopt_h "${getopt_h}") ++ # generate getopt.h ++ file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/getopt.h" CONTENT "${getopt_h}") ++ target_include_directories(idlc PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") ++ # add getopt.c ++ configure_file( ++ "${CMAKE_SOURCE_DIR}/src/ddsrt/src/getopt.c" ++ "${CMAKE_CURRENT_BINARY_DIR}/getopt.c" ++ COPYONLY) ++ target_sources(idlc PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/getopt.c) ++endif() + +- install( +- TARGETS idlc +- EXPORT "${CMAKE_PROJECT_NAME}" +- DESTINATION "${CMAKE_INSTALL_BINDIR}" +- COMPONENT dev) +- if (MSVC) +- install(FILES $ +- DESTINATION "${CMAKE_INSTALL_BINDIR}" +- COMPONENT dev +- OPTIONAL +- ) +- endif() ++add_executable(${PROJECT_NAME}::idlc ALIAS idlc) ++ ++install( ++ DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/idlc" ++ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ++ COMPONENT dev ++ FILES_MATCHING PATTERN "*.h") + +- install( +- FILES Generate.cmake +- DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/idlc" +- COMPONENT dev) ++install( ++ TARGETS idlc ++ EXPORT "${CMAKE_PROJECT_NAME}" ++ DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ COMPONENT dev) ++ ++if (MSVC) ++ install(FILES $ ++ DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ COMPONENT dev ++ OPTIONAL ++ ) + endif() + +-include(Generate.cmake) ++install( ++ FILES "${CMAKE_SOURCE_DIR}/cmake/Modules/Generate.cmake" ++ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/idlc" ++ COMPONENT dev) ++ ++include("${CMAKE_SOURCE_DIR}/cmake/Modules/Generate.cmake") ++ +diff --git a/src/tools/idlc/Generate.cmake b/src/tools/idlc/Generate.cmake +deleted file mode 100644 +index 9b30769..0000000 +--- a/src/tools/idlc/Generate.cmake ++++ /dev/null +@@ -1,70 +0,0 @@ +-# +-# Copyright(c) 2021 ADLINK Technology Limited and others +-# +-# This program and the accompanying materials are made available under the +-# terms of the Eclipse Public License v. 2.0 which is available at +-# http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License +-# v. 1.0 which is available at +-# http://www.eclipse.org/org/documents/edl-v10.php. +-# +-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause +-# +-function(IDLC_GENERATE) +- set(one_value_keywords TARGET) +- set(multi_value_keywords FILES FEATURES) +- cmake_parse_arguments( +- IDLC "" "${one_value_keywords}" "${multi_value_keywords}" "" ${ARGN}) +- +- if(NOT IDLC_TARGET AND NOT IDLC_FILES) +- # assume deprecated invocation: TARGET FILE [FILE..] +- list(GET IDLC_UNPARSED_ARGUMENTS 0 IDLC_TARGET) +- list(REMOVE_AT IDLC_UNPARSED_ARGUMENTS 0 IDLC_) +- set(IDLC_FILES ${IDLC_UNPARSED_ARGUMENTS}) +- if (IDLC_TARGET AND IDLC_FILES) +- message(WARNING " Deprecated use of idlc_generate. \n" +- " Consider switching to keyword based invocation.") +- endif() +- # Java based compiler used to be case sensitive +- list(APPEND IDLC_FEATURES "case-sensitive") +- endif() +- +- if(NOT IDLC_TARGET) +- message(FATAL_ERROR "idlc_generate called without TARGET") +- elseif(NOT IDLC_FILES) +- message(FATAL_ERROR "idlc_generate called without FILES") +- endif() +- +- # remove duplicate features +- if(IDLC_FEATURES) +- list(REMOVE_DUPLICATES IDLC_FEATURES) +- endif() +- foreach(_feature ${IDLC_FEATURES}) +- list(APPEND IDLC_ARGS "-f" ${_feature}) +- endforeach() +- +- set(_dir ${CMAKE_CURRENT_BINARY_DIR}) +- set(_target ${IDLC_TARGET}) +- foreach(_file ${IDLC_FILES}) +- get_filename_component(_path ${_file} ABSOLUTE) +- list(APPEND _files "${_path}") +- endforeach() +- +- foreach(_file ${_files}) +- get_filename_component(_name ${_file} NAME_WE) +- set(_source "${_dir}/${_name}.c") +- set(_header "${_dir}/${_name}.h") +- list(APPEND _sources "${_source}") +- list(APPEND _headers "${_header}") +- add_custom_command( +- OUTPUT "${_source}" "${_header}" +- COMMAND CycloneDDS::idlc +- ARGS ${_file} ${IDLC_ARGS} +- DEPENDS ${_files} CycloneDDS::idlc) +- endforeach() +- +- add_custom_target("${_target}_generate" DEPENDS "${_sources}" "${_headers}") +- add_library(${_target} INTERFACE) +- target_sources(${_target} INTERFACE ${_sources} ${_headers}) +- target_include_directories(${_target} INTERFACE "${_dir}") +- add_dependencies(${_target} "${_target}_generate") +-endfunction() +diff --git a/src/tools/idlpp/CMakeLists.txt b/src/tools/idlpp/CMakeLists.txt +index 0f101e5..5fc2f32 100644 +--- a/src/tools/idlpp/CMakeLists.txt ++++ b/src/tools/idlpp/CMakeLists.txt +@@ -9,8 +9,8 @@ + # + # SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause + # +-if(CMAKE_CROSSCOMPILING) +- # Do not build preprocessor if cross compiling ++ ++if (NOT BUILD_IDLC) + return() + endif() + diff --git a/patch/ros-galactic-demo-nodes-py.patch b/patch/ros-galactic-demo-nodes-py.patch new file mode 100644 index 00000000..0df5461d --- /dev/null +++ b/patch/ros-galactic-demo-nodes-py.patch @@ -0,0 +1,15 @@ +diff --git a/setup.py b/setup.py +index 74a04111..23bc4d59 100644 +--- a/setup.py ++++ b/setup.py +@@ -33,8 +33,8 @@ + tests_require=['pytest'], + entry_points={ + 'console_scripts': [ +- 'listener = demo_nodes_py.topics.listener:main', +- 'talker = demo_nodes_py.topics.talker:main', ++ 'demo_listener = demo_nodes_py.topics.listener:main', ++ 'demo_talker = demo_nodes_py.topics.talker:main', + 'listener_qos = demo_nodes_py.topics.listener_qos:main', + 'talker_qos = demo_nodes_py.topics.talker_qos:main', + 'listener_serialized = demo_nodes_py.topics.listener_serialized:main', diff --git a/patch/ros-galactic-dwb-critics.win.patch b/patch/ros-galactic-dwb-critics.win.patch new file mode 100644 index 00000000..9ede3e3d --- /dev/null +++ b/patch/ros-galactic-dwb-critics.win.patch @@ -0,0 +1,13 @@ +diff --git a/nav2_dwb_controller/dwb_critics/CMakeLists.txt b/nav2_dwb_controller/dwb_critics/CMakeLists.txt +index 32b95518e2..dd73a943d5 100644 +--- a/nav2_dwb_controller/dwb_critics/CMakeLists.txt ++++ b/nav2_dwb_controller/dwb_critics/CMakeLists.txt +@@ -1,6 +1,8 @@ + cmake_minimum_required(VERSION 3.5) + project(dwb_critics) + ++add_definitions(-DNOMINMAX) ++ + find_package(ament_cmake REQUIRED) + find_package(nav2_common REQUIRED) + find_package(angles REQUIRED) diff --git a/patch/ros-galactic-dwb-plugins.win.patch b/patch/ros-galactic-dwb-plugins.win.patch new file mode 100644 index 00000000..b40ccebe --- /dev/null +++ b/patch/ros-galactic-dwb-plugins.win.patch @@ -0,0 +1,13 @@ +diff --git a/nav2_dwb_controller/dwb_plugins/CMakeLists.txt b/nav2_dwb_controller/dwb_plugins/CMakeLists.txt +index a1806c524..c5ce526e5 100644 +--- a/nav2_dwb_controller/dwb_plugins/CMakeLists.txt ++++ b/nav2_dwb_controller/dwb_plugins/CMakeLists.txt +@@ -1,6 +1,8 @@ + cmake_minimum_required(VERSION 3.5) + project(dwb_plugins) + ++add_definitions(-DNOMINMAX) ++ + find_package(ament_cmake REQUIRED) + find_package(nav2_common REQUIRED) + find_package(angles REQUIRED) diff --git a/patch/ros-galactic-embree-vendor.patch b/patch/ros-galactic-embree-vendor.patch new file mode 100644 index 00000000..1727da7b --- /dev/null +++ b/patch/ros-galactic-embree-vendor.patch @@ -0,0 +1,22 @@ +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/patch/ros-galactic-examples-rclpy-minimal-action-client.patch b/patch/ros-galactic-examples-rclpy-minimal-action-client.patch new file mode 100644 index 00000000..18899eaf --- /dev/null +++ b/patch/ros-galactic-examples-rclpy-minimal-action-client.patch @@ -0,0 +1,13 @@ +diff --git a/setup.py b/setup.py +index 48b893bd..84b7ee25 100644 +--- a/setup.py ++++ b/setup.py +@@ -29,7 +29,7 @@ + tests_require=['pytest'], + entry_points={ + 'console_scripts': [ +- 'client = ' + package_name + '.client:main', ++ 'client_actions = ' + package_name + '.client:main', + 'client_cancel = ' + package_name + '.client_cancel:main', + 'client_not_composable = ' + package_name + '.client_not_composable:main', + 'client_asyncio = ' + package_name + '.client_asyncio:main', diff --git a/patch/ros-galactic-examples-rclpy-minimal-client.patch b/patch/ros-galactic-examples-rclpy-minimal-client.patch new file mode 100644 index 00000000..7537be9b --- /dev/null +++ b/patch/ros-galactic-examples-rclpy-minimal-client.patch @@ -0,0 +1,13 @@ +diff --git a/setup.py b/setup.py +index cb306d1f..f7825015 100644 +--- a/setup.py ++++ b/setup.py +@@ -29,7 +29,7 @@ + tests_require=['pytest'], + entry_points={ + 'console_scripts': [ +- 'client = examples_rclpy_minimal_client.client:main', ++ 'client_services = examples_rclpy_minimal_client.client:main', + 'client_async = examples_rclpy_minimal_client.client_async:main', + 'client_async_member_function =' + ' examples_rclpy_minimal_client.client_async_member_function:main', diff --git a/patch/ros-galactic-fastrtps.patch b/patch/ros-galactic-fastrtps.patch new file mode 100644 index 00000000..c401aef9 --- /dev/null +++ b/patch/ros-galactic-fastrtps.patch @@ -0,0 +1,13 @@ +diff --git a/tools/fds/CMakeLists.txt b/tools/fds/CMakeLists.txt +index 1b69eb6838..501a49d793 100644 +--- a/tools/fds/CMakeLists.txt ++++ b/tools/fds/CMakeLists.txt +@@ -124,7 +124,7 @@ if (NOT (CMAKE_VERSION VERSION_LESS "3.14")) + if( WIN32 ) + # Use powershell to generate the link + install( +- CODE "execute_process( COMMAND PowerShell -Command \"if( test-path ${PROJECT_NAME}.exe -PathType Leaf ) { rm ${PROJECT_NAME}.exe } ; New-Item -ItemType SymbolicLink -Target $ -Path ${PROJECT_NAME}.exe \" ERROR_QUIET RESULTS_VARIABLE SYMLINK_FAILED WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/${BIN_INSTALL_DIR}\") \n if( SYMLINK_FAILED ) \n message(STATUS \"Windows requires admin installation rights to create symlinks. A bat script will be provided instead.\") \n set(FAST_SERVER_BINARY_NAME $) \n configure_file(${CMAKE_CURRENT_LIST_DIR}/fast-discovery-server.bat.in ${CMAKE_INSTALL_PREFIX}/${BIN_INSTALL_DIR}${MSVCARCH_DIR_EXTENSION}/${PROJECT_NAME}.bat @ONLY) \n endif()" ++ CODE "execute_process( COMMAND PowerShell -Command \"if( test-path ${PROJECT_NAME}.exe -PathType Leaf ) { rm ${PROJECT_NAME}.exe } ; New-Item -ItemType HardLink -Target $ -Path ${PROJECT_NAME}.exe \" ERROR_QUIET RESULTS_VARIABLE SYMLINK_FAILED WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}/${BIN_INSTALL_DIR}\") \n if( SYMLINK_FAILED ) \n message(STATUS \"Windows requires admin installation rights to create symlinks. A bat script will be provided instead.\") \n set(FAST_SERVER_BINARY_NAME $) \n configure_file(${CMAKE_CURRENT_LIST_DIR}/fast-discovery-server.bat.in ${CMAKE_INSTALL_PREFIX}/${BIN_INSTALL_DIR}${MSVCARCH_DIR_EXTENSION}/${PROJECT_NAME}.bat @ONLY) \n endif()" + COMPONENT discovery) + else() + # Use ln to create the symbolic link. We remove the version from the file name but keep the debug suffix diff --git a/patch/ros-galactic-fmilibrary-vendor.patch b/patch/ros-galactic-fmilibrary-vendor.patch new file mode 100644 index 00000000..fd27f1da --- /dev/null +++ b/patch/ros-galactic-fmilibrary-vendor.patch @@ -0,0 +1,125 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index df8d628..7d79b7c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,25 +2,12 @@ cmake_minimum_required(VERSION 3.5) + project(fmilibrary_vendor) + + find_package(ament_cmake REQUIRED) ++list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules") ++find_package(FMILibrary REQUIRED) + +-include(ExternalProject) +-set(fmilibrary_version 2.2.3) +-externalproject_add(FMILibraryProject-${fmilibrary_version} +- GIT_REPOSITORY https://github.com/modelon-community/fmi-library.git +- GIT_TAG ${fmilibrary_version} +- GIT_CONFIG advice.detachedHead=false +- # Suppress git update due to https://gitlab.kitware.com/cmake/cmake/-/issues/16419 +- UPDATE_COMMAND "" +- TIMEOUT 60 +-) +-externalproject_get_property(FMILibraryProject-${fmilibrary_version} INSTALL_DIR) +-set(FMILibraryProject_INCLUDE_DIR "${INSTALL_DIR}/src/install/include") +-set(FMILibraryProject_LIB_DIR "${INSTALL_DIR}/src/install/lib") ++install(DIRECTORY cmake DESTINATION share/${PROJECT_NAME}) + +-install(DIRECTORY ${FMILibraryProject_INCLUDE_DIR}/ DESTINATION include) +-install(FILES ${FMILibraryProject_LIB_DIR}/libfmilib.a DESTINATION lib) +-install(FILES ${FMILibraryProject_LIB_DIR}/libfmilib_shared.so DESTINATION lib) ++ament_package( ++ CONFIG_EXTRAS "fmilibrary_vendor-extras.cmake" ++) + +-ament_export_include_directories(include) +-ament_export_libraries(libfmilib.a libfmilib_shared.so) +-ament_package() +diff --git a/cmake/Modules/FindFMILibrary.cmake b/cmake/Modules/FindFMILibrary.cmake +new file mode 100644 +index 0000000..acafc81 +--- /dev/null ++++ b/cmake/Modules/FindFMILibrary.cmake +@@ -0,0 +1,73 @@ ++#.rst: ++# FindFMILibrary ++# ----------- ++# ++# Find the FMI Library. ++# ++# IMPORTED Targets ++# ^^^^^^^^^^^^^^^^ ++# ++# This module defines the following :prop_tgt:`IMPORTED` targets if ++# FMILibrary has been found:: ++# ++# FMILibrary::FMILibrary ++# ++# Result Variables ++# ^^^^^^^^^^^^^^^^ ++# ++# This module defines the following variables:: ++# ++# FMILibrary_FOUND - System has FMILibrary ++# FMILibrary_INCLUDE_DIRS - Include directories for FMILibrary ++# FMILibrary_LIBRARIES - imported targets to link against FMILibrary ++# ++# Readed enviromental variables ++# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ++# ++# This module reads hints about search locations from variables:: ++# ++# FMILibrary_ROOT - Directory containing the include and lib directories ++ ++#============================================================================= ++# Copyright 2017 Silvio Traversaro ++# ++# Distributed under the OSI-approved BSD License (the "License"); ++# see accompanying file Copyright.txt for details. ++# ++# This software is distributed WITHOUT ANY WARRANTY; without even the ++# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ++# See the License for more information. ++ ++ ++find_path(FMILibrary_INCLUDE_DIR fmilib.h ++ HINTS $ENV{FMILibrary_ROOT}/include) ++ ++find_library(FMILibrary_LIBRARY ++ NAMES fmilib_shared libfmilib_shared ++ HINTS $ENV{FMILibrary_ROOT}/lib) ++ ++mark_as_advanced(FMILibrary_INCLUDE_DIR ++ FMILibrary_LIBRARY) ++ ++include(FindPackageHandleStandardArgs) ++find_package_handle_standard_args(FMILibrary ++ FOUND_VAR FMILibrary_FOUND ++ REQUIRED_VARS FMILibrary_LIBRARY FMILibrary_INCLUDE_DIR) ++ ++if(FMILibrary_FOUND) ++ if(NOT TARGET FMILibrary::FMILibrary) ++ add_library(FMILibrary::FMILibrary UNKNOWN IMPORTED) ++ set_target_properties(FMILibrary::FMILibrary PROPERTIES ++ INTERFACE_INCLUDE_DIRECTORIES "${FMILibrary_INCLUDE_DIR}" ++ IMPORTED_LOCATION "${FMILibrary_LIBRARY}") ++ endif() ++ ++ set(FMILibrary_LIBRARIES FMILibrary::FMILibrary) ++ set(FMILibrary_INCLUDE_DIRS "${FMILibrary_INCLUDE_DIR}") ++ ++ # Set package properties if FeatureSummary was included ++ if(COMMAND set_package_properties) ++ set_package_properties(FMILibrary PROPERTIES DESCRIPTION "FMILibrary" ++ URL "http://www.jmodelica.org/FMILibrary") ++ endif() ++endif() +diff --git a/fmilibrary_vendor-extras.cmake b/fmilibrary_vendor-extras.cmake +new file mode 100644 +index 0000000..5f076e3 +--- /dev/null ++++ b/fmilibrary_vendor-extras.cmake +@@ -0,0 +1,4 @@ ++list(INSERT CMAKE_MODULE_PATH 0 "${fmilibrary_vendor_DIR}/Modules") ++ ++find_package(FMILibrary REQUIRED) ++set(fmilibrary_vendor_LIBRARIES FMILibrary::FMILibrary) diff --git a/patch/ros-galactic-geometric-shapes.patch b/patch/ros-galactic-geometric-shapes.patch new file mode 100644 index 00000000..559634db --- /dev/null +++ b/patch/ros-galactic-geometric-shapes.patch @@ -0,0 +1,47 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b1c4e83..9d3a4a2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -26,22 +26,7 @@ if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release) + endif() + +-# TODO(henningkayser): Remove policy fix when assimp 5.1 is available +-# Suppress policy warning in assimp (https://github.com/assimp/assimp/pull/2722) +-set(CMAKE_POLICY_DEFAULT_CMP0012 NEW) +-find_package(ASSIMP QUIET) +-if(NOT ASSIMP_FOUND) +- find_package(PkgConfig REQUIRED) +- # assimp is required, so REQUIRE the second attempt +- pkg_check_modules(ASSIMP_PC REQUIRED assimp) +- set(ASSIMP_INCLUDE_DIRS ${ASSIMP_PC_INCLUDE_DIRS}) +-endif() +- +-# find *absolute* paths to ASSIMP_LIBRARIES +-# Both, pkg-config and assimp's cmake-config don't provide an absolute library path. +-# For, pkg-config the path is in ASSIMP_PC_LIBRARY_DIRS, for cmake in ASSIMP_LIBRARY_DIRS. +-find_library(ASSIMP_ABS_LIBRARIES NAMES ${ASSIMP_LIBRARIES} assimp HINTS ${ASSIMP_LIBRARY_DIRS} ${ASSIMP_PC_LIBRARY_DIRS}) +-set(ASSIMP_LIBRARIES "${ASSIMP_ABS_LIBRARIES}") ++find_package(assimp REQUIRED) + + # These need to be in this order to find header files + find_package(eigen3_cmake_module REQUIRED) +@@ -75,6 +60,7 @@ set(THIS_PACKAGE_EXPORT_DEPENDS + resource_retriever + shape_msgs + visualization_msgs ++ assimp + ) + + # Set VERSION from package.xml +@@ -97,9 +83,9 @@ target_compile_options(${PROJECT_NAME} PRIVATE ${PROJECT_COMPILE_OPTIONS}) + ament_target_dependencies(${PROJECT_NAME} + ${THIS_PACKAGE_EXPORT_DEPENDS} + ) ++target_link_libraries(${PROJECT_NAME} assimp::assimp) + ament_target_dependencies(${PROJECT_NAME} SYSTEM + # We don't export these dependencies because their cmake is broken +- ASSIMP + QHULL + ) + diff --git a/patch/ros-galactic-google-benchmark-vendor.patch b/patch/ros-galactic-google-benchmark-vendor.patch new file mode 100644 index 00000000..1184c40e --- /dev/null +++ b/patch/ros-galactic-google-benchmark-vendor.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ec8f6e0..3c8b38f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -68,7 +68,8 @@ macro(build_benchmark) + PATCH_COMMAND + ${CMAKE_COMMAND} -E chdir git apply -p1 --ignore-space-change --whitespace=nowarn ${CMAKE_CURRENT_SOURCE_DIR}/thread_safety_attributes.patch && + ${CMAKE_COMMAND} -E chdir git apply -p1 --ignore-space-change --whitespace=nowarn ${CMAKE_CURRENT_SOURCE_DIR}/soversion.patch && +- ${CMAKE_COMMAND} -E chdir git apply -p1 --ignore-space-change --whitespace=nowarn ${CMAKE_CURRENT_SOURCE_DIR}/shrink-tz-offset-size.patch ++ ${CMAKE_COMMAND} -E chdir git apply -p1 --ignore-space-change --whitespace=nowarn ${CMAKE_CURRENT_SOURCE_DIR}/shrink-tz-offset-size.patch && ++ ${CMAKE_COMMAND} -E chdir git apply -p1 --ignore-space-change --whitespace=nowarn ${CMAKE_CURRENT_SOURCE_DIR}/link_rt.patch + ) + + # The external project will install to the build folder, but we'll install that on make install. +diff --git a/link_rt.patch b/link_rt.patch +new file mode 100644 +index 0000000..01494c5 +--- /dev/null ++++ b/link_rt.patch +@@ -0,0 +1,13 @@ ++diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt ++index 35d559e..abe867d 100644 ++--- a/src/CMakeLists.txt +++++ b/src/CMakeLists.txt ++@@ -32,7 +32,7 @@ target_include_directories(benchmark PUBLIC ++ target_link_libraries(benchmark ${BENCHMARK_CXX_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) ++ find_library(LIBRT rt) ++ if(LIBRT) ++- target_link_libraries(benchmark ${LIBRT}) +++ target_link_libraries(benchmark rt) ++ endif() ++ ++ if(CMAKE_BUILD_TYPE) diff --git a/patch/ros-galactic-gpsd-client.patch b/patch/ros-galactic-gpsd-client.patch new file mode 100644 index 00000000..ed7f7587 --- /dev/null +++ b/patch/ros-galactic-gpsd-client.patch @@ -0,0 +1,43 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e593495..f4b1b2f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -25,7 +25,7 @@ target_compile_definitions(${PROJECT_NAME} + ) + rclcpp_components_register_nodes(${PROJECT_NAME} "gpsd_client::GPSDClientComponent") + target_link_libraries(${PROJECT_NAME} +- ${libgps_LIBRARIES} ++ ${libgps_LINK_LIBRARIES} + ) + ament_target_dependencies(${PROJECT_NAME} + "gps_msgs" +diff --git a/src/client.cpp b/src/client.cpp +index 425d1c3..86bd257 100644 +--- a/src/client.cpp ++++ b/src/client.cpp +@@ -152,14 +152,14 @@ namespace gpsd_client + #endif + } + +- if ((p->status & STATUS_FIX) && !(check_fix_by_variance_ && std::isnan(p->fix.epx))) ++ if ((p->fix.status & STATUS_FIX) && !(check_fix_by_variance_ && std::isnan(p->fix.epx))) + { + status.status = 0; // FIXME: gpsmm puts its constants in the global + // namespace, so `GPSStatus::STATUS_FIX' is illegal. + + // STATUS_DGPS_FIX was removed in API version 6 but re-added afterward + #if GPSD_API_MAJOR_VERSION != 6 +- if (p->status & STATUS_DGPS_FIX) ++ if (p->fix.status & STATUS_DGPS_FIX) + status.status |= 18; // same here + #endif + +@@ -234,7 +234,7 @@ namespace gpsd_client + * so we need to use the ROS message's integer values + * for status.status + */ +- switch (p->status) ++ switch (p->fix.status) + { + case STATUS_NO_FIX: + fix->status.status = -1; // NavSatStatus::STATUS_NO_FIX; diff --git a/patch/ros-galactic-iceoryx-utils.patch b/patch/ros-galactic-iceoryx-utils.patch new file mode 100644 index 00000000..154694cf --- /dev/null +++ b/patch/ros-galactic-iceoryx-utils.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 403e82b..62de9d6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -190,8 +190,13 @@ set_target_properties(iceoryx_utils PROPERTIES + ) + + if(LINUX) ++ # Find libacl properly ++ find_package(PkgConfig REQUIRED) ++ pkg_check_modules(ACL REQUIRED libacl) ++ + set(ICEORYX_PLATFORM ${CMAKE_CURRENT_SOURCE_DIR}/platform/linux/) +- target_link_libraries(iceoryx_utils PRIVATE acl atomic ${CODE_COVERAGE_LIBS}) ++ target_include_directories(iceoryx_utils PUBLIC ${ACL_INCLUDE_DIRS}) ++ target_link_libraries(iceoryx_utils PRIVATE ${ACL_LIBRARIES} atomic ${CODE_COVERAGE_LIBS}) + elseif(QNX) + set(ICEORYX_PLATFORM ${CMAKE_CURRENT_SOURCE_DIR}/platform/qnx/) + elseif(APPLE) diff --git a/patch/ros-galactic-lanelet2.patch b/patch/ros-galactic-lanelet2.patch new file mode 100644 index 00000000..5b081632 --- /dev/null +++ b/patch/ros-galactic-lanelet2.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b26ed0b..b630d07 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,9 +1,9 @@ + cmake_minimum_required(VERSION 2.8.3) + project(lanelet2) +-if($ENV{ROS_VERSION} EQUAL 1) ++if(2 EQUAL 1) + find_package(catkin REQUIRED) + install(FILES package.xml DESTINATION share/lanelet2) +-elseif($ENV{ROS_VERSION} EQUAL 2) ++elseif(2 EQUAL 2) + if(POLICY CMP0057) + cmake_policy(SET CMP0057 NEW) + endif() diff --git a/patch/ros-galactic-libg2o.patch b/patch/ros-galactic-libg2o.patch new file mode 100644 index 00000000..6467cdbd --- /dev/null +++ b/patch/ros-galactic-libg2o.patch @@ -0,0 +1,157 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e41fd4c..5b147be 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -150,22 +150,23 @@ endif(G2O_USE_OPENMP) + + # OpenGL is used in the draw actions for the different types, as well + # as for creating the GUI itself +-set(OpenGL_GL_PREFERENCE "GLVND") +-find_package(OpenGL) ++# set(OpenGL_GL_PREFERENCE "GLVND") ++# find_package(OpenGL) + + # If OpenGL was found, use the import target if available. If not, use old-style includes +-set(G2O_USE_OPENGL ON CACHE BOOL "Build g2o with OpenGL support for visualization") +-if (OPENGL_FOUND AND G2O_USE_OPENGL) +- if (TARGET OpenGL::GL) +- set(G2O_OPENGL_TARGET "OpenGL::GL;OpenGL::GLU") +- else() +- set(G2O_OPENGL_TARGET "${OPENGL_LIBRARIES}") +- include_directories(${OPENGL_INCLUDE_DIR}) +- endif() +- set (G2O_HAVE_OPENGL 1) +- message(STATUS "Compiling with OpenGL support") ++# set(G2O_USE_OPENGL ON CACHE BOOL "Build g2o with OpenGL support for visualization") ++# if (OPENGL_FOUND AND G2O_USE_OPENGL) ++# if (TARGET OpenGL::GL) ++# set(G2O_OPENGL_TARGET "OpenGL::GL;OpenGL::GLU") ++# else() ++# set(G2O_OPENGL_TARGET "${OPENGL_LIBRARIES}") ++# include_directories(${OPENGL_INCLUDE_DIR}) ++# endif() ++# set (G2O_HAVE_OPENGL 1) ++ # message(STATUS "Compiling with OpenGL support") + #message(WARNING G2O_OPENGL_TARGET=${G2O_OPENGL_TARGET}) +-endif() ++# endif() ++set (G2O_HAVE_OPENGL 0) + + # For building the GUI + find_package(QGLViewer) +diff --git a/g2o/examples/bal/bal_example.cpp b/g2o/examples/bal/bal_example.cpp +index e953617b2..28f252ada 100644 +--- a/g2o/examples/bal/bal_example.cpp ++++ b/g2o/examples/bal/bal_example.cpp +@@ -46,9 +46,7 @@ + #include "g2o/solvers/eigen/linear_solver_eigen.h" + #endif + +-using namespace g2o; + using namespace std; +-using namespace Eigen; + + namespace g2o { + namespace bal { +@@ -65,7 +63,7 @@ using Vector9 = VectorN<9>; + * - f the focal length of the camera + * - k1, k2 two radial distortion parameters + */ +-class VertexCameraBAL : public BaseVertex<9, bal::Vector9> { ++class VertexCameraBAL : public g2o::BaseVertex<9, g2o::bal::Vector9> { + public: + EIGEN_MAKE_ALIGNED_OPERATOR_NEW; + VertexCameraBAL() {} +@@ -83,7 +81,7 @@ class VertexCameraBAL : public BaseVertex<9, bal::Vector9> { + virtual void setToOriginImpl() { cerr << __PRETTY_FUNCTION__ << " not implemented yet" << endl; } + + virtual void oplusImpl(const double* update) { +- bal::Vector9::ConstMapType v(update, VertexCameraBAL::Dimension); ++ g2o::bal::Vector9::ConstMapType v(update, VertexCameraBAL::Dimension); + _estimate += v; + } + }; +@@ -93,7 +91,7 @@ class VertexCameraBAL : public BaseVertex<9, bal::Vector9> { + * + * A 3D point feature in the world + */ +-class VertexPointBAL : public BaseVertex<3, Vector3> { ++class VertexPointBAL : public g2o::BaseVertex<3, g2o::Vector3> { + public: + EIGEN_MAKE_ALIGNED_OPERATOR_NEW; + VertexPointBAL() {} +@@ -111,7 +109,7 @@ class VertexPointBAL : public BaseVertex<3, Vector3> { + virtual void setToOriginImpl() { cerr << __PRETTY_FUNCTION__ << " not implemented yet" << endl; } + + virtual void oplusImpl(const double* update) { +- Vector3::ConstMapType v(update); ++ g2o::Vector3::ConstMapType v(update); + _estimate += v; + } + }; +@@ -138,7 +136,8 @@ class VertexPointBAL : public BaseVertex<3, Vector3> { + * z-axis points backwards, so the camera is looking down the negative z-axis, + * as in OpenGL). + */ +-class EdgeObservationBAL : public BaseBinaryEdge<2, Vector2, VertexCameraBAL, VertexPointBAL> { ++class EdgeObservationBAL ++ : public g2o::BaseBinaryEdge<2, g2o::Vector2, VertexCameraBAL, VertexPointBAL> { + public: + EIGEN_MAKE_ALIGNED_OPERATOR_NEW; + EdgeObservationBAL() {} +@@ -195,7 +194,7 @@ class EdgeObservationBAL : public BaseBinaryEdge<2, Vector2, VertexCameraBAL, Ve + // compute the error + typename g2o::VectorN<2, T>::MapType error(p_error); + error = prediction - measurement().cast(); +- (void) error; ++ (void)error; + return true; + } + +@@ -209,7 +208,7 @@ int main(int argc, char** argv) { + string outputFilename; + string inputFilename; + string statsFilename; +- CommandArgs arg; ++ g2o::CommandArgs arg; + arg.param("i", maxIterations, 5, "perform n iterations"); + arg.param("o", outputFilename, "", "write points into a vrml file"); + arg.param("pcg", usePCG, false, "use PCG instead of the Cholesky"); +@@ -296,8 +295,8 @@ int main(int argc, char** argv) { + EdgeObservationBAL* e = new EdgeObservationBAL; + e->setVertex(0, cam); + e->setVertex(1, point); +- e->setInformation(Matrix2::Identity()); +- e->setMeasurement(Vector2(obsX, obsY)); ++ e->setInformation(g2o::Matrix2::Identity()); ++ e->setMeasurement(g2o::Vector2(obsX, obsY)); + bool addedEdge = optimizer.addEdge(e); + if (!addedEdge) { + cerr << "error adding edge" << endl; +@@ -306,7 +305,7 @@ int main(int argc, char** argv) { + + // read in the camera params + for (int i = 0; i < numCameras; ++i) { +- bal::Vector9 cameraParameter; ++ g2o::bal::Vector9 cameraParameter; + for (int j = 0; j < 9; ++j) ifs >> cameraParameter(j); + VertexCameraBAL* cam = cameras[i]; + cam->setEstimate(cameraParameter); +@@ -314,7 +313,7 @@ int main(int argc, char** argv) { + + // read in the points + for (int i = 0; i < numPoints; ++i) { +- Vector3 p; ++ g2o::Vector3 p; + ifs >> p(0) >> p(1) >> p(2); + VertexPointBAL* point = points[i]; + point->setEstimate(p); +@@ -332,7 +331,7 @@ int main(int argc, char** argv) { + if (statsFilename != "") { + cerr << "writing stats to file \"" << statsFilename << "\" ... "; + ofstream fout(statsFilename.c_str()); +- const BatchStatisticsContainer& bsc = optimizer.batchStatistics(); ++ const g2o::BatchStatisticsContainer& bsc = optimizer.batchStatistics(); + for (size_t i = 0; i < bsc.size(); i++) fout << bsc[i] << endl; + cerr << "done." << endl; + } diff --git a/patch/ros-galactic-libphidget22.patch b/patch/ros-galactic-libphidget22.patch new file mode 100644 index 00000000..57084b86 --- /dev/null +++ b/patch/ros-galactic-libphidget22.patch @@ -0,0 +1,229 @@ +diff --git a/patch/libusb.patch b/patch/libusb.patch +new file mode 100644 +index 00000000..93c9d526 +--- /dev/null ++++ b/patch/libusb.patch +@@ -0,0 +1,201 @@ ++diff -urp libphidget22-1.6.20200417.orig/configure libphidget22-1.6.20200417/configure ++--- libphidget22-1.6.20200417.orig/configure 2020-04-17 21:51:11.000000000 +0000 +++++ libphidget22-1.6.20200417/configure 2020-06-02 13:31:26.487312313 +0000 ++@@ -738,6 +738,7 @@ ++ docdir ++ oldincludedir ++ includedir +++runstatedir ++ localstatedir ++ sharedstatedir ++ sysconfdir ++@@ -823,6 +824,7 @@ ++ sysconfdir='${prefix}/etc' ++ sharedstatedir='${prefix}/com' ++ localstatedir='${prefix}/var' +++runstatedir='${localstatedir}/run' ++ includedir='${prefix}/include' ++ oldincludedir='/usr/include' ++ docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' ++@@ -1075,6 +1077,15 @@ ++ | -silent | --silent | --silen | --sile | --sil) ++ silent=yes ;; ++ +++ -runstatedir | --runstatedir | --runstatedi | --runstated \ +++ | --runstate | --runstat | --runsta | --runst | --runs \ +++ | --run | --ru | --r) +++ ac_prev=runstatedir ;; +++ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ +++ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ +++ | --run=* | --ru=* | --r=*) +++ runstatedir=$ac_optarg ;; +++ ++ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ++ ac_prev=sbindir ;; ++ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ ++@@ -1212,7 +1223,7 @@ ++ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ ++ datadir sysconfdir sharedstatedir localstatedir includedir \ ++ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ ++- libdir localedir mandir +++ libdir localedir mandir runstatedir ++ do ++ eval ac_val=\$$ac_var ++ # Remove trailing slashes. ++@@ -1365,6 +1376,7 @@ ++ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] ++ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] ++ --localstatedir=DIR modifiable single-machine data [PREFIX/var] +++ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] ++ --libdir=DIR object code libraries [EPREFIX/lib] ++ --includedir=DIR C header files [PREFIX/include] ++ --oldincludedir=DIR C header files for non-gcc [/usr/include] ++@@ -5678,7 +5690,7 @@ ++ fi ++ ++ : ${AR=ar} ++-: ${AR_FLAGS=cr} +++: ${AR_FLAGS=cru} ++ ++ ++ ++@@ -12261,9 +12273,9 @@ ++ as_fn_error $? "Missing libpthread!" "$LINENO" 5 ++ fi ++ ++- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing libusb_init" >&5 ++-$as_echo_n "checking for library containing libusb_init... " >&6; } ++-if ${ac_cv_search_libusb_init+:} false; then : +++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing usb-1.0" >&5 +++$as_echo_n "checking for library containing usb-1.0... " >&6; } +++if ${ac_cv_search_usb_1_0+:} false; then : ++ $as_echo_n "(cached) " >&6 ++ else ++ ac_func_search_save_LIBS=$LIBS ++@@ -12276,16 +12288,16 @@ ++ #ifdef __cplusplus ++ extern "C" ++ #endif ++-char libusb_init (); +++char usb-1.0 (); ++ int ++ main () ++ { ++-return libusb_init (); +++return usb-1.0 (); ++ ; ++ return 0; ++ } ++ _ACEOF ++-for ac_lib in '' usb-1.0; do +++for ac_lib in '' ; do ++ if test -z "$ac_lib"; then ++ ac_res="none required" ++ else ++@@ -12293,29 +12305,27 @@ ++ LIBS="-l$ac_lib $ac_func_search_save_LIBS" ++ fi ++ if ac_fn_c_try_link "$LINENO"; then : ++- ac_cv_search_libusb_init=$ac_res +++ ac_cv_search_usb_1_0=$ac_res ++ fi ++ rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext ++- if ${ac_cv_search_libusb_init+:} false; then : +++ if ${ac_cv_search_usb_1_0+:} false; then : ++ break ++ fi ++ done ++-if ${ac_cv_search_libusb_init+:} false; then : +++if ${ac_cv_search_usb_1_0+:} false; then : ++ ++ else ++- ac_cv_search_libusb_init=no +++ ac_cv_search_usb_1_0=no ++ fi ++ rm conftest.$ac_ext ++ LIBS=$ac_func_search_save_LIBS ++ fi ++-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_libusb_init" >&5 ++-$as_echo "$ac_cv_search_libusb_init" >&6; } ++-ac_res=$ac_cv_search_libusb_init +++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_usb_1_0" >&5 +++$as_echo "$ac_cv_search_usb_1_0" >&6; } +++ac_res=$ac_cv_search_usb_1_0 ++ if test "$ac_res" != no; then : ++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ++- ++-else ++ as_fn_error $? "Missing libusb!" "$LINENO" 5 ++ fi ++ ++@@ -12446,9 +12456,9 @@ ++ as_fn_error $? "Missing libpthread!" "$LINENO" 5 ++ fi ++ ++- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing libusb_init" >&5 ++-$as_echo_n "checking for library containing libusb_init... " >&6; } ++-if ${ac_cv_search_libusb_init+:} false; then : +++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing usb" >&5 +++$as_echo_n "checking for library containing usb... " >&6; } +++if ${ac_cv_search_usb+:} false; then : ++ $as_echo_n "(cached) " >&6 ++ else ++ ac_func_search_save_LIBS=$LIBS ++@@ -12461,16 +12471,16 @@ ++ #ifdef __cplusplus ++ extern "C" ++ #endif ++-char libusb_init (); +++char usb (); ++ int ++ main () ++ { ++-return libusb_init (); +++return usb (); ++ ; ++ return 0; ++ } ++ _ACEOF ++-for ac_lib in '' usb; do +++for ac_lib in '' ; do ++ if test -z "$ac_lib"; then ++ ac_res="none required" ++ else ++@@ -12478,29 +12488,27 @@ ++ LIBS="-l$ac_lib $ac_func_search_save_LIBS" ++ fi ++ if ac_fn_c_try_link "$LINENO"; then : ++- ac_cv_search_libusb_init=$ac_res +++ ac_cv_search_usb=$ac_res ++ fi ++ rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext ++- if ${ac_cv_search_libusb_init+:} false; then : +++ if ${ac_cv_search_usb+:} false; then : ++ break ++ fi ++ done ++-if ${ac_cv_search_libusb_init+:} false; then : +++if ${ac_cv_search_usb+:} false; then : ++ ++ else ++- ac_cv_search_libusb_init=no +++ ac_cv_search_usb=no ++ fi ++ rm conftest.$ac_ext ++ LIBS=$ac_func_search_save_LIBS ++ fi ++-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_libusb_init" >&5 ++-$as_echo "$ac_cv_search_libusb_init" >&6; } ++-ac_res=$ac_cv_search_libusb_init +++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_usb" >&5 +++$as_echo "$ac_cv_search_usb" >&6; } +++ac_res=$ac_cv_search_usb ++ if test "$ac_res" != no; then : ++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ++- ++-else ++ as_fn_error $? "Missing libusb!" "$LINENO" 5 ++ fi ++ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index addd69f..f249422 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -11,14 +11,15 @@ ExternalProject_Add(EP_${PROJECT_NAME} + URL_MD5 5cd2049b8f7ee0c72f88ff1f7fe3c70b + + PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/patch/libphidgets22-1.6.20210312-fix-warnings.patch ++ COMMAND patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/patch/libusb.patch + SOURCE_DIR ${PROJECT_BINARY_DIR}/${PROJECT_NAME}-src + CONFIGURE_COMMAND + /configure + CFLAGS=${extra_c_flags} + --prefix=${CMAKE_CURRENT_BINARY_DIR}/libphidget22_install + --disable-ldconfig +- BUILD_COMMAND $(MAKE) +- INSTALL_COMMAND $(MAKE) install ++ BUILD_COMMAND make ++ INSTALL_COMMAND make install + ) + + # The external project will install to the build folder, but we'll install that on make install. diff --git a/patch/ros-galactic-libyaml-vendor.patch b/patch/ros-galactic-libyaml-vendor.patch new file mode 100644 index 00000000..78c43eb7 --- /dev/null +++ b/patch/ros-galactic-libyaml-vendor.patch @@ -0,0 +1,274 @@ +From 26c8cca76dd47afcbf670275f0891870f83b978b Mon Sep 17 00:00:00 2001 +From: Alberto Soragna +Date: Wed, 15 Sep 2021 11:03:07 +0200 +Subject: [PATCH 1/6] check if libyaml is already present before building it + +Signed-off-by: Alberto Soragna +--- + CMakeLists.txt | 21 ++++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 54dae7b..22b0a80 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -14,8 +14,16 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + add_compile_options(-Wall -Wextra -Wconversion -Wno-sign-conversion -Wpedantic -Wnon-virtual-dtor -Woverloaded-virtual) + endif() + ++option(FORCE_BUILD_VENDOR_PKG ++ "Build libyaml from source, even if system-installed package is available" ++ OFF) ++ + find_package(ament_cmake REQUIRED) + ++if(NOT FORCE_BUILD_VENDOR_PKG) ++ find_package(yaml QUIET) ++endif() ++ + macro(build_libyaml) + set(extra_cmake_args) + +@@ -84,7 +92,18 @@ macro(build_libyaml) + set(yaml_LIBRARIES yaml) + endmacro() + +-build_libyaml() ++# Skip building yaml if the expected version is already present in the system ++if (yaml_FOUND) ++ if("${yaml_VERSION}" VERSION_EQUAL 0.2.5) ++ set(_SKIP_YAML_BUILD 1) ++ else() ++ message(WARNING "A wrong version of libyaml is already present in the system: ${yaml_VERSION}") ++endif() ++ ++if(NOT _SKIP_YAML_BUILD) ++ build_libyaml() ++endif() ++ + set(extra_test_dependencies libyaml-0.2.5) + + ament_export_libraries(yaml) + +From ce893c9e7327fc0540ae68a1aa03a5b938bfb70e Mon Sep 17 00:00:00 2001 +From: Alberto Soragna +Date: Wed, 15 Sep 2021 15:00:36 +0200 +Subject: [PATCH 2/6] add missing endif() and more descriptive warning message + +Signed-off-by: Alberto Soragna +--- + CMakeLists.txt | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 22b0a80..29c50b0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -97,7 +97,10 @@ if (yaml_FOUND) + if("${yaml_VERSION}" VERSION_EQUAL 0.2.5) + set(_SKIP_YAML_BUILD 1) + else() +- message(WARNING "A wrong version of libyaml is already present in the system: ${yaml_VERSION}") ++ message(WARNING ++ "A wrong version of libyaml is already present in the system: ${yaml_VERSION}." ++ "It will be ignored and the expected version will be built.") ++ endif() + endif() + + if(NOT _SKIP_YAML_BUILD) + +From 785446e3819e64e14bdfe6044b5f9178ac84815a Mon Sep 17 00:00:00 2001 +From: Alberto Soragna +Date: Wed, 15 Sep 2021 15:07:46 +0200 +Subject: [PATCH 3/6] move external project dependency within if-else + +Signed-off-by: Alberto Soragna +--- + CMakeLists.txt | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 29c50b0..780676f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -105,10 +105,9 @@ endif() + + if(NOT _SKIP_YAML_BUILD) + build_libyaml() ++ set(extra_test_dependencies libyaml-0.2.5) + endif() + +-set(extra_test_dependencies libyaml-0.2.5) +- + ament_export_libraries(yaml) + ament_export_dependencies(yaml) + + +From b268a29629bd9a419bea54f639586fbd2722fb98 Mon Sep 17 00:00:00 2001 +From: Alberto Soragna +Date: Wed, 15 Sep 2021 15:10:44 +0200 +Subject: [PATCH 4/6] fix lint_cmake error + +Signed-off-by: Alberto Soragna +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 780676f..14906a7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -93,7 +93,7 @@ macro(build_libyaml) + endmacro() + + # Skip building yaml if the expected version is already present in the system +-if (yaml_FOUND) ++if(yaml_FOUND) + if("${yaml_VERSION}" VERSION_EQUAL 0.2.5) + set(_SKIP_YAML_BUILD 1) + else() + +From cf3e38c47e391e39b6e515c67ab2ec7cb91febf4 Mon Sep 17 00:00:00 2001 +From: Alberto Soragna +Date: Wed, 15 Sep 2021 18:06:44 +0200 +Subject: [PATCH 5/6] include expected version in warning message + +Signed-off-by: Alberto Soragna +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 14906a7..1fe119a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -99,7 +99,7 @@ if(yaml_FOUND) + else() + message(WARNING + "A wrong version of libyaml is already present in the system: ${yaml_VERSION}." +- "It will be ignored and the expected version will be built.") ++ "It will be ignored and the 0.2.5 version will be built.") + endif() + endif() + + +From 480209039a4fb1498beb9b43010bd91e3ed399df Mon Sep 17 00:00:00 2001 +From: Silvio Traversaro +Date: Sun, 6 Feb 2022 13:00:23 +0100 +Subject: [PATCH 6/6] Use pkg-config to find if yaml is installed in the system + +Signed-off-by: Silvio Traversaro +--- + CMakeLists.txt | 4 +++- + README.md | 1 + + cmake/Modules/Findyaml.cmake | 38 ++++++++++++++++++++++++++++++++++++ + libyaml_vendor-extras.cmake | 2 ++ + package.xml | 3 +++ + 5 files changed, 47 insertions(+), 1 deletion(-) + create mode 100644 cmake/Modules/Findyaml.cmake + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1fe119a..22ed745 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -19,6 +19,7 @@ option(FORCE_BUILD_VENDOR_PKG + OFF) + + find_package(ament_cmake REQUIRED) ++list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules") + + if(NOT FORCE_BUILD_VENDOR_PKG) + find_package(yaml QUIET) +@@ -108,7 +109,6 @@ if(NOT _SKIP_YAML_BUILD) + set(extra_test_dependencies libyaml-0.2.5) + endif() + +-ament_export_libraries(yaml) + ament_export_dependencies(yaml) + + if(BUILD_TESTING) +@@ -155,4 +155,6 @@ if(BUILD_TESTING) + endif() + endif() + ++install(DIRECTORY cmake DESTINATION share/${PROJECT_NAME}) ++ + ament_package(CONFIG_EXTRAS libyaml_vendor-extras.cmake) +diff --git a/README.md b/README.md +index f8dc9e8..b084f50 100644 +--- a/README.md ++++ b/README.md +@@ -6,3 +6,4 @@ CMake wrapper downloading and building libyaml + Quality declaration for this package: [libyaml_vendor QD](QUALITY_DECLARATION.md). + + Quality declaration of external dependency [libyaml](./libyaml_q_declaration.md). ++ +diff --git a/cmake/Modules/Findyaml.cmake b/cmake/Modules/Findyaml.cmake +new file mode 100644 +index 0000000..34f9b5b +--- /dev/null ++++ b/cmake/Modules/Findyaml.cmake +@@ -0,0 +1,38 @@ ++# Copyright 2022 Open Source Robotics Foundation, Inc. ++# ++# Licensed under the Apache License, Version 2.0 (the "License"); ++# you may not use this file except in compliance with the License. ++# You may obtain a copy of the License at ++# ++# http://www.apache.org/licenses/LICENSE-2.0 ++# ++# Unless required by applicable law or agreed to in writing, software ++# distributed under the License is distributed on an "AS IS" BASIS, ++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++# See the License for the specific language governing permissions and ++# limitations under the License. ++ ++include(FindPackageHandleStandardArgs) ++find_package(yaml CONFIG QUIET) ++if(yaml_FOUND) ++ find_package_handle_standard_args(yaml FOUND_VAR yaml_FOUND CONFIG_MODE) ++else() ++ # Otherwise, rely on pkg-config ++ find_package(PkgConfig QUIET) ++ ++ if(PKG_CONFIG_FOUND) ++ pkg_check_modules(YAML_PKG_CONFIG IMPORTED_TARGET yaml-0.1) ++ find_package_handle_standard_args(yaml DEFAULT_MSG YAML_PKG_CONFIG_FOUND) ++ ++ if(NOT TARGET yaml) ++ add_library(yaml INTERFACE IMPORTED) ++ set_property(TARGET yaml PROPERTY INTERFACE_LINK_LIBRARIES PkgConfig::YAML_PKG_CONFIG) ++ endif() ++ if(NOT yaml_LIBRARIES) ++ set(yaml_LIBRARIES yaml) ++ endif() ++ if(NOT yaml_VERSION) ++ set(yaml_VERSION ${YAML_PKG_CONFIG_VERSION}) ++ endif() ++ endif() ++endif() +diff --git a/libyaml_vendor-extras.cmake b/libyaml_vendor-extras.cmake +index 45e1c9c..d2e52c4 100644 +--- a/libyaml_vendor-extras.cmake ++++ b/libyaml_vendor-extras.cmake +@@ -14,4 +14,6 @@ + + # copied from libyaml_vendor/libyaml_vendor-extras.cmake + ++list(INSERT CMAKE_MODULE_PATH 0 "${libyaml_vendor_DIR}/Modules") ++ + list(APPEND libyaml_vendor_TARGETS yaml) +diff --git a/package.xml b/package.xml +index c2b89c3..e367468 100644 +--- a/package.xml ++++ b/package.xml +@@ -14,6 +14,9 @@ + Mikael Arguedas + + ament_cmake ++ pkg-config ++ ++ pkg-config + + ament_cmake_gtest + ament_lint_auto diff --git a/patch/ros-galactic-menge-vendor.patch b/patch/ros-galactic-menge-vendor.patch new file mode 100644 index 00000000..cc04d12f --- /dev/null +++ b/patch/ros-galactic-menge-vendor.patch @@ -0,0 +1,120 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6eaedad..7b578b1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,9 +20,12 @@ if(APPLE) + endif() + + # find dependencies ++set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/ ${CMAKE_MODULE_PATH}) ++ + find_package(ament_cmake REQUIRED) + find_package(PkgConfig REQUIRED) +-pkg_check_modules(tinyxml REQUIRED tinyxml) ++find_package(TinyXML REQUIRED) ++# pkg_check_modules(tinyxml REQUIRED tinyxml) + + set(MENGE_SRC_DIR ${CMAKE_SOURCE_DIR}/src/Menge) + message("menge_source_dir " ${MENGE_SRC_DIR}) +@@ -55,9 +58,9 @@ add_library( + ${source_files} + ) + +-target_include_directories( menge_vendor PUBLIC ${tinyxml_INCLUDE_DIRS} ) ++target_include_directories( menge_vendor PUBLIC ${TinyXML_INCLUDE_DIRS} ) + +-target_link_libraries ( menge_vendor PUBLIC dl PRIVATE ${tinyxml_LIBRARIES} ) ++target_link_libraries ( menge_vendor PUBLIC dl PRIVATE ${TinyXML_LIBRARIES} ) + + set_target_properties( menge_vendor PROPERTIES LINKER_LANGUAGE CXX ) + +diff --git a/FindTinyXML.cmake b/FindTinyXML.cmake +new file mode 100644 +index 0000000..666d4ec +--- /dev/null ++++ b/FindTinyXML.cmake +@@ -0,0 +1,84 @@ ++################################################################################################## ++# ++# CMake script for finding TinyXML. ++# ++# Input variables: ++# ++# - TinyXML_ROOT_DIR (optional): When specified, header files and libraries will be searched for in ++# ${TinyXML_ROOT_DIR}/include ++# ${TinyXML_ROOT_DIR}/libs ++# respectively, and the default CMake search order will be ignored. When unspecified, the default ++# CMake search order is used. ++# This variable can be specified either as a CMake or environment variable. If both are set, ++# preference is given to the CMake variable. ++# Use this variable for finding packages installed in a nonstandard location, or for enforcing ++# that one of multiple package installations is picked up. ++# ++# ++# Cache variables (not intended to be used in CMakeLists.txt files) ++# ++# - TinyXML_INCLUDE_DIR: Absolute path to package headers. ++# - TinyXML_LIBRARY: Absolute path to library. ++# ++# ++# Output variables: ++# ++# - TinyXML_FOUND: Boolean that indicates if the package was found ++# - TinyXML_INCLUDE_DIRS: Paths to the necessary header files ++# - TinyXML_LIBRARIES: Package libraries ++# ++# ++# Example usage: ++# ++# find_package(TinyXML) ++# if(NOT TinyXML_FOUND) ++# # Error handling ++# endif() ++# ... ++# include_directories(${TinyXML_INCLUDE_DIRS} ...) ++# ... ++# target_link_libraries(my_target ${TinyXML_LIBRARIES}) ++# ++################################################################################################## ++ ++# First attempt to find Config-file package ++find_package(TinyXML CONFIG QUIET) ++ ++if (NOT TinyXML_FOUND) ++ ++ ++ # Get package location hint from environment variable (if any) ++ if(NOT TinyXML_ROOT_DIR AND DEFINED ENV{TinyXML_ROOT_DIR}) ++ set(TinyXML_ROOT_DIR "$ENV{TinyXML_ROOT_DIR}" CACHE PATH ++ "TinyXML base directory location (optional, used for nonstandard installation paths)") ++ endif() ++ ++ # Search path for nonstandard package locations ++ if(TinyXML_ROOT_DIR) ++ set(TinyXML_INCLUDE_PATH PATHS "${TinyXML_ROOT_DIR}/include" NO_DEFAULT_PATH) ++ set(TinyXML_LIBRARY_PATH PATHS "${TinyXML_ROOT_DIR}/lib" NO_DEFAULT_PATH) ++ else() ++ set(TinyXML_INCLUDE_PATH "") ++ set(TinyXML_LIBRARY_PATH "") ++ endif() ++ ++ # Find headers and libraries ++ find_path(TinyXML_INCLUDE_DIR NAMES tinyxml.h PATH_SUFFIXES "tinyxml" ${TinyXML_INCLUDE_PATH}) ++ find_library(TinyXML_LIBRARY NAMES tinyxml PATH_SUFFIXES "tinyxml" ${TinyXML_LIBRARY_PATH}) ++ ++ mark_as_advanced(TinyXML_INCLUDE_DIR ++ TinyXML_LIBRARY) ++ ++ # Output variables generation ++ include(FindPackageHandleStandardArgs) ++ find_package_handle_standard_args(TinyXML DEFAULT_MSG TinyXML_LIBRARY ++ TinyXML_INCLUDE_DIR) ++ ++ set(TinyXML_FOUND ${TINYXML_FOUND}) # Enforce case-correctness: Set appropriately cased variable... ++ unset(TINYXML_FOUND) # ...and unset uppercase variable generated by find_package_handle_standard_args ++ ++ if(TinyXML_FOUND) ++ set(TinyXML_INCLUDE_DIRS ${TinyXML_INCLUDE_DIR}) ++ set(TinyXML_LIBRARIES ${TinyXML_LIBRARY}) ++ endif() ++endif() diff --git a/patch/ros-galactic-mimick-vendor.osx.patch b/patch/ros-galactic-mimick-vendor.osx.patch new file mode 100644 index 00000000..21efbef4 --- /dev/null +++ b/patch/ros-galactic-mimick-vendor.osx.patch @@ -0,0 +1,39 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e4cf591..3b1519d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -58,11 +58,12 @@ macro(build_mimick) + endif() + + include(ExternalProject) +- set(mimick_version "f171450b5ebaa3d2538c762a059dfc6ab7a01039") ++ set(mimick_version "de11f8377eb95f932a03707b583bf3d4ce5bd3e7") + externalproject_add(mimick-${mimick_version} + GIT_REPOSITORY https://github.com/ros2/Mimick.git + GIT_TAG ${mimick_version} + GIT_CONFIG advice.detachedHead=false ++ PATCH_COMMAND git apply ${CMAKE_CURRENT_LIST_DIR}/crosscompile.patch + # Suppress git update due to https://gitlab.kitware.com/cmake/cmake/-/issues/16419 + UPDATE_COMMAND "" + TIMEOUT 6000 +diff --git a/crosscompile.patch b/crosscompile.patch +new file mode 100644 +index 0000000..8d6fc61 +--- /dev/null ++++ b/crosscompile.patch +@@ -0,0 +1,15 @@ ++diff --git a/CMakeLists.txt b/CMakeLists.txt ++index a0ff848..34c95ff 100644 ++--- a/CMakeLists.txt +++++ b/CMakeLists.txt ++@@ -32,6 +32,10 @@ else () ++ set (_ARCH "${CMAKE_SYSTEM_PROCESSOR}") ++ endif () ++ +++if(APPLE AND "$ENV{CONDA_BUILD_CROSS_COMPILATION}" EQUAL "1") +++ set (_ARCH "arm64") +++endif() +++ ++ set (MMK_MANGLING "none") ++ ++ if (MSVC) diff --git a/patch/ros-galactic-mimick-vendor.win.patch b/patch/ros-galactic-mimick-vendor.win.patch new file mode 100644 index 00000000..52ea5003 --- /dev/null +++ b/patch/ros-galactic-mimick-vendor.win.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e4cf591..3934ec7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -59,7 +59,8 @@ macro(build_mimick) + + include(ExternalProject) + set(mimick_version "f171450b5ebaa3d2538c762a059dfc6ab7a01039") +- externalproject_add(mimick-${mimick_version} ++ externalproject_add(mimick ++ PREFIX mck + GIT_REPOSITORY https://github.com/ros2/Mimick.git + GIT_TAG ${mimick_version} + GIT_CONFIG advice.detachedHead=false diff --git a/patch/ros-galactic-moveit-common.win.patch b/patch/ros-galactic-moveit-common.win.patch new file mode 100644 index 00000000..e099f2d9 --- /dev/null +++ b/patch/ros-galactic-moveit-common.win.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/moveit_package.cmake b/cmake/moveit_package.cmake +index 1fed492e2d..7d14b5b477 100644 +--- a/cmake/moveit_package.cmake ++++ b/cmake/moveit_package.cmake +@@ -33,7 +33,7 @@ macro(moveit_package) + ament_package_xml() + + # Enable backward_ros on every moveit package +- find_package(backward_ros QUIET) ++ # find_package(backward_ros QUIET) + + if(NOT "${CMAKE_CXX_STANDARD}") + set(CMAKE_CXX_STANDARD 17) diff --git a/patch/ros-galactic-moveit-core.osx.patch b/patch/ros-galactic-moveit-core.osx.patch new file mode 100644 index 00000000..da0f5863 --- /dev/null +++ b/patch/ros-galactic-moveit-core.osx.patch @@ -0,0 +1,164 @@ +diff --git a/background_processing/include/moveit/background_processing/background_processing.h b/background_processing/include/moveit/background_processing/background_processing.h +index 3ecb98b5..5a7c5f48 100644 +--- a/background_processing/include/moveit/background_processing/background_processing.h ++++ b/background_processing/include/moveit/background_processing/background_processing.h +@@ -38,7 +38,7 @@ + + #include + #include +-#include ++#include + #include + #include + #include +@@ -96,11 +96,11 @@ public: + void clearJobUpdateEvent(); + + private: +- std::unique_ptr processing_thread_; ++ std::unique_ptr processing_thread_; + bool run_processing_thread_; + +- mutable boost::mutex action_lock_; +- boost::condition_variable new_action_condition_; ++ mutable std::mutex action_lock_; ++ std::condition_variable new_action_condition_; + std::deque actions_; + std::deque action_names_; + +diff --git a/background_processing/src/background_processing.cpp b/background_processing/src/background_processing.cpp +index 7e7b2447..348caf53 100644 +--- a/background_processing/src/background_processing.cpp ++++ b/background_processing/src/background_processing.cpp +@@ -49,7 +49,7 @@ BackgroundProcessing::BackgroundProcessing() + // spin a thread that will process user events + run_processing_thread_ = true; + processing_ = false; +- processing_thread_ = std::make_unique(boost::bind(&BackgroundProcessing::processingThread, this)); ++ processing_thread_ = std::make_unique(std::bind(&BackgroundProcessing::processingThread, this)); + } + + BackgroundProcessing::~BackgroundProcessing() +@@ -61,7 +61,7 @@ BackgroundProcessing::~BackgroundProcessing() + + void BackgroundProcessing::processingThread() + { +- boost::unique_lock ulock(action_lock_); ++ std::unique_lock ulock(action_lock_); + + while (run_processing_thread_) + { +@@ -99,7 +99,7 @@ void BackgroundProcessing::processingThread() + void BackgroundProcessing::addJob(const boost::function& job, const std::string& name) + { + { +- boost::mutex::scoped_lock _(action_lock_); ++ std::scoped_lock _(action_lock_); + actions_.push_back(job); + action_names_.push_back(name); + new_action_condition_.notify_all(); +@@ -113,7 +113,7 @@ void BackgroundProcessing::clear() + bool update = false; + std::deque removed; + { +- boost::mutex::scoped_lock _(action_lock_); ++ std::scoped_lock _(action_lock_); + update = !actions_.empty(); + actions_.clear(); + action_names_.swap(removed); +@@ -125,13 +125,13 @@ void BackgroundProcessing::clear() + + std::size_t BackgroundProcessing::getJobCount() const + { +- boost::mutex::scoped_lock _(action_lock_); ++ std::scoped_lock _(action_lock_); + return actions_.size() + (processing_ ? 1 : 0); + } + + void BackgroundProcessing::setJobUpdateEvent(const JobUpdateCallback& event) + { +- boost::mutex::scoped_lock _(action_lock_); ++ std::scoped_lock _(action_lock_); + queue_change_event_ = event; + } + +diff --git a/profiler/include/moveit/profiler/profiler.h b/profiler/include/moveit/profiler/profiler.h +index 3ea38f58..10e72e10 100644 +--- a/profiler/include/moveit/profiler/profiler.h ++++ b/profiler/include/moveit/profiler/profiler.h +@@ -56,7 +56,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + +@@ -304,8 +304,8 @@ private: + + void printThreadInfo(std::ostream& out, const PerThread& data); + +- boost::mutex lock_; +- std::map data_; ++ std::mutex lock_; ++ std::map data_; + TimeInfo tinfo_; + bool running_; + bool printOnDestroy_; +diff --git a/profiler/src/profiler.cpp b/profiler/src/profiler.cpp +index 69a0bf39..00a53ba4 100644 +--- a/profiler/src/profiler.cpp ++++ b/profiler/src/profiler.cpp +@@ -88,14 +88,14 @@ void Profiler::clear() + void Profiler::event(const std::string& name, const unsigned int times) + { + lock_.lock(); +- data_[boost::this_thread::get_id()].events[name] += times; ++ data_[std::this_thread::get_id()].events[name] += times; + lock_.unlock(); + } + + void Profiler::average(const std::string& name, const double value) + { + lock_.lock(); +- AvgInfo& a = data_[boost::this_thread::get_id()].avg[name]; ++ AvgInfo& a = data_[std::this_thread::get_id()].avg[name]; + a.total += value; + a.totalSqr += value * value; + a.parts++; +@@ -105,14 +105,14 @@ void Profiler::average(const std::string& name, const double value) + void Profiler::begin(const std::string& name) + { + lock_.lock(); +- data_[boost::this_thread::get_id()].time[name].set(); ++ data_[std::this_thread::get_id()].time[name].set(); + lock_.unlock(); + } + + void Profiler::end(const std::string& name) + { + lock_.lock(); +- data_[boost::this_thread::get_id()].time[name].update(); ++ data_[std::this_thread::get_id()].time[name].update(); + lock_.unlock(); + } + +@@ -136,7 +136,7 @@ void Profiler::status(std::ostream& out, bool merge) + if (merge) + { + PerThread combined; +- for (std::map::const_iterator it = data_.begin(); it != data_.end(); ++it) ++ for (std::map::const_iterator it = data_.begin(); it != data_.end(); ++it) + { + for (const std::pair& event : it->second.events) + combined.events[event.first] += event.second; +@@ -160,7 +160,7 @@ void Profiler::status(std::ostream& out, bool merge) + printThreadInfo(out, combined); + } + else +- for (std::map::const_iterator it = data_.begin(); it != data_.end(); ++it) ++ for (std::map::const_iterator it = data_.begin(); it != data_.end(); ++it) + { + out << "Thread " << it->first << ":\n"; + printThreadInfo(out, it->second); diff --git a/patch/ros-galactic-moveit-core.patch b/patch/ros-galactic-moveit-core.patch new file mode 100644 index 00000000..529a3976 --- /dev/null +++ b/patch/ros-galactic-moveit-core.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ceb8b5286..5f75bbebe 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -15,13 +15,6 @@ include(ConfigExtras.cmake) + + find_package(PkgConfig REQUIRED) + pkg_check_modules(LIBFCL REQUIRED "fcl>=0.5.0") +-# replace LIBFCL_LIBRARIES with full paths to the libraries +-set(LIBFCL_LIBRARIES_FULL "") +-foreach(LIBFCL_LIBRARY ${LIBFCL_LIBRARIES}) +- find_library(${LIBFCL_LIBRARY}_LIB ${LIBFCL_LIBRARY} ${LIBFCL_LIBRARY_DIRS}) +- list(APPEND LIBFCL_LIBRARIES_FULL ${${LIBFCL_LIBRARY}_LIB}) +-endforeach() +-set(LIBFCL_LIBRARIES "${LIBFCL_LIBRARIES_FULL}") + + find_package(Bullet 2.87 REQUIRED) + find_package(angles REQUIRED) diff --git a/patch/ros-galactic-moveit-core.win.patch b/patch/ros-galactic-moveit-core.win.patch new file mode 100644 index 00000000..19c23399 --- /dev/null +++ b/patch/ros-galactic-moveit-core.win.patch @@ -0,0 +1,19 @@ +diff --git a/collision_detection_fcl/CMakeLists.txt b/collision_detection_fcl/CMakeLists.txt +index 32002955a7..7e8d737c8f 100644 +--- a/collision_detection_fcl/CMakeLists.txt ++++ b/collision_detection_fcl/CMakeLists.txt +@@ -14,12 +14,13 @@ ament_target_dependencies(${MOVEIT_LIB_NAME} + urdf + urdfdom + urdfdom_headers +- LIBFCL + Boost + visualization_msgs + ) ++message(WARNING "Linking to ${LIBFCL_LINK_LIBRARIES}") + target_link_libraries(${MOVEIT_LIB_NAME} + moveit_collision_detection ++ ${LIBFCL_LINK_LIBRARIES} + ) + + add_library(collision_detector_fcl_plugin SHARED src/collision_detector_fcl_plugin_loader.cpp) diff --git a/patch/ros-galactic-moveit-kinematics.patch b/patch/ros-galactic-moveit-kinematics.patch new file mode 100644 index 00000000..c1eaf691 --- /dev/null +++ b/patch/ros-galactic-moveit-kinematics.patch @@ -0,0 +1,27 @@ +diff --git a/cached_ik_kinematics_plugin/include/moveit/cached_ik_kinematics_plugin/detail/NearestNeighborsGNAT.h b/cached_ik_kinematics_plugin/include/moveit/cached_ik_kinematics_plugin/detail/NearestNeighborsGNAT.h +index 49a02b9d6b..e8142e5711 100644 +--- a/cached_ik_kinematics_plugin/include/moveit/cached_ik_kinematics_plugin/detail/NearestNeighborsGNAT.h ++++ b/cached_ik_kinematics_plugin/include/moveit/cached_ik_kinematics_plugin/detail/NearestNeighborsGNAT.h +@@ -551,7 +551,9 @@ class NearestNeighborsGNAT : public NearestNeighbors<_T> + std::vector permutation(children_.size()); + for (unsigned int i = 0; i < permutation.size(); ++i) + permutation[i] = i; +- std::random_shuffle(permutation.begin(), permutation.end()); ++ std::random_device rng; ++ std::mt19937 urng(rng()); ++ std::shuffle(permutation.begin(), permutation.end(), urng); + + for (unsigned int i = 0; i < children_.size(); ++i) + if (permutation[i] >= 0) +@@ -605,7 +607,9 @@ class NearestNeighborsGNAT : public NearestNeighbors<_T> + std::vector permutation(children_.size()); + for (unsigned int i = 0; i < permutation.size(); ++i) + permutation[i] = i; +- std::random_shuffle(permutation.begin(), permutation.end()); ++ std::random_device rng; ++ std::mt19937 urng(rng()); ++ std::shuffle(permutation.begin(), permutation.end(), urng); + + for (unsigned int i = 0; i < children_.size(); ++i) + if (permutation[i] >= 0) + diff --git a/patch/ros-galactic-moveit-planners-ompl.patch b/patch/ros-galactic-moveit-planners-ompl.patch new file mode 100644 index 00000000..bd45f39f --- /dev/null +++ b/patch/ros-galactic-moveit-planners-ompl.patch @@ -0,0 +1,18 @@ +diff --git a/ompl_interface/CMakeLists.txt b/ompl_interface/CMakeLists.txt +index ff71c07c..0d0aef71 100644 +--- a/ompl_interface/CMakeLists.txt ++++ b/ompl_interface/CMakeLists.txt +@@ -24,7 +24,12 @@ add_library(${MOVEIT_LIB_NAME} SHARED + ) + set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}") + +-find_package(OpenMP REQUIRED) ++if(APPLE) ++ find_package(OpenMP) ++ set(OpenMP_CXX_FLAGS "-fopenmp") ++else() ++ find_package(OpenMP REQUIRED) ++endif() + + # Used to link in ODE, an OMPL dependency, on macOS + if(APPLE) diff --git a/patch/ros-galactic-moveit-resources-prbt-ikfast-manipulator-plugin.patch b/patch/ros-galactic-moveit-resources-prbt-ikfast-manipulator-plugin.patch new file mode 100644 index 00000000..ce3d3068 --- /dev/null +++ b/patch/ros-galactic-moveit-resources-prbt-ikfast-manipulator-plugin.patch @@ -0,0 +1,63 @@ +diff --git a/moveit_planners/test_configs/prbt_ikfast_manipulator_plugin/CMakeLists.txt b/moveit_planners/test_configs/prbt_ikfast_manipulator_plugin/CMakeLists.txt +index ee7e2d0bd5..a84887f89a 100644 +--- a/moveit_planners/test_configs/prbt_ikfast_manipulator_plugin/CMakeLists.txt ++++ b/moveit_planners/test_configs/prbt_ikfast_manipulator_plugin/CMakeLists.txt +@@ -4,10 +4,12 @@ project(moveit_resources_prbt_ikfast_manipulator_plugin) + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_EXTENSIONS OFF) + +-add_compile_options(-Wall) +-add_compile_options(-Wextra) +-add_compile_options(-Wno-unused-parameter) +-add_compile_options(-Wno-unused-variable) ++if(NOT WIN32) ++ add_compile_options(-Wall) ++ add_compile_options(-Wextra) ++ add_compile_options(-Wno-unused-parameter) ++ add_compile_options(-Wno-unused-variable) ++endif() + + # enable aligned new in gcc7+ + if(CMAKE_COMPILER_IS_GNUCXX) +@@ -29,8 +31,11 @@ include_directories(include) + + add_library(prbt_manipulator_moveit_ikfast_plugin SHARED + src/prbt_manipulator_ikfast_moveit_plugin.cpp) +-# suppress warnings about unused variables in OpenRave's solver code +-target_compile_options(prbt_manipulator_moveit_ikfast_plugin PRIVATE -Wno-unused-variable) ++ ++if(NOT WIN32) ++ # suppress warnings about unused variables in OpenRave's solver code ++ target_compile_options(prbt_manipulator_moveit_ikfast_plugin PRIVATE -Wno-unused-variable) ++endif() + ament_target_dependencies(prbt_manipulator_moveit_ikfast_plugin + moveit_core + pluginlib +diff --git a/moveit_planners/test_configs/prbt_ikfast_manipulator_plugin/src/prbt_manipulator_ikfast_solver.cpp b/moveit_planners/test_configs/prbt_ikfast_manipulator_plugin/src/prbt_manipulator_ikfast_solver.cpp +index c1359ad572..7a238a9df7 100644 +--- a/moveit_planners/test_configs/prbt_ikfast_manipulator_plugin/src/prbt_manipulator_ikfast_solver.cpp ++++ b/moveit_planners/test_configs/prbt_ikfast_manipulator_plugin/src/prbt_manipulator_ikfast_solver.cpp +@@ -25,10 +25,6 @@ + #include "ikfast.h" // found inside share/openrave-X.Y/python/ikfast.h + using namespace ikfast; + +-// check if the included ikfast version matches what this file was compiled with +-#define IKFAST_COMPILE_ASSERT(x) extern int __dummy[(int)x] +-IKFAST_COMPILE_ASSERT(IKFAST_VERSION==0x1000004a); +- + #include + #include + #include +diff --git a/moveit_planners/test_configs/prbt_ikfast_manipulator_plugin/src/prbt_manipulator_ikfast_moveit_plugin.cpp b/moveit_planners/test_configs/prbt_ikfast_manipulator_plugin/src/prbt_manipulator_ikfast_moveit_plugin.cpp +index 7479184c92..48da20018c 100644 +--- a/moveit_planners/test_configs/prbt_ikfast_manipulator_plugin/src/prbt_manipulator_ikfast_moveit_plugin.cpp ++++ b/moveit_planners/test_configs/prbt_ikfast_manipulator_plugin/src/prbt_manipulator_ikfast_moveit_plugin.cpp +@@ -805,7 +805,7 @@ bool IKFastKinematicsPlugin::getPositionFK(const std::vector& link_ + return false; + } + +- IkReal angles[num_joints_]; ++ IkReal* angles = new IkReal[num_joints_]; + for (unsigned char i = 0; i < num_joints_; i++) + angles[i] = joint_angles[i]; + diff --git a/patch/ros-galactic-moveit-ros-planning.patch b/patch/ros-galactic-moveit-ros-planning.patch new file mode 100644 index 00000000..885ae91e --- /dev/null +++ b/patch/ros-galactic-moveit-ros-planning.patch @@ -0,0 +1,34 @@ +diff --git a/kinematics_plugin_loader/CMakeLists.txt b/kinematics_plugin_loader/CMakeLists.txt +index ee1b58e8..56858550 100644 +--- a/kinematics_plugin_loader/CMakeLists.txt ++++ b/kinematics_plugin_loader/CMakeLists.txt +@@ -1,5 +1,8 @@ + set(MOVEIT_LIB_NAME moveit_kinematics_plugin_loader) + ++find_package(PkgConfig REQUIRED) ++pkg_check_modules(LIBFCL REQUIRED "fcl>=0.5.0") ++ + add_library(${MOVEIT_LIB_NAME} SHARED src/kinematics_plugin_loader.cpp) + set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}") + ament_target_dependencies(${MOVEIT_LIB_NAME} +@@ -12,6 +15,7 @@ ament_target_dependencies(${MOVEIT_LIB_NAME} + ) + target_link_libraries(${MOVEIT_LIB_NAME} + moveit_rdf_loader ++ ${LIBFCL_LINK_LIBRARIES} + ) + + install(DIRECTORY include/ DESTINATION include) +diff --git a/kinematics_plugin_loader/src/kinematics_plugin_loader.cpp b/kinematics_plugin_loader/src/kinematics_plugin_loader.cpp +index f718f3f4..9db5cbb8 100644 +--- a/kinematics_plugin_loader/src/kinematics_plugin_loader.cpp ++++ b/kinematics_plugin_loader/src/kinematics_plugin_loader.cpp +@@ -38,6 +38,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include diff --git a/patch/ros-galactic-mrpt2.patch b/patch/ros-galactic-mrpt2.patch new file mode 100644 index 00000000..a43970fd --- /dev/null +++ b/patch/ros-galactic-mrpt2.patch @@ -0,0 +1,846 @@ +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/patch/ros-galactic-mrt-cmake-modules.patch b/patch/ros-galactic-mrt-cmake-modules.patch new file mode 100644 index 00000000..f29ad889 --- /dev/null +++ b/patch/ros-galactic-mrt-cmake-modules.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index aa99d8d..8327d4e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,7 +1,7 @@ + cmake_minimum_required(VERSION 3.0.2) + project(mrt_cmake_modules) + +-if($ENV{ROS_VERSION} EQUAL 1) ++if(2 EQUAL 1) + find_package(catkin REQUIRED) + catkin_package(CFG_EXTRAS mrt_cmake_modules-extras.cmake) + else() diff --git a/patch/ros-galactic-nav2-amcl.win.patch b/patch/ros-galactic-nav2-amcl.win.patch new file mode 100644 index 00000000..ceb09c30 --- /dev/null +++ b/patch/ros-galactic-nav2-amcl.win.patch @@ -0,0 +1,13 @@ +diff --git a/nav2_amcl/CMakeLists.txt b/nav2_amcl/CMakeLists.txt +index af2e6bf42..cf24fde81 100644 +--- a/nav2_amcl/CMakeLists.txt ++++ b/nav2_amcl/CMakeLists.txt +@@ -1,6 +1,8 @@ + cmake_minimum_required(VERSION 3.5) + project(nav2_amcl) + ++add_definitions(-DNOMINMAX) ++ + find_package(ament_cmake REQUIRED) + find_package(nav2_common REQUIRED) + find_package(rclcpp REQUIRED) diff --git a/patch/ros-galactic-nav2-behavior-tree.osx.patch b/patch/ros-galactic-nav2-behavior-tree.osx.patch new file mode 100644 index 00000000..dd763dd7 --- /dev/null +++ b/patch/ros-galactic-nav2-behavior-tree.osx.patch @@ -0,0 +1,13 @@ +diff --git a/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_server.hpp b/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_server.hpp +index ec9779444..4909367f9 100644 +--- a/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_server.hpp ++++ b/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_server.hpp +@@ -168,7 +168,7 @@ class BtActionServer + * @brief Getter function for the current BT tree + * @return BT::Tree Current behavior tree + */ +- BT::Tree getTree() const ++ BT::Tree& getTree() + { + return tree_; + } diff --git a/patch/ros-galactic-nav2-behavior-tree.win.patch b/patch/ros-galactic-nav2-behavior-tree.win.patch new file mode 100644 index 00000000..253353c9 --- /dev/null +++ b/patch/ros-galactic-nav2-behavior-tree.win.patch @@ -0,0 +1,165 @@ +diff --git a/nav2_behavior_tree/CMakeLists.txt b/nav2_behavior_tree/CMakeLists.txt +index 9de075152..ade316733 100644 +--- a/nav2_behavior_tree/CMakeLists.txt ++++ b/nav2_behavior_tree/CMakeLists.txt +@@ -1,6 +1,8 @@ + cmake_minimum_required(VERSION 3.5) + project(nav2_behavior_tree CXX) + ++add_definitions(-DNOMINMAX) ++ + find_package(ament_cmake REQUIRED) + find_package(nav2_common REQUIRED) + find_package(rclcpp REQUIRED) +diff --git a/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_server.hpp b/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_server.hpp +index ec9779444..e423afcb4 100644 +--- a/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_server.hpp ++++ b/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_server.hpp +@@ -231,11 +231,6 @@ class BtActionServer + // Default timeout value while waiting for response from a server + std::chrono::milliseconds default_server_timeout_; + +- // Parameters for Groot monitoring +- bool enable_groot_monitoring_; +- int groot_zmq_publisher_port_; +- int groot_zmq_server_port_; +- + // User-provided callbacks + OnGoalReceivedCallback on_goal_received_callback_; + OnLoopCallback on_loop_callback_; +diff --git a/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_server_impl.hpp b/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_server_impl.hpp +index 64f4ffa81..bb10a8830 100644 +--- a/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_server_impl.hpp ++++ b/nav2_behavior_tree/include/nav2_behavior_tree/bt_action_server_impl.hpp +@@ -59,15 +59,6 @@ BtActionServer::BtActionServer( + if (!node->has_parameter("default_server_timeout")) { + node->declare_parameter("default_server_timeout", 20); + } +- if (!node->has_parameter("enable_groot_monitoring")) { +- node->declare_parameter("enable_groot_monitoring", true); +- } +- if (!node->has_parameter("groot_zmq_publisher_port")) { +- node->declare_parameter("groot_zmq_publisher_port", 1666); +- } +- if (!node->has_parameter("groot_zmq_server_port")) { +- node->declare_parameter("groot_zmq_server_port", 1667); +- } + } + + template +@@ -102,11 +93,6 @@ bool BtActionServer::on_configure() + node->get_node_waitables_interface(), + action_name_, std::bind(&BtActionServer::executeCallback, this)); + +- // Get parameter for monitoring with Groot via ZMQ Publisher +- node->get_parameter("enable_groot_monitoring", enable_groot_monitoring_); +- node->get_parameter("groot_zmq_publisher_port", groot_zmq_publisher_port_); +- node->get_parameter("groot_zmq_server_port", groot_zmq_server_port_); +- + // Get parameters for BT timeouts + int timeout; + node->get_parameter("bt_loop_duration", timeout); +@@ -156,7 +142,6 @@ bool BtActionServer::on_cleanup() + current_bt_xml_filename_.clear(); + blackboard_.reset(); + bt_->haltAllActions(tree_.rootNode()); +- bt_->resetGrootMonitor(); + bt_.reset(); + return true; + } +@@ -173,9 +158,6 @@ bool BtActionServer::loadBehaviorTree(const std::string & bt_xml_filena + return true; + } + +- // if a new tree is created, than the ZMQ Publisher must be destroyed +- bt_->resetGrootMonitor(); +- + // Read the input BT XML from the specified file into a string + std::ifstream xml_file(filename); + +@@ -194,16 +176,6 @@ bool BtActionServer::loadBehaviorTree(const std::string & bt_xml_filena + + current_bt_xml_filename_ = filename; + +- // Enable monitoring with Groot +- if (enable_groot_monitoring_) { +- // optionally add max_msg_per_second = 25 (default) here +- try { +- bt_->addGrootMonitoring(&tree_, groot_zmq_publisher_port_, groot_zmq_server_port_); +- } catch (const std::logic_error & e) { +- RCLCPP_ERROR(logger_, "ZMQ already enabled, Error: %s", e.what()); +- } +- } +- + return true; + } + diff --git a/nav2_behavior_tree/src/behavior_tree_engine.cpp b/nav2_behavior_tree/src/behavior_tree_engine.cpp +index e689cae927..ed55b08534 100644 +--- a/nav2_behavior_tree/src/behavior_tree_engine.cpp ++++ b/nav2_behavior_tree/src/behavior_tree_engine.cpp +@@ -83,27 +83,6 @@ BehaviorTreeEngine::createTreeFromFile( + return factory_.createTreeFromFile(file_path, blackboard); + } + +-void +-BehaviorTreeEngine::addGrootMonitoring( +- BT::Tree * tree, +- uint16_t publisher_port, +- uint16_t server_port, +- uint16_t max_msg_per_second) +-{ +- // This logger publish status changes using ZeroMQ. Used by Groot +- groot_monitor_ = std::make_unique( +- *tree, max_msg_per_second, publisher_port, +- server_port); +-} +- +-void +-BehaviorTreeEngine::resetGrootMonitor() +-{ +- if (groot_monitor_) { +- groot_monitor_.reset(); +- } +-} +- + // In order to re-run a Behavior Tree, we must be able to reset all nodes to the initial state + void + BehaviorTreeEngine::haltAllActions(BT::TreeNode * root_node) +diff --git a/nav2_behavior_tree/include/nav2_behavior_tree/behavior_tree_engine.hpp b/nav2_behavior_tree/include/nav2_behavior_tree/behavior_tree_engine.hpp +index f5aab180c..6f0c9bfb9 100644 +--- a/nav2_behavior_tree/include/nav2_behavior_tree/behavior_tree_engine.hpp ++++ b/nav2_behavior_tree/include/nav2_behavior_tree/behavior_tree_engine.hpp +@@ -83,24 +83,6 @@ class BehaviorTreeEngine + const std::string & file_path, + BT::Blackboard::Ptr blackboard); + +- /** +- * @brief Add groot monitor to publish BT status changes +- * @param tree BT to monitor +- * @param publisher_port ZMQ publisher port for the Groot monitor +- * @param server_port ZMQ server port for the Groot monitor +- * @param max_msg_per_second Maximum number of messages that can be sent per second +- */ +- void addGrootMonitoring( +- BT::Tree * tree, +- uint16_t publisher_port, +- uint16_t server_port, +- uint16_t max_msg_per_second = 25); +- +- /** +- * @brief Reset groot monitor +- */ +- void resetGrootMonitor(); +- + /** + * @brief Function to explicitly reset all BT nodes to initial state + * @param root_node Pointer to BT root node +@@ -110,8 +92,6 @@ class BehaviorTreeEngine + protected: + // The factory that will be used to dynamically construct the behavior tree + BT::BehaviorTreeFactory factory_; +- +- static inline std::unique_ptr groot_monitor_; + }; + + } // namespace nav2_behavior_tree diff --git a/patch/ros-galactic-nav2-common.osx.patch b/patch/ros-galactic-nav2-common.osx.patch new file mode 100644 index 00000000..0098d054 --- /dev/null +++ b/patch/ros-galactic-nav2-common.osx.patch @@ -0,0 +1,13 @@ +diff --git a/nav2_common/cmake/nav2_package.cmake b/nav2_common/cmake/nav2_package.cmake +index b00d30c17b..e4d69043bd 100644 +--- a/nav2_common/cmake/nav2_package.cmake ++++ b/nav2_common/cmake/nav2_package.cmake +@@ -33,7 +33,7 @@ macro(nav2_package) + endif() + + if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") +- add_compile_options(-Wall -Wextra -Wpedantic -Werror -Wdeprecated -fPIC) ++ add_compile_options(-fPIC) + endif() + + option(COVERAGE_ENABLED "Enable code coverage" FALSE) diff --git a/patch/ros-galactic-nav2-common.win.patch b/patch/ros-galactic-nav2-common.win.patch new file mode 100644 index 00000000..1183cbfe --- /dev/null +++ b/patch/ros-galactic-nav2-common.win.patch @@ -0,0 +1,12 @@ +diff --git a/nav2_common/cmake/nav2_package.cmake b/nav2_common/cmake/nav2_package.cmake +index b00d30c17b..439f5b523a 100644 +--- a/nav2_common/cmake/nav2_package.cmake ++++ b/nav2_common/cmake/nav2_package.cmake +@@ -45,6 +45,7 @@ macro(nav2_package) + + # Defaults for Microsoft C++ compiler + if(MSVC) ++ add_definitions(-DNOMINMAX) + # https://blog.kitware.com/create-dlls-on-windows-without-declspec-using-new-cmake-export-all-feature/ + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + diff --git a/patch/ros-galactic-nav2-controller.patch b/patch/ros-galactic-nav2-controller.patch new file mode 100644 index 00000000..cfe7ad10 --- /dev/null +++ b/patch/ros-galactic-nav2-controller.patch @@ -0,0 +1,13 @@ +diff --git a/nav2_controller/CMakeLists.txt b/nav2_controller/CMakeLists.txt +index f8e7bd91a..f794a0b16 100644 +--- a/nav2_controller/CMakeLists.txt ++++ b/nav2_controller/CMakeLists.txt +@@ -1,6 +1,8 @@ + cmake_minimum_required(VERSION 3.5) + project(nav2_controller) + ++add_definitions(-DNOMINMAX) ++ + find_package(ament_cmake REQUIRED) + find_package(nav2_core REQUIRED) + find_package(nav2_common REQUIRED) diff --git a/patch/ros-galactic-nav2-costmap-2d.win.patch b/patch/ros-galactic-nav2-costmap-2d.win.patch new file mode 100644 index 00000000..9a4ca1e1 --- /dev/null +++ b/patch/ros-galactic-nav2-costmap-2d.win.patch @@ -0,0 +1,13 @@ +diff --git a/nav2_costmap_2d/CMakeLists.txt b/nav2_costmap_2d/CMakeLists.txt +index 84f86617a..e94cfaec0 100644 +--- a/nav2_costmap_2d/CMakeLists.txt ++++ b/nav2_costmap_2d/CMakeLists.txt +@@ -1,6 +1,8 @@ + cmake_minimum_required(VERSION 3.5) + project(nav2_costmap_2d) + ++add_definitions(-DNOMINMAX) ++ + find_package(ament_cmake REQUIRED) + find_package(geometry_msgs REQUIRED) + find_package(laser_geometry REQUIRED) diff --git a/patch/ros-galactic-nav2-map-server.patch b/patch/ros-galactic-nav2-map-server.patch new file mode 100644 index 00000000..c6e1b2b5 --- /dev/null +++ b/patch/ros-galactic-nav2-map-server.patch @@ -0,0 +1,13 @@ +diff --git a/src/map_io.cpp b/src/map_io.cpp +index b26b09be38..251985f487 100644 +--- a/src/map_io.cpp ++++ b/src/map_io.cpp +@@ -86,7 +86,7 @@ char * dirname(char * path) + /* This assignment is ill-designed but the XPG specs require to + return a string containing "." in any case no directory part is + found and so a static and constant string is required. */ +- path = reinterpret_cast(dot); ++ path = (char *)dot; + } + + return path; diff --git a/patch/ros-galactic-nav2-recoveries.win.patch b/patch/ros-galactic-nav2-recoveries.win.patch new file mode 100644 index 00000000..cc7b4154 --- /dev/null +++ b/patch/ros-galactic-nav2-recoveries.win.patch @@ -0,0 +1,13 @@ +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/patch/ros-galactic-nav2-regulated-pure-pursuit-controller.patch b/patch/ros-galactic-nav2-regulated-pure-pursuit-controller.patch new file mode 100644 index 00000000..3f00b630 --- /dev/null +++ b/patch/ros-galactic-nav2-regulated-pure-pursuit-controller.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9c87714f..7076cb84 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -15,6 +15,8 @@ find_package(tf2 REQUIRED) + nav2_package() + set(CMAKE_CXX_STANDARD 17) + ++add_definitions(-DNOMINMAX) ++ + include_directories( + include + ) diff --git a/patch/ros-galactic-nav2-rotation-shim-controller.win.patch b/patch/ros-galactic-nav2-rotation-shim-controller.win.patch new file mode 100644 index 00000000..c3ce5880 --- /dev/null +++ b/patch/ros-galactic-nav2-rotation-shim-controller.win.patch @@ -0,0 +1,13 @@ +diff --git a/nav2_rotation_shim_controller/CMakeLists.txt b/nav2_rotation_shim_controller/CMakeLists.txt +index 2e141d5f44..44db4213a3 100644 +--- a/nav2_rotation_shim_controller/CMakeLists.txt ++++ b/nav2_rotation_shim_controller/CMakeLists.txt +@@ -13,6 +13,8 @@ find_package(pluginlib REQUIRED) + find_package(tf2 REQUIRED) + find_package(angles REQUIRED) + ++add_definitions(-DNOMINMAX) ++ + nav2_package() + set(CMAKE_CXX_STANDARD 17) + diff --git a/patch/ros-galactic-nav2-smac-planner.osx.patch b/patch/ros-galactic-nav2-smac-planner.osx.patch new file mode 100644 index 00000000..855f0270 --- /dev/null +++ b/patch/ros-galactic-nav2-smac-planner.osx.patch @@ -0,0 +1,39 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6da37d4c..e2eab3ad 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -22,7 +22,9 @@ find_package(pluginlib REQUIRED) + find_package(eigen3_cmake_module REQUIRED) + find_package(Eigen3 REQUIRED) + find_package(ompl REQUIRED) +-find_package(OpenMP REQUIRED) ++if(NOT APPLE) ++ find_package(OpenMP REQUIRED) ++endif() + + if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 17) +@@ -47,6 +49,10 @@ if(OPENMP_FOUND) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") ++else() ++ if(APPLE) ++ set(${OpenMP_LIBRARIES} "-fopenmp") ++ endif() + endif() + + set(library_name nav2_smac_planner) +@@ -78,7 +84,11 @@ add_library(${library_name} SHARED + src/node_2d.cpp + ) + +-target_link_libraries(${library_name} ${OMPL_LIBRARIES} ${OpenMP_LIBRARIES} OpenMP::OpenMP_CXX) ++if(NOT APPLE) ++ target_link_libraries(${library_name} ${OMPL_LIBRARIES} ${OpenMP_LIBRARIES} OpenMP::OpenMP_CXX) ++else() ++ target_link_libraries(${library_name} ${OMPL_LIBRARIES} ${OpenMP_LIBRARIES}) ++endif() + target_include_directories(${library_name} PUBLIC ${Eigen3_INCLUDE_DIRS}) + + ament_target_dependencies(${library_name} diff --git a/patch/ros-galactic-nav2-smac-planner.win.patch b/patch/ros-galactic-nav2-smac-planner.win.patch new file mode 100644 index 00000000..f899cb5a --- /dev/null +++ b/patch/ros-galactic-nav2-smac-planner.win.patch @@ -0,0 +1,12 @@ +diff --git a/nav2_smac_planner/CMakeLists.txt b/nav2_smac_planner/CMakeLists.txt +index c21e856da8..eb5cd2ed4c 100644 +--- a/nav2_smac_planner/CMakeLists.txt ++++ b/nav2_smac_planner/CMakeLists.txt +@@ -33,6 +33,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") + + if(MSVC) + add_compile_definitions(_USE_MATH_DEFINES) ++ add_definitions(-DNOMINMAX) + else() + add_compile_options(-O3 -Wextra -Wdeprecated -fPIC) + endif() diff --git a/patch/ros-galactic-nav2-waypoint-follower.patch b/patch/ros-galactic-nav2-waypoint-follower.patch new file mode 100644 index 00000000..926cd1dd --- /dev/null +++ b/patch/ros-galactic-nav2-waypoint-follower.patch @@ -0,0 +1,68 @@ +diff --git a/nav2_waypoint_follower/CMakeLists.txt b/nav2_waypoint_follower/CMakeLists.txt +index a3b46942b..b0930e1aa 100644 +--- a/nav2_waypoint_follower/CMakeLists.txt ++++ b/nav2_waypoint_follower/CMakeLists.txt +@@ -1,6 +1,8 @@ + cmake_minimum_required(VERSION 3.5) + project(nav2_waypoint_follower) + ++add_definitions(-DNOMINMAX) ++ + # Try for OpenCV 4.X, but settle for whatever is installed + find_package(OpenCV 4 QUIET) + if(NOT OpenCV_FOUND) +@@ -25,7 +25,11 @@ find_package(pluginlib REQUIRED) + + nav2_package() + +-link_libraries(stdc++fs) ++if(UNIX AND NOT APPLE) ++ link_libraries(stdc++fs) ++else() ++ ++endif() + + include_directories( + include +diff --git a/nav2_waypoint_follower/include/nav2_waypoint_follower/plugins/photo_at_waypoint.hpp b/nav2_waypoint_follower/include/nav2_waypoint_follower/plugins/photo_at_waypoint.hpp +index fc4aee5c5e..4198919fe2 100644 +--- a/nav2_waypoint_follower/include/nav2_waypoint_follower/plugins/photo_at_waypoint.hpp ++++ b/nav2_waypoint_follower/include/nav2_waypoint_follower/plugins/photo_at_waypoint.hpp +@@ -20,6 +20,7 @@ + * to ignore deprecated declarations + */ + #define _LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM ++#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING + + + #include +@@ -27,13 +28,14 @@ + #include + #include + ++#include ++#include ++ + #include "rclcpp/rclcpp.hpp" + #include "rclcpp_components/register_node_macro.hpp" + + #include "sensor_msgs/msg/image.hpp" + #include "nav2_core/waypoint_task_executor.hpp" +-#include "opencv4/opencv2/core.hpp" +-#include "opencv4/opencv2/opencv.hpp" + #include "cv_bridge/cv_bridge.h" + #include "image_transport/image_transport.hpp" + +diff --git a/nav2_waypoint_follower/plugins/photo_at_waypoint.cpp b/nav2_waypoint_follower/plugins/photo_at_waypoint.cpp +index 7d1f4a9b1b..902ea5ff5f 100644 +--- a/nav2_waypoint_follower/plugins/photo_at_waypoint.cpp ++++ b/nav2_waypoint_follower/plugins/photo_at_waypoint.cpp +@@ -118,7 +118,7 @@ bool PhotoAtWaypoint::processAtWaypoint( + std::lock_guard guard(global_mutex_); + cv::Mat curr_frame_mat; + deepCopyMsg2Mat(curr_frame_msg_, curr_frame_mat); +- cv::imwrite(full_path_image_path.c_str(), curr_frame_mat); ++ cv::imwrite(full_path_image_path.string().c_str(), curr_frame_mat); + RCLCPP_INFO( + logger_, + "Photo has been taken sucessfully at waypoint %i", curr_waypoint_index); diff --git a/patch/ros-galactic-octomap.win.patch b/patch/ros-galactic-octomap.win.patch new file mode 100644 index 00000000..ec883f2b --- /dev/null +++ b/patch/ros-galactic-octomap.win.patch @@ -0,0 +1,85 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 38499022..6f3b2998 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,7 +4,7 @@ set(CMAKE_INSTALL_LIBDIR "lib") # workaround for GNUInstallDirs + + include(CTest) + include(GNUInstallDirs) +- ++set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + # version (e.g. for packaging) + set(OCTOMAP_MAJOR_VERSION 1) + set(OCTOMAP_MINOR_VERSION 9) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 45b384f7..fa4cf234 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -16,9 +16,14 @@ set_target_properties( octomap PROPERTIES + VERSION ${OCTOMAP_VERSION} + SOVERSION ${OCTOMAP_SOVERSION} + ) +-ADD_LIBRARY( octomap-static STATIC ${octomap_SRCS}) +-SET_TARGET_PROPERTIES(octomap-static PROPERTIES OUTPUT_NAME "octomap") +-add_dependencies(octomap-static octomath-static) ++# ADD_LIBRARY( octomap-static STATIC ${octomap_SRCS}) ++# if (WIN32) ++# set (STATIC_OUTPUT_SUFFIX "-static") ++# else () ++# set (STATIC_OUTPUT_SUFFIX "") ++# endif() ++# SET_TARGET_PROPERTIES(octomap-static PROPERTIES OUTPUT_NAME "octomap${STATIC_OUTPUT_SUFFIX}") ++# add_dependencies(octomap-static octomath-static) + + TARGET_LINK_LIBRARIES(octomap octomath) + +@@ -26,7 +31,7 @@ if(NOT EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") + file(MAKE_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") + endif() + +-export(TARGETS octomap octomap-static ++export(TARGETS octomap + APPEND FILE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-targets.cmake") + + ADD_SUBDIRECTORY( testing ) +@@ -67,7 +72,7 @@ TARGET_LINK_LIBRARIES(intersection_example octomap) + ADD_EXECUTABLE(octree2pointcloud octree2pointcloud.cpp) + TARGET_LINK_LIBRARIES(octree2pointcloud octomap) + +-install(TARGETS octomap octomap-static ++install(TARGETS octomap + EXPORT octomap-targets + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ${INSTALL_TARGETS_DEFAULT_ARGS} +diff --git a/src/math/CMakeLists.txt b/src/math/CMakeLists.txt +index 3b47ec44..5f07fe89 100644 +--- a/src/math/CMakeLists.txt ++++ b/src/math/CMakeLists.txt +@@ -12,17 +12,23 @@ SET_TARGET_PROPERTIES( octomath PROPERTIES + SOVERSION ${OCTOMAP_SOVERSION} + ) + +-ADD_LIBRARY( octomath-static STATIC ${octomath_SRCS}) +-SET_TARGET_PROPERTIES(octomath-static PROPERTIES OUTPUT_NAME "octomath") ++# ADD_LIBRARY( octomath-static STATIC ${octomath_SRCS}) ++# if (WIN32) ++# set (STATIC_OUTPUT_SUFFIX "-static") ++# else () ++# set (STATIC_OUTPUT_SUFFIX "") ++# endif() ++ ++# SET_TARGET_PROPERTIES(octomath-static PROPERTIES OUTPUT_NAME "octomath${STATIC_OUTPUT_SUFFIX}") + + if(NOT EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") + file(MAKE_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") + endif() + +-export(TARGETS octomath octomath-static ++export(TARGETS octomath + APPEND FILE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-targets.cmake") + +-install(TARGETS octomath octomath-static ++install(TARGETS octomath + EXPORT octomap-targets + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ${INSTALL_TARGETS_DEFAULT_ARGS} diff --git a/patch/ros-galactic-octovis.patch b/patch/ros-galactic-octovis.patch new file mode 100644 index 00000000..5e71fe41 --- /dev/null +++ b/patch/ros-galactic-octovis.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeModules/FindQGLViewer.cmake b/CMakeModules/FindQGLViewer.cmake +index 982d294c..b51d8b2d 100644 +--- a/CMakeModules/FindQGLViewer.cmake ++++ b/CMakeModules/FindQGLViewer.cmake +@@ -14,6 +14,7 @@ SET( QGLViewer_FOUND 0 CACHE BOOL "Do we have QGLViewer?" ) + FIND_PATH( QGLVIEWER_BASE_DIR qglviewer.h + ${CMAKE_SOURCE_DIR}/src/extern/QGLViewer + ${CMAKE_SOURCE_DIR}/octovis/src/extern/QGLViewer ++ PATH_SUFFIXES QGLViewer + ) + + FIND_PATH( QGLViewer_INCLUDE_DIR qglviewer.h diff --git a/patch/ros-galactic-osrf-testing-tools-cpp.osx.patch b/patch/ros-galactic-osrf-testing-tools-cpp.osx.patch new file mode 100644 index 00000000..1aafc912 --- /dev/null +++ b/patch/ros-galactic-osrf-testing-tools-cpp.osx.patch @@ -0,0 +1,16 @@ +diff --git a/src/memory_tools/vendor/bombela/backward-cpp/backward.hpp b/src/memory_tools/vendor/bombela/backward-cpp/backward.hpp +index 0370ef2..3b5f9d6 100644 +--- a/src/memory_tools/vendor/bombela/backward-cpp/backward.hpp ++++ b/src/memory_tools/vendor/bombela/backward-cpp/backward.hpp +@@ -3927,8 +3927,10 @@ public: + error_addr = reinterpret_cast(uctx->uc_mcontext.gregs[REG_EIP]); + #elif defined(__arm__) + error_addr = reinterpret_cast(uctx->uc_mcontext.arm_pc); +-#elif defined(__aarch64__) ++#elif defined(__aarch64__) && !defined(__APPLE__) + error_addr = reinterpret_cast(uctx->uc_mcontext.pc); ++#elif defined(__aarch64__) && defined(__APPLE__) ++ error_addr = reinterpret_cast(uctx->uc_mcontext->__ss.__pc); + #elif defined(__mips__) + error_addr = reinterpret_cast(reinterpret_cast(&uctx->uc_mcontext)->sc_pc); + #elif defined(__ppc__) || defined(__powerpc) || defined(__powerpc__) || \ diff --git a/patch/ros-galactic-osrf-testing-tools-cpp.patch b/patch/ros-galactic-osrf-testing-tools-cpp.patch new file mode 100644 index 00000000..88c2f900 --- /dev/null +++ b/patch/ros-galactic-osrf-testing-tools-cpp.patch @@ -0,0 +1,13 @@ +diff --git a/src/memory_tools/CMakeLists.txt b/src/memory_tools/CMakeLists.txt +index 7cfbba3..3451c95 100644 +--- a/src/memory_tools/CMakeLists.txt ++++ b/src/memory_tools/CMakeLists.txt +@@ -34,7 +34,7 @@ if(UNIX AND NOT APPLE) + # On Linux like systems, add dl and use the normal library and LD_PRELOAD. + + if(DL_LIBRARY) +- target_link_libraries(memory_tools PUBLIC ${DL_LIBRARY}) ++ target_link_libraries(memory_tools PUBLIC dl) + endif() + endif() + diff --git a/patch/ros-galactic-pendulum-control.patch b/patch/ros-galactic-pendulum-control.patch new file mode 100644 index 00000000..2e0ffa4d --- /dev/null +++ b/patch/ros-galactic-pendulum-control.patch @@ -0,0 +1,121 @@ +diff --git a/pendulum_control/src/pendulum_demo.cpp b/pendulum_control/src/pendulum_demo.cpp +index 4efbf7a97..0653215e7 100644 +--- a/pendulum_control/src/pendulum_demo.cpp ++++ b/pendulum_control/src/pendulum_demo.cpp +@@ -12,82 +12,28 @@ + // See the License for the specific language governing permissions and + // limitations under the License. + +-#include +-#include +-#include +-#include + #include + ++#include ++ + #include + #include + #include + +-#include +- + #include + + #include + #include + #include + ++#include ++#include + #include + + #include "pendulum_control/pendulum_controller.hpp" + #include "pendulum_control/pendulum_motor.hpp" + #include "pendulum_control/rtt_executor.hpp" + +- +-static bool running = false; +- +-// Initialize a malloc hook so we can show that no mallocs are made during real-time execution +- +-/// Declare a function pointer into which we will store the default malloc. +-static void * (* prev_malloc_hook)(size_t, const void *); +- +-// Use pragma to ignore a warning for using __malloc_hook, which is deprecated (but still awesome). +-#pragma GCC diagnostic push +-#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +-/// Implement a custom malloc. +-/** +- * Our custom malloc backtraces to find the address of the function that called malloc and formats +- * the line as a string (if the code was compiled with debug symbols. +- * \param[in] size Requested malloc size. +- * \param[in] caller pointer to the caller of this function (unused). +- * \return Pointer to the allocated memory +- */ +-static void * testing_malloc(size_t size, const void * caller) +-{ +- (void)caller; +- // Set the malloc implementation to the default malloc hook so that we can call it implicitly +- // to initialize a string, otherwise this function will loop infinitely. +- __malloc_hook = prev_malloc_hook; +- +- if (running) { +- fprintf(stderr, "Called malloc during realtime execution phase!\n"); +- rclcpp::shutdown(); +- exit(-1); +- } +- +- // Execute the requested malloc. +- void * mem = malloc(size); +- // Set the malloc hook back to this function, so that we can intercept future mallocs. +- __malloc_hook = testing_malloc; +- return mem; +-} +- +-/// Function to be called when the malloc hook is initialized. +-void init_malloc_hook() +-{ +- // Store the default malloc. +- prev_malloc_hook = __malloc_hook; +- // Set our custom malloc to the malloc hook. +- __malloc_hook = testing_malloc; +-} +-#pragma GCC diagnostic pop +- +-/// Set the hook for malloc initialize so that init_malloc_hook gets called. +-void(*volatile __malloc_initialize_hook)(void) = init_malloc_hook; +- + using rclcpp::strategies::message_pool_memory_strategy::MessagePoolMemoryStrategy; + using rclcpp::memory_strategies::allocator_memory_strategy::AllocatorMemoryStrategy; + +@@ -100,7 +46,7 @@ int main(int argc, char * argv[]) + // In the initialization phase of a realtime program, non-realtime-safe operations such as + // allocation memory are permitted. + +- // Create a structure with the default physical propreties of the pendulum (length and mass). ++ // Create a structure with the default physical properties of the pendulum (length and mass). + pendulum_control::PendulumProperties properties; + // Instantiate a PendulumMotor class which simulates the physics of the inverted pendulum + // and provide a sensor message for the current position. +@@ -288,9 +234,6 @@ int main(int argc, char * argv[]) + + // End initialization phase + +- // Execution phase +- running = true; +- + // Unlike the default SingleThreadedExecutor::spin function, RttExecutor::spin runs in + // bounded time (for as many iterations as specified in the rttest parameters). + executor->spin(); +@@ -299,10 +242,6 @@ int main(int argc, char * argv[]) + + // End execution phase + +- // Teardown phase +- // deallocation is handled automatically by objects going out of scope +- running = false; +- + printf("PendulumMotor received %zu messages\n", pendulum_motor->messages_received); + printf("PendulumController received %zu messages\n", pendulum_controller->messages_received); + diff --git a/patch/ros-galactic-pilz-industrial-motion-planner.patch b/patch/ros-galactic-pilz-industrial-motion-planner.patch new file mode 100644 index 00000000..6c28b446 --- /dev/null +++ b/patch/ros-galactic-pilz-industrial-motion-planner.patch @@ -0,0 +1,44 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d0d638fb..410f6352 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -85,11 +85,6 @@ set(THIS_PACKAGE_INCLUDE_DEPENDS + ## Libraries ## + ############### + +-add_library(planning_context_loader_base SHARED +- src/planning_context_loader.cpp +-) +-ament_target_dependencies(planning_context_loader_base ${THIS_PACKAGE_INCLUDE_DEPENDS}) +- + add_library(joint_limits_common SHARED + src/joint_limits_aggregator.cpp + src/joint_limits_container.cpp +@@ -100,18 +95,27 @@ add_library(joint_limits_common SHARED + ) + ament_target_dependencies(joint_limits_common ${THIS_PACKAGE_INCLUDE_DEPENDS}) + ++add_library(planning_context_loader_base SHARED ++ src/planning_context_loader.cpp ++) ++ament_target_dependencies(planning_context_loader_base ${THIS_PACKAGE_INCLUDE_DEPENDS}) ++target_link_libraries(planning_context_loader_base joint_limits_common) ++ ++ + add_library(trajectory_generation_common SHARED + src/trajectory_functions.cpp + src/trajectory_generator.cpp + src/trajectory_blender_transition_window.cpp + ) + ament_target_dependencies(trajectory_generation_common ${THIS_PACKAGE_INCLUDE_DEPENDS}) ++target_link_libraries(trajectory_generation_common joint_limits_common) + + add_library(command_list_manager SHARED + src/command_list_manager.cpp + src/plan_components_builder.cpp + ) + ament_target_dependencies(command_list_manager ${THIS_PACKAGE_INCLUDE_DEPENDS}) ++target_link_libraries(command_list_manager joint_limits_common trajectory_generation_common) + + ############# + ## Plugins ## diff --git a/patch/ros-galactic-plotjuggler.patch b/patch/ros-galactic-plotjuggler.patch new file mode 100644 index 00000000..377b2f97 --- /dev/null +++ b/patch/ros-galactic-plotjuggler.patch @@ -0,0 +1,105 @@ +diff --git a/3rdparty/Qt-Advanced-Docking/CMakeLists.txt b/3rdparty/Qt-Advanced-Docking/CMakeLists.txt +index 6b650f1b..4d940448 100644 +--- a/3rdparty/Qt-Advanced-Docking/CMakeLists.txt ++++ b/3rdparty/Qt-Advanced-Docking/CMakeLists.txt +@@ -4,6 +4,7 @@ project(QtADS LANGUAGES CXX) + + include_directories(include/Qads) + ++find_package(XCB REQUIRED) + find_package(Qt5 5.5 COMPONENTS Core Gui Widgets REQUIRED) + if (UNIX AND NOT APPLE) + find_package(Qt5 5.5 COMPONENTS X11Extras REQUIRED) +@@ -67,7 +68,8 @@ target_link_libraries(qt_advanced_docking PUBLIC Qt5::Core Qt5::Gui Qt5::Widgets + + if(UNIX AND NOT APPLE) + target_link_libraries(qt_advanced_docking PUBLIC Qt5::X11Extras) +- target_link_libraries(qt_advanced_docking PRIVATE xcb) ++ target_link_libraries(qt_advanced_docking PRIVATE ${XCB_LIBRARIES}) ++ target_include_directories(qt_advanced_docking SYSTEM PUBLIC ${XCB_INCLUDE_DIRS}) + endif() + + set_target_properties(qt_advanced_docking PROPERTIES +diff --git a/cmake/FindXCB.cmake b/cmake/FindXCB.cmake +new file mode 100644 +index 00000000..a2e2757a +--- /dev/null ++++ b/cmake/FindXCB.cmake +@@ -0,0 +1,51 @@ ++# - FindXCB ++# ++# Copyright 2015 Valve Coporation ++ ++find_package(PkgConfig) ++ ++if(NOT XCB_FIND_COMPONENTS) ++ set(XCB_FIND_COMPONENTS xcb) ++endif() ++ ++include(FindPackageHandleStandardArgs) ++set(XCB_FOUND true) ++set(XCB_INCLUDE_DIRS "") ++set(XCB_LIBRARIES "") ++foreach(comp ${XCB_FIND_COMPONENTS}) ++ # component name ++ string(TOUPPER ${comp} compname) ++ string(REPLACE "-" "_" compname ${compname}) ++ # header name ++ string(REPLACE "xcb-" "" headername xcb/${comp}.h) ++ # library name ++ set(libname ${comp}) ++ ++ pkg_check_modules(PC_${comp} QUIET ${comp}) ++ ++ find_path(${compname}_INCLUDE_DIR NAMES ${headername} ++ HINTS ++ ${PC_${comp}_INCLUDEDIR} ++ ${PC_${comp}_INCLUDE_DIRS} ++ ) ++ ++ find_library(${compname}_LIBRARY NAMES ${libname} ++ HINTS ++ ${PC_${comp}_LIBDIR} ++ ${PC_${comp}_LIBRARY_DIRS} ++ ) ++ ++ find_package_handle_standard_args(${comp} ++ FOUND_VAR ${comp}_FOUND ++ REQUIRED_VARS ${compname}_INCLUDE_DIR ${compname}_LIBRARY) ++ mark_as_advanced(${compname}_INCLUDE_DIR ${compname}_LIBRARY) ++ ++ list(APPEND XCB_INCLUDE_DIRS ${${compname}_INCLUDE_DIR}) ++ list(APPEND XCB_LIBRARIES ${${compname}_LIBRARY}) ++ ++ if(NOT ${comp}_FOUND) ++ set(XCB_FOUND false) ++ endif() ++endforeach() ++ ++list(REMOVE_DUPLICATES XCB_INCLUDE_DIRS) + +diff --git a/plotjuggler_plugins/DataStreamZMQ/CMakeLists.txt b/plotjuggler_plugins/DataStreamZMQ/CMakeLists.txt +index 68a3c5cc..2e808351 100644 +--- a/plotjuggler_plugins/DataStreamZMQ/CMakeLists.txt ++++ b/plotjuggler_plugins/DataStreamZMQ/CMakeLists.txt +@@ -1,6 +1,8 @@ + + include_directories(../) + ++find_package(cppzmq) ++ + add_definitions(${QT_DEFINITIONS}) + add_definitions(-DQT_PLUGIN) + +@@ -13,8 +15,10 @@ add_library(DataStreamZMQ SHARED ${SRC} ${UI_SRC} ) + target_link_libraries(DataStreamZMQ + ${Qt5Widgets_LIBRARIES} + plotjuggler_base +- zmq ++ ${cppzmq_LIBRARY} + ) ++ ++target_include_directories(DataStreamZMQ PUBLIC ${cppzmq_INCLUDE_DIR}) + + install(TARGETS DataStreamZMQ DESTINATION ${PJ_PLUGIN_INSTALL_DIRECTORY} ) + diff --git a/patch/ros-galactic-popf.patch b/patch/ros-galactic-popf.patch new file mode 100644 index 00000000..fdfc1563 --- /dev/null +++ b/patch/ros-galactic-popf.patch @@ -0,0 +1,173 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a2ed58a..d4236d3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -16,6 +16,9 @@ find_package(CoinUtils) + find_package(Cbc) + find_package(Cgl) + ++find_package(BISON REQUIRED) ++find_package(FLEX REQUIRED) ++ + set(val_SOURCE_DIR src/VALfiles) + set(popf_SOURCE_DIR src/popf) + set(parsePDDL_SOURCE_DIR ${val_SOURCE_DIR}/parsing) +@@ -29,22 +32,11 @@ include_directories( + ${CBC_INCLUDES}/coin + ${CPLEX_INCLUDES} + ${CONCERT_INCLUDES} ++ ${FLEX_INCLUDE_DIRS} + ) + + ## ParsePDDL + +-find_program(BISON_EXECUTABLE bison) +- +-if(NOT EXISTS ${BISON_EXECUTABLE}) +- message("Could not find bison executable.") +-endif(NOT EXISTS ${BISON_EXECUTABLE}) +- +-FIND_PROGRAM(FLEX_EXECUTABLE flex) +- +-if(NOT EXISTS ${FLEX_EXECUTABLE}) +- message("Could not find flex executable.") +-endif(NOT EXISTS ${FLEX_EXECUTABLE}) +- + add_custom_command( + OUTPUT + ${CMAKE_CURRENT_BINARY_DIR}/lex.yy.cc +@@ -66,7 +58,7 @@ add_custom_command( + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/${parsePDDL_SOURCE_DIR}/pddl+.yacc ${CMAKE_CURRENT_BINARY_DIR}/lex.yy.cc + COMMAND +- ${CMAKE_CURRENT_SOURCE_DIR}/${parsePDDL_SOURCE_DIR}/fixyywrap ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${parsePDDL_SOURCE_DIR}/ ++ ${CMAKE_CURRENT_SOURCE_DIR}/${parsePDDL_SOURCE_DIR}/fixyywrap ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${parsePDDL_SOURCE_DIR}/ ${FLEX_INCLUDE_DIRS} + ) + + set(libParsePDDL_SRCS +@@ -91,6 +83,8 @@ set(libInst_SRCS + ${val_SOURCE_DIR}/TypeStripWC.cpp + ) + ++target_link_libraries(ParsePDDL ${FLEX_LIBRARIES}) ++ + add_library(Inst SHARED ${libInst_SRCS}) + target_link_libraries(Inst ParsePDDL) + +@@ -129,6 +123,7 @@ add_executable(parser ${parser_SRCS}) + + target_link_libraries(parser + ParsePDDL ++ ${FLEX_LIBRARIES} + ) + + install(TARGETS validate parser ParsePDDL +@@ -184,4 +179,4 @@ install(FILES src/popf/Popf.hpp + ament_export_include_directories(include) + ament_export_libraries(popfCommon ParsePDDL Inst ${CBC_LIBRARY} ${CGL_LIBRARIES} ${OSICLP_LIBRARIES} ${OSI_LIBRARIES} ${CLP_LIBRARIES} ${COINUTILS_LIBRARIES}) + ament_export_dependencies(${dependencies}) +-ament_package() +\ No newline at end of file ++ament_package() +diff --git a/src/VALfiles/parse.cpp b/src/VALfiles/parse.cpp +index b51c585..5880ffe 100644 +--- a/src/VALfiles/parse.cpp ++++ b/src/VALfiles/parse.cpp +@@ -44,6 +44,8 @@ + #include "ptree.h" + #include "FlexLexer.h" + ++//extern int yyFlexLexer::yywrap(); ++//extern "C" int yywrap(); + extern int yyparse(); + extern int yydebug; + +diff --git a/src/VALfiles/parsing/CMakeLists.txt b/src/VALfiles/parsing/CMakeLists.txt +index dd7dc8e..0627f81 100644 +--- a/src/VALfiles/parsing/CMakeLists.txt ++++ b/src/VALfiles/parsing/CMakeLists.txt +@@ -2,18 +2,10 @@ cmake_minimum_required(VERSION 2.4) + + project(ParsePDDL) + +-find_program(BISON_EXECUTABLE bison) ++find_package(FLEX REQUIRED) ++find_package(BISON REQUIRED) + +-if(NOT EXISTS ${BISON_EXECUTABLE}) +- message("Could not find bison executable.") +-endif(NOT EXISTS ${BISON_EXECUTABLE}) +- +- +-FIND_PROGRAM(FLEX_EXECUTABLE flex HINTS /usr/local/opt/flex/bin/) +- +-if(NOT EXISTS ${FLEX_EXECUTABLE}) +- message("Could not find flex executable.") +-endif(NOT EXISTS ${FLEX_EXECUTABLE}) ++include_directories(${FLEX_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) + + add_custom_command( + OUTPUT +@@ -36,11 +28,9 @@ add_custom_command( + DEPENDS + ${CMAKE_CURRENT_SOURCE_DIR}/pddl+.yacc ${CMAKE_CURRENT_BINARY_DIR}/lex.yy.cc + COMMAND +- ${CMAKE_CURRENT_SOURCE_DIR}/fixyywrap ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ++ ${CMAKE_CURRENT_SOURCE_DIR}/fixyywrap ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${FLEX_INCLUDE_DIRS} + ) + +-include_directories(/usr/local/opt/flex/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) +- + set(libParsePDDL_SRCS + pddl+.cpp ptree.cpp DebugWriteController.cpp + ) +diff --git a/src/VALfiles/parsing/fixyywrap b/src/VALfiles/parsing/fixyywrap +index 11aef39..be36596 100755 +--- a/src/VALfiles/parsing/fixyywrap ++++ b/src/VALfiles/parsing/fixyywrap +@@ -1,13 +1,14 @@ +-#!/usr/bin/perl -w ++#!/usr/bin/env perl + + $bindir = shift @ARGV; + $srcdir = shift @ARGV; ++$includepath = shift @ARGV; + + # MacOS' sed requires '' as a parameter to -i +-system("sed -i '' 's/yyerror(char/yyerror(const char/' $bindir/pddl+.cpp"); ++system("sed 's/yyerror(char/yyerror(const char/' $bindir/pddl+.cpp"); + + # add Homebrew's flex include path +-open IN, "g++ -E -I/usr/local/opt/flex/include $srcdir/fixyywrap.cpp |"; ++open IN, "g++ -E -I$includepath $srcdir/fixyywrap.cpp |"; + open OUT, "> $bindir/fixyywrap.h"; + + while () { +diff --git a/src/VALfiles/parsing/pddl+.lex b/src/VALfiles/parsing/pddl+.lex +index 598c8e5..dba389c 100644 +--- a/src/VALfiles/parsing/pddl+.lex ++++ b/src/VALfiles/parsing/pddl+.lex +@@ -8,7 +8,8 @@ + using std::cerr; + using std::istream; + using namespace VAL; +-extern "C" int yywrap(); ++//extern int yyFlexLexer::yywrap(); ++//extern "C" int yywrap(); + + %} + %option case-insensitive +diff --git a/src/VALfiles/test/lex.yy.cc b/src/VALfiles/test/lex.yy.cc +index 974fc92..cc5dfcc 100644 +--- a/src/VALfiles/test/lex.yy.cc ++++ b/src/VALfiles/test/lex.yy.cc +@@ -1041,7 +1041,8 @@ static yyconst flex_int16_t yy_chk[1781] = + using std::cerr; + using std::istream; + using namespace VAL; +-extern "C" int yywrap(); ++//extern "C" int yywrap(); ++//extern int yyFlexLexer::yywrap(); + + #line 1047 "lex.yy.cc" + diff --git a/patch/ros-galactic-pybind11-vendor.patch b/patch/ros-galactic-pybind11-vendor.patch new file mode 100644 index 00000000..bc3ae9e7 --- /dev/null +++ b/patch/ros-galactic-pybind11-vendor.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9b79b46..084754e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -68,6 +68,7 @@ endmacro() + + # Currently, always build. + # This could be improved with logic to use installed platform packages. +-build_pybind11() ++# build_pybind11() ++find_package(pybind11 REQUIRED) + + ament_package() diff --git a/patch/ros-galactic-python-qt-binding.patch b/patch/ros-galactic-python-qt-binding.patch new file mode 100644 index 00000000..57d819c8 --- /dev/null +++ b/patch/ros-galactic-python-qt-binding.patch @@ -0,0 +1,185 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 919969e..2bf015a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -11,6 +11,7 @@ install(FILES + cmake/shiboken_helper.cmake + cmake/sip_configure.py + cmake/sip_helper.cmake ++ cmake/pyproject.toml.in + DESTINATION share/${PROJECT_NAME}/cmake) + + if(BUILD_TESTING) +diff --git a/cmake/pyproject.toml.in b/cmake/pyproject.toml.in +new file mode 100644 +index 0000000..2ab2b55 +--- /dev/null ++++ b/cmake/pyproject.toml.in +@@ -0,0 +1,27 @@ ++# Specify sip v5 as the build system for the package. ++[build-system] ++requires = ["PyQt-builder >=1, <2"] ++build-backend = "sipbuild.api" ++ ++[tool.sip] ++project-factory = "pyqtbuild:PyQtProject" ++ ++[tool.sip.builder] ++qmake = "@QMAKE_EXECUTABLE@" ++ ++[tool.sip.project] ++sip-files-dir = "@SIP_FILES_DIR@" ++build-dir = "@SIP_BUILD_DIR@" ++ ++# Specify the PEP 566 metadata for the project. ++[tool.sip.metadata] ++name = "lib@PROJECT_NAME@" ++ ++[tool.sip.bindings.libqt_gui_cpp_sip] ++sip-file = "@SIP_FILE@" ++include-dirs = [@SIP_INCLUDE_DIRS@] ++libraries = [@SIP_LIBARIES@] ++library-dirs = [@SIP_LIBRARY_DIRS@] ++qmake-QT = ["widgets"] ++exceptions = true ++ +diff --git a/cmake/sip_helper.cmake b/cmake/sip_helper.cmake +index c589899..c91e723 100644 +--- a/cmake/sip_helper.cmake ++++ b/cmake/sip_helper.cmake +@@ -15,7 +15,7 @@ execute_process( + if(PYTHON_SIP_EXECUTABLE) + string(STRIP ${PYTHON_SIP_EXECUTABLE} SIP_EXECUTABLE) + else() +- find_program(SIP_EXECUTABLE sip) ++ find_program(SIP_EXECUTABLE NAMES sip sip-build) + endif() + + if(SIP_EXECUTABLE) +@@ -26,6 +26,15 @@ else() + set(sip_helper_NOTFOUND TRUE) + endif() + ++if(sip_helper_FOUND) ++ execute_process( ++ COMMAND ${SIP_EXECUTABLE} -V ++ OUTPUT_VARIABLE SIP_VERSION ++ ERROR_QUIET) ++ string(STRIP ${SIP_VERSION} SIP_VERSION) ++ message(STATUS "SIP binding generator version: ${SIP_VERSION}") ++endif() ++ + # + # Run the SIP generator and compile the generated code into a library. + # +@@ -77,32 +86,89 @@ function(build_sip_binding PROJECT_NAME SIP_FILE) + set(LIBRARY_DIRS ${${PROJECT_NAME}_LIBRARY_DIRS}) + set(LDFLAGS_OTHER ${${PROJECT_NAME}_LDFLAGS_OTHER}) + +- add_custom_command( +- OUTPUT ${SIP_BUILD_DIR}/Makefile +- COMMAND ${Python3_EXECUTABLE} ${sip_SIP_CONFIGURE} ${SIP_BUILD_DIR} ${SIP_FILE} ${sip_LIBRARY_DIR} +- \"${INCLUDE_DIRS}\" \"${LIBRARIES}\" \"${LIBRARY_DIRS}\" \"${LDFLAGS_OTHER}\" +- DEPENDS ${sip_SIP_CONFIGURE} ${SIP_FILE} ${sip_DEPENDS} +- WORKING_DIRECTORY ${sip_SOURCE_DIR} +- COMMENT "Running SIP generator for ${PROJECT_NAME} Python bindings..." +- ) ++ if(${SIP_VERSION} VERSION_GREATER_EQUAL "5.0.0") ++ # Since v5, SIP implements the backend per PEP 517, PEP 518 ++ # Here we synthesize `pyproject.toml` and run `pip install` ++ ++ find_program(QMAKE_EXECUTABLE NAMES qmake REQUIRED) + +- if(NOT EXISTS "${sip_LIBRARY_DIR}") ++ file(REMOVE_RECURSE ${SIP_BUILD_DIR}) + file(MAKE_DIRECTORY ${sip_LIBRARY_DIR}) +- endif() + +- if(WIN32) +- set(MAKE_EXECUTABLE NMake.exe) ++ set(SIP_FILES_DIR ${sip_SOURCE_DIR}) ++ ++ set(SIP_INCLUDE_DIRS "") ++ foreach(_x ${INCLUDE_DIRS}) ++ set(SIP_INCLUDE_DIRS "${SIP_INCLUDE_DIRS},\"${_x}\"") ++ endforeach() ++ string(REGEX REPLACE "^," "" SIP_INCLUDE_DIRS ${SIP_INCLUDE_DIRS}) ++ ++ # SIP expects the libraries WITHOUT the file extension. ++ set(SIP_LIBARIES "") ++ set(SIP_LIBRARY_DIRS "") ++ foreach(_x ${LIBRARIES} ${PYTHON_LIBRARIES}) ++ get_filename_component(_x_NAME "${_x}" NAME_WLE) ++ get_filename_component(_x_DIR "${_x}" DIRECTORY) ++ get_filename_component(_x "${_x_DIR}/${_x_NAME}" ABSOLUTE) ++ STRING(REGEX REPLACE "^lib" "" _x_NAME_NOPREFIX ${_x_NAME}) ++ ++ string(FIND "${_x_NAME_NOPREFIX}" "$= sizeof(atomic_uint_least64_t), + "expected rcl_context_t's instance id storage to be >= size of atomic_uint_least64_t"); + // initialize atomic diff --git a/patch/ros-galactic-rclcpp-lifecycle.patch b/patch/ros-galactic-rclcpp-lifecycle.patch new file mode 100644 index 00000000..824d2eab --- /dev/null +++ b/patch/ros-galactic-rclcpp-lifecycle.patch @@ -0,0 +1,15 @@ +diff --git a/rclcpp_lifecycle/include/rclcpp_lifecycle/node_interfaces/lifecycle_node_interface.hpp b/rclcpp_lifecycle/include/rclcpp_lifecycle/node_interfaces/lifecycle_node_interface.hpp +index 9f2459e296..214a82cc8b 100644 +--- a/rclcpp_lifecycle/include/rclcpp_lifecycle/node_interfaces/lifecycle_node_interface.hpp ++++ b/rclcpp_lifecycle/include/rclcpp_lifecycle/node_interfaces/lifecycle_node_interface.hpp +@@ -22,6 +22,10 @@ + #include "rclcpp_lifecycle/state.hpp" + #include "rclcpp_lifecycle/visibility_control.h" + ++#ifdef ERROR ++#undef ERROR ++#endif ++ + namespace rclcpp_lifecycle + { + namespace node_interfaces diff --git a/patch/ros-galactic-rclpy.patch b/patch/ros-galactic-rclpy.patch new file mode 100644 index 00000000..41b9f4e0 --- /dev/null +++ b/patch/ros-galactic-rclpy.patch @@ -0,0 +1,131 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9d0379d..53302d6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -14,6 +14,8 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") + add_compile_options(-Wall -Wextra) + endif() + ++set(CMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS "-o linker-signed") ++ + find_package(ament_cmake REQUIRED) + find_package(ament_cmake_python REQUIRED) + find_package(rcl REQUIRED) +@@ -25,27 +27,9 @@ find_package(rcutils REQUIRED) + find_package(rmw REQUIRED) + find_package(rmw_implementation_cmake REQUIRED) + +-# Find python before pybind11 +-find_package(python_cmake_module REQUIRED) +-find_package(PythonExtra REQUIRED) +- +-set(_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}") +-if(WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug") +- # Set the python debug interpreter. +- # pybind11 will setup the build for debug now. +- set(PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE_DEBUG}") +-endif() +- +-find_package(pybind11_vendor REQUIRED) ++find_package(Python COMPONENTS Interpreter Development) + find_package(pybind11 REQUIRED) + +-if(WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug") +- # pybind11 logic for setting up a debug build when both a debug and release +- # python interpreter are present in the system seems to be pretty much broken. +- # This works around the issue. +- set(PYTHON_LIBRARIES "${PYTHON_DEBUG_LIBRARIES}") +-endif() +- + function(clean_windows_flags target) + # Hack to avoid pybind11 issue. + # +@@ -109,11 +93,13 @@ endif() + + # Set the build location and install location for a CPython extension + function(configure_build_install_location _library_name) +- # Install into test_rclpy folder in build space for unit tests to import +- set_target_properties(${_library_name} PROPERTIES +- # Use generator expression to avoid prepending a build type specific directory on Windows +- LIBRARY_OUTPUT_DIRECTORY $<1:${CMAKE_CURRENT_BINARY_DIR}/test_rclpy> +- RUNTIME_OUTPUT_DIRECTORY $<1:${CMAKE_CURRENT_BINARY_DIR}/test_rclpy>) ++ if(NOT $ENV{CONDA_BUILD_CROSS_COMPILATION} STREQUAL "1") ++ # Install into test_rclpy folder in build space for unit tests to import ++ set_target_properties(${_library_name} PROPERTIES ++ # Use generator expression to avoid prepending a build type specific directory on Windows ++ LIBRARY_OUTPUT_DIRECTORY $<1:${CMAKE_CURRENT_BINARY_DIR}/test_rclpy> ++ RUNTIME_OUTPUT_DIRECTORY $<1:${CMAKE_CURRENT_BINARY_DIR}/test_rclpy>) ++ endif() + + # Install library for actual use + install(TARGETS ${_library_name} +@@ -128,10 +114,15 @@ add_library(rclpy_common SHARED + ) + target_link_libraries(rclpy_common PUBLIC + pybind11::pybind11 +- ${PYTHON_LIBRARIES} + rcl::rcl + rmw::rmw + ) ++if(NOT APPLE) ++ target_link_libraries(rclpy_common PUBLIC ${Python_LIBRARIES}) ++else() ++ set_target_properties(rclpy_common PROPERTIES ++ LINK_FLAGS "-undefined dynamic_lookup") ++endif() + target_include_directories(rclpy_common PUBLIC + src/rclpy_common/include + ) +@@ -147,7 +138,7 @@ install(TARGETS rclpy_common + ) + + # Split from main extension and converted to pybind11 +-pybind11_add_module(_rclpy_pybind11 SHARED ++add_library(_rclpy_pybind11 MODULE + src/rclpy/_rclpy_action.cpp + src/rclpy/_rclpy_handle.cpp + src/rclpy/_rclpy_logging.cpp +@@ -177,6 +168,10 @@ pybind11_add_module(_rclpy_pybind11 SHARED + src/rclpy/utils.cpp + src/rclpy/wait_set.cpp + ) ++set_target_properties(_rclpy_pybind11 PROPERTIES PREFIX "") ++if(WIN32) ++ set_target_properties(_rclpy_pybind11 PROPERTIES SUFFIX ".pyd") ++endif() + target_include_directories(_rclpy_pybind11 PRIVATE + src/rclpy/ + ) +@@ -187,18 +182,24 @@ target_link_libraries(_rclpy_pybind11 PRIVATE + rclpy_common + rcpputils::rcpputils + rcutils::rcutils ++ pybind11::module + ) + configure_build_install_location(_rclpy_pybind11) + clean_windows_flags(_rclpy_pybind11) + + # Signal handling library +-pybind11_add_module(_rclpy_signal_handler SHARED ++add_library(_rclpy_signal_handler MODULE + src/rclpy/_rclpy_signal_handler.c + ) ++set_target_properties(_rclpy_signal_handler PROPERTIES PREFIX "") ++if(WIN32) ++ set_target_properties(_rclpy_signal_handler PROPERTIES SUFFIX ".pyd") ++endif() + target_link_libraries(_rclpy_signal_handler PRIVATE + rclpy_common + rcl::rcl + rcutils::rcutils ++ pybind11::module + ) + configure_build_install_location(_rclpy_signal_handler) + clean_windows_flags(_rclpy_signal_handler) +@@ -300,6 +301,5 @@ if(BUILD_TESTING) + endforeach() + endif() + endif() +-set(PYTHON_EXECUTABLE "${_PYTHON_EXECUTABLE}") + + ament_package() diff --git a/patch/ros-galactic-rcutils.patch b/patch/ros-galactic-rcutils.patch new file mode 100644 index 00000000..424d7620 --- /dev/null +++ b/patch/ros-galactic-rcutils.patch @@ -0,0 +1,80 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f573c54..4db288b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,13 +3,9 @@ cmake_minimum_required(VERSION 3.5) + project(rcutils) + + # Default to C11 +-if(NOT CMAKE_C_STANDARD) +- set(CMAKE_C_STANDARD 11) +-endif() ++set(CMAKE_C_STANDARD 11) + # Default to C++14 +-if(NOT CMAKE_CXX_STANDARD) +- set(CMAKE_CXX_STANDARD 14) +-endif() ++set(CMAKE_CXX_STANDARD 14) + + include(CheckLibraryExists) + +@@ -131,6 +127,10 @@ endif() + + target_link_libraries(${PROJECT_NAME} ${CMAKE_DL_LIBS}) + ++if (UNIX AND NOT APPLE) ++ target_link_libraries(${PROJECT_NAME} rt) ++endif() ++ + # Needed if pthread is used for thread local storage. + if(IOS AND IOS_SDK_VERSION LESS 10.0) + ament_export_libraries(pthread) +@@ -595,6 +595,9 @@ endif() + ament_export_dependencies(ament_cmake) + ament_export_include_directories(include) + ament_export_libraries(${PROJECT_NAME} ${CMAKE_DL_LIBS}) ++if (UNIX AND NOT APPLE) ++ ament_export_libraries(${PROJECT_NAME} rt) ++endif() + ament_export_targets(${PROJECT_NAME}) + ament_package() + +diff --git a/include/rcutils/error_handling.h b/include/rcutils/error_handling.h +index 0469070..6a05f25 100644 +--- a/include/rcutils/error_handling.h ++++ b/include/rcutils/error_handling.h +@@ -122,7 +122,7 @@ typedef struct rcutils_error_state_t + + // make sure our math is right... + #if __STDC_VERSION__ >= 201112L +-static_assert( ++_Static_assert( + sizeof(rcutils_error_string_t) == ( + RCUTILS_ERROR_STATE_MESSAGE_MAX_LENGTH + + RCUTILS_ERROR_STATE_FILE_MAX_LENGTH + +diff --git a/src/error_handling.c b/src/error_handling.c +index a060537..03e8e2e 100644 +--- a/src/error_handling.c ++++ b/src/error_handling.c +@@ -200,7 +200,7 @@ rcutils_set_error_state( + // Only warn of overwritting if the new error is different from the old ones. + size_t characters_to_compare = strnlen(error_string, RCUTILS_ERROR_MESSAGE_MAX_LENGTH); + // assumption is that message length is <= max error string length +- static_assert( ++ _Static_assert( + sizeof(gtls_rcutils_error_state.message) <= sizeof(gtls_rcutils_error_string.str), + "expected error state's max message length to be less than or equal to error string max"); + if ( +diff --git a/src/error_handling_helpers.h b/src/error_handling_helpers.h +index 70acb4e..67ebfc0 100644 +--- a/src/error_handling_helpers.h ++++ b/src/error_handling_helpers.h +@@ -145,7 +145,7 @@ __rcutils_format_error_string( + static const char format_1[] = ", at "; + static const char format_2[] = ":"; + char line_number_buffer[21]; +- static_assert( ++ _Static_assert( + sizeof(error_string->str) == ( + sizeof(error_state->message) + + sizeof(format_1) - 1 /* minus the null-term */ + diff --git a/patch/ros-galactic-rmw-implementation.patch b/patch/ros-galactic-rmw-implementation.patch new file mode 100644 index 00000000..76072425 --- /dev/null +++ b/patch/ros-galactic-rmw-implementation.patch @@ -0,0 +1,18 @@ +diff --git a/rmw_implementation-extras.cmake.in b/rmw_implementation-extras.cmake.in +index 7f89a49..3b9b1c5 100644 +--- a/rmw_implementation-extras.cmake.in ++++ b/rmw_implementation-extras.cmake.in +@@ -54,5 +54,13 @@ else() + # since this code is already part of a find_package call of that package + endif() + ++IF(APPLE) ++ set(CMAKE_THREAD_LIBS_INIT "-lpthread") ++ set(CMAKE_HAVE_THREADS_LIBRARY 1) ++ set(CMAKE_USE_WIN32_THREADS_INIT 0) ++ set(CMAKE_USE_PTHREADS_INIT 1) ++ set(THREADS_PREFER_PTHREAD_FLAG ON) ++ENDIF() ++ + find_package(Threads REQUIRED) + list(APPEND rmw_implementation_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}") diff --git a/patch/ros-galactic-robot-localization.patch b/patch/ros-galactic-robot-localization.patch new file mode 100644 index 00000000..6096aaa0 --- /dev/null +++ b/patch/ros-galactic-robot-localization.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b49b9c8..7bffbd0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.5) + project(robot_localization) + + if(NOT WIN32) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") + endif() + + if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") +@@ -35,7 +35,7 @@ find_package(yaml_cpp_vendor REQUIRED) + + # Geographiclib installs FindGeographicLib.cmake to this non-standard location + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "/usr/share/cmake/geographiclib/") +-find_package(GeographicLib REQUIRED COMPONENTS STATIC) ++find_package(GeographicLib REQUIRED) + + set(library_name rl_lib) + diff --git a/patch/ros-galactic-ros-ign-gazebo.patch b/patch/ros-galactic-ros-ign-gazebo.patch new file mode 100644 index 00000000..1c57e7b8 --- /dev/null +++ b/patch/ros-galactic-ros-ign-gazebo.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8e2d4e7..85d2244 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -13,6 +13,7 @@ endif() + find_package(ament_cmake REQUIRED) + find_package(ignition-math6 REQUIRED) + find_package(rclcpp REQUIRED) ++find_package(std_msgs REQUIRED) + + # Citadel + if("$ENV{IGNITION_VERSION}" STREQUAL "citadel") +@@ -60,6 +61,7 @@ add_executable(create src/create.cpp) + ament_target_dependencies(create + rclcpp + ignition-math6 ++ std_msgs + ) + target_link_libraries(create + gflags +diff --git a/package.xml b/package.xml +index 0d22162..f99dbeb 100644 +--- a/package.xml ++++ b/package.xml +@@ -16,7 +16,7 @@ + libgflags-dev + rclcpp + ignition-math6 +- ++ std_msgs + + ignition-gazebo6 + diff --git a/patch/ros-galactic-ros-workspace.patch b/patch/ros-galactic-ros-workspace.patch new file mode 100644 index 00000000..8fa5cf5f --- /dev/null +++ b/patch/ros-galactic-ros-workspace.patch @@ -0,0 +1,60 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 99c9e2d..e581f48 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,7 +4,7 @@ project(ros_workspace NONE) + find_package(ament_cmake_core REQUIRED) + + # Collect current python 3 version +-execute_process(COMMAND python3 -c "from distutils import sysconfig; print(sysconfig.get_python_version())" OUTPUT_VARIABLE PYTHON_MAJOR_MINOR OUTPUT_STRIP_TRAILING_WHITESPACE) ++execute_process(COMMAND python -c "from distutils import sysconfig; print(sysconfig.get_python_version())" OUTPUT_VARIABLE PYTHON_MAJOR_MINOR OUTPUT_STRIP_TRAILING_WHITESPACE) + + # Locate ament_package template files. + if(WIN32) +@@ -15,6 +15,16 @@ else() + set(SHELL_EXT "sh") + endif() + set(AMENT_PACKAGE_DIR "${CMAKE_INSTALL_PREFIX}/${PYTHON_INSTALL_DIR}/ament_package") ++if(NOT EXISTS "${AMENT_PACKAGE_DIR}" OR "$ENV{CONDA_BUILD_CROSS_COMPILATION}" EQUAL "1") ++ execute_process( ++ COMMAND python -c "import site; print(site.getsitepackages()[-1])" ++ OUTPUT_VARIABLE _PYTHON_SYSPREFIX ++ OUTPUT_STRIP_TRAILING_WHITESPACE ++ ) ++ message(WARNING "Could not find '${AMENT_PACKAGE_DIR}', now try '${_PYTHON_SYSPREFIX}/ament_package' instead.") ++ set(AMENT_PACKAGE_DIR "${_PYTHON_SYSPREFIX}/ament_package") ++endif() ++ + if(NOT EXISTS "${AMENT_PACKAGE_DIR}") + # Check for an .egg-link file and use the listed directory if it exists + get_filename_component(AMENT_PACKAGE_EGG_LINK "${AMENT_PACKAGE_DIR}" DIRECTORY) +@@ -39,28 +39,7 @@ set( + "prepend-non-duplicate;PYTHONPATH;${PYTHON_INSTALL_DIR}") + + # Set environment hooks for default environment. +-if(WIN32) +- ament_environment_hooks("${BINARY_PATH_HOOK}" "${PYTHONPATH_HOOK}") +-else() +- set(LIBRARY_PATH_HOOK "${AMENT_PACKAGE_TEMPLATE_DIR}/environment_hook/library_path.${SHELL_EXT}") +- # enable C language so that a trycompile can determine what the +- # anticipated libdir will be. +- enable_language(C) +- include(GNUInstallDirs) +- if(NOT ${CMAKE_INSTALL_LIBDIR} STREQUAL "lib") +- # register multiarch information for .dsv generation +- if(APPLE) +- set(LIBRARY_PATH_ENV_VAR "DYLD_LIBRARY_PATH") +- else() +- set(LIBRARY_PATH_ENV_VAR "LD_LIBRARY_PATH") +- endif() +- set( +- AMENT_CMAKE_ENVIRONMENT_HOOKS_DESC_multiarch_library_paths +- "prepend-non-duplicate;${LIBRARY_PATH_ENV_VAR};${CMAKE_INSTALL_LIBDIR}") +- set(MULTIARCH_LIBRARY_PATH_HOOK "env-hooks/multiarch_library_paths.sh.in") +- endif() +- ament_environment_hooks("${BINARY_PATH_HOOK}" "${LIBRARY_PATH_HOOK}" "${PYTHONPATH_HOOK}" ${MULTIARCH_LIBRARY_PATH_HOOK}) +-endif() ++ament_environment_hooks("${BINARY_PATH_HOOK}" "${PYTHONPATH_HOOK}") + + # skip using ament_index/resource_index/parent_prefix_path + # if for Debian packages it is known that there are no underlays diff --git a/patch/ros-galactic-ros2-socketcan.patch b/patch/ros-galactic-ros2-socketcan.patch new file mode 100644 index 00000000..28c0eda6 --- /dev/null +++ b/patch/ros-galactic-ros2-socketcan.patch @@ -0,0 +1,13 @@ +diff --git a/src/socket_can_id.cpp b/src/socket_can_id.cpp +index 75f85ca..816f477 100644 +--- a/src/socket_can_id.cpp ++++ b/src/socket_can_id.cpp +@@ -14,6 +14,8 @@ + // + // Co-developed by Tier IV, Inc. and Apex.AI, Inc. + ++ ++#include + #include // for CAN typedef so I can static_assert it + + #include diff --git a/patch/ros-galactic-rosbag2-py.patch b/patch/ros-galactic-rosbag2-py.patch new file mode 100644 index 00000000..132d966e --- /dev/null +++ b/patch/ros-galactic-rosbag2-py.patch @@ -0,0 +1,112 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a5284cad..8f925de2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -68,7 +68,7 @@ endfunction() + + ament_python_install_package(${PROJECT_NAME}) + +-pybind11_add_module(_reader SHARED ++add_library(_reader MODULE + src/rosbag2_py/_reader.cpp + ) + ament_target_dependencies(_reader PUBLIC +@@ -77,8 +77,15 @@ ament_target_dependencies(_reader PUBLIC + "rosbag2_storage" + ) + clean_windows_flags(_reader) ++set_target_properties(_reader PROPERTIES PREFIX "") ++if(WIN32) ++ set_target_properties(_reader PROPERTIES SUFFIX ".pyd") ++endif() ++target_link_libraries(_reader PRIVATE ++ pybind11::module ++) + +-pybind11_add_module(_storage SHARED ++add_library(_storage MODULE + src/rosbag2_py/_storage.cpp + src/rosbag2_py/format_bag_metadata.cpp + ) +@@ -87,8 +91,15 @@ ament_target_dependencies(_storage PUBLIC + "rosbag2_storage" + ) + clean_windows_flags(_storage) ++set_target_properties(_storage PROPERTIES PREFIX "") ++if(WIN32) ++ set_target_properties(_storage PROPERTIES SUFFIX ".pyd") ++endif() ++target_link_libraries(_storage PRIVATE ++ pybind11::module ++) + +-pybind11_add_module(_writer SHARED ++add_library(_writer MODULE + src/rosbag2_py/_writer.cpp + ) + ament_target_dependencies(_writer PUBLIC +@@ -97,8 +105,15 @@ ament_target_dependencies(_writer PUBLIC + "rosbag2_storage" + ) + clean_windows_flags(_writer) ++set_target_properties(_writer PROPERTIES PREFIX "") ++if(WIN32) ++ set_target_properties(_writer PROPERTIES SUFFIX ".pyd") ++endif() ++target_link_libraries(_writer PRIVATE ++ pybind11::module ++) + +-pybind11_add_module(_info SHARED ++add_library(_info MODULE + src/rosbag2_py/_info.cpp + ) + ament_target_dependencies(_info PUBLIC +@@ -106,8 +118,15 @@ ament_target_dependencies(_info PUBLIC + "rosbag2_storage" + ) + clean_windows_flags(_info) ++set_target_properties(_info PROPERTIES PREFIX "") ++if(WIN32) ++ set_target_properties(_info PROPERTIES SUFFIX ".pyd") ++endif() ++target_link_libraries(_info PRIVATE ++ pybind11::module ++) + +-pybind11_add_module(_transport SHARED ++add_library(_transport MODULE + src/rosbag2_py/_transport.cpp + ) + ament_target_dependencies(_transport PUBLIC +@@ -117,8 +133,15 @@ ament_target_dependencies(_transport PUBLIC + "rosbag2_transport" + ) + clean_windows_flags(_transport) ++set_target_properties(_transport PROPERTIES PREFIX "") ++if(WIN32) ++ set_target_properties(_transport PROPERTIES SUFFIX ".pyd") ++endif() ++target_link_libraries(_transport PRIVATE ++ pybind11::module ++) + +-pybind11_add_module(_reindexer SHARED ++add_library(_reindexer MODULE + src/rosbag2_py/_reindexer.cpp + ) + ament_target_dependencies(_reindexer PUBLIC +@@ -126,6 +146,13 @@ ament_target_dependencies(_reindexer PUBLIC + "rosbag2_storage" + ) + clean_windows_flags(_reindexer) ++set_target_properties(_reindexer PROPERTIES PREFIX "") ++if(WIN32) ++ set_target_properties(_reindexer PROPERTIES SUFFIX ".pyd") ++endif() ++target_link_libraries(_reindexer PRIVATE ++ pybind11::module ++) + + # Install cython modules as sub-modules of the project + install( diff --git a/patch/ros-galactic-rosidl-generator-c.patch b/patch/ros-galactic-rosidl-generator-c.patch new file mode 100644 index 00000000..b9728725 --- /dev/null +++ b/patch/ros-galactic-rosidl-generator-c.patch @@ -0,0 +1,12 @@ +diff --git a/rosidl_generator_c/rosidl_generator_c-extras.cmake.in b/rosidl_generator_c/rosidl_generator_c-extras.cmake.in +index 48ff0d8f..b6e2b507 100644 +--- a/rosidl_generator_c/rosidl_generator_c-extras.cmake.in ++++ b/rosidl_generator_c/rosidl_generator_c-extras.cmake.in +@@ -6,6 +6,6 @@ set(rosidl_generator_c_LIBRARY_TYPE "@rosidl_generator_c_LIBRARY_TYPE@") + include("${CMAKE_CURRENT_LIST_DIR}/register_c.cmake") + rosidl_generator_c_extras( + "${rosidl_generator_c_DIR}/../../../lib/rosidl_generator_c/rosidl_generator_c" +- "${rosidl_generator_c_DIR}/../../../@PYTHON_INSTALL_DIR@/rosidl_generator_c/__init__.py" ++ "@PYTHON_INSTALL_DIR@/rosidl_generator_c/__init__.py" + "${rosidl_generator_c_DIR}/../resource" + ) diff --git a/patch/ros-galactic-rosidl-generator-cpp.patch b/patch/ros-galactic-rosidl-generator-cpp.patch new file mode 100644 index 00000000..8cc6328c --- /dev/null +++ b/patch/ros-galactic-rosidl-generator-cpp.patch @@ -0,0 +1,12 @@ +diff --git a/rosidl_generator_cpp/rosidl_generator_cpp-extras.cmake.in b/rosidl_generator_cpp/rosidl_generator_cpp-extras.cmake.in +index 703ced5e..8007dcac 100644 +--- a/rosidl_generator_cpp/rosidl_generator_cpp-extras.cmake.in ++++ b/rosidl_generator_cpp/rosidl_generator_cpp-extras.cmake.in +@@ -3,6 +3,6 @@ + include("${CMAKE_CURRENT_LIST_DIR}/register_cpp.cmake") + rosidl_generator_cpp_extras( + "${rosidl_generator_cpp_DIR}/../../../lib/rosidl_generator_cpp/rosidl_generator_cpp" +- "${rosidl_generator_cpp_DIR}/../../../@PYTHON_INSTALL_DIR@/rosidl_generator_cpp/__init__.py" ++ "@PYTHON_INSTALL_DIR@/rosidl_generator_cpp/__init__.py" + "${rosidl_generator_cpp_DIR}/../resource" + ) diff --git a/patch/ros-galactic-rosidl-generator-dds-idl.patch b/patch/ros-galactic-rosidl-generator-dds-idl.patch new file mode 100644 index 00000000..6b1afad1 --- /dev/null +++ b/patch/ros-galactic-rosidl-generator-dds-idl.patch @@ -0,0 +1,13 @@ +diff --git a/rosidl_generator_dds_idl/rosidl_generator_dds_idl-extras.cmake.in b/rosidl_generator_dds_idl/rosidl_generator_dds_idl-extras.cmake.in +index 4db2e71..15d04f4 100644 +--- a/rosidl_generator_dds_idl/rosidl_generator_dds_idl-extras.cmake.in ++++ b/rosidl_generator_dds_idl/rosidl_generator_dds_idl-extras.cmake.in +@@ -9,7 +9,7 @@ normalize_path(rosidl_generator_dds_idl_BIN + "${rosidl_generator_dds_idl_BIN}") + + set(rosidl_generator_dds_idl_GENERATOR_FILES +- "${rosidl_generator_dds_idl_DIR}/../../../@PYTHON_INSTALL_DIR@/rosidl_generator_dds_idl/__init__.py") ++ "@PYTHON_INSTALL_DIR@/rosidl_generator_dds_idl/__init__.py") + normalize_path(rosidl_generator_dds_idl_GENERATOR_FILES + "${rosidl_generator_dds_idl_GENERATOR_FILES}") + diff --git a/patch/ros-galactic-rosidl-generator-py.patch b/patch/ros-galactic-rosidl-generator-py.patch new file mode 100644 index 00000000..877db26a --- /dev/null +++ b/patch/ros-galactic-rosidl-generator-py.patch @@ -0,0 +1,110 @@ +diff --git a/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake b/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake +index 4af35d6..8db124a 100644 +--- a/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake ++++ b/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake +@@ -17,7 +17,7 @@ find_package(rosidl_runtime_c REQUIRED) + find_package(rosidl_typesupport_c REQUIRED) + find_package(rosidl_typesupport_interface REQUIRED) + +-find_package(PythonInterp 3.5 REQUIRED) ++find_package(Python3 REQUIRED COMPONENTS Interpreter NumPy) + + find_package(python_cmake_module REQUIRED) + find_package(PythonExtra MODULE REQUIRED) +@@ -126,10 +126,8 @@ endif() + + set(_target_suffix "__py") + ++set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) + set(_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE}) +-if(WIN32 AND "${CMAKE_BUILD_TYPE}" STREQUAL "Debug") +- set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE_DEBUG}) +-endif() + + # move custom command into a subdirectory to avoid multiple invocations on Windows + set(_subdir "${CMAKE_CURRENT_BINARY_DIR}/${rosidl_generate_interfaces_TARGET}${_target_suffix}") +@@ -169,10 +169,17 @@ add_dependencies( + ${rosidl_generate_interfaces_TARGET}__rosidl_typesupport_c + ) + +-target_link_libraries( +- ${_target_name_lib} +- ${PythonExtra_LIBRARIES} +-) ++ ++if(NOT APPLE) ++ target_link_libraries( ++ ${_target_name_lib} ++ ${PythonExtra_LIBRARIES} ++ ) ++else() ++ set_target_properties(${_target_name_lib} PROPERTIES ++ LINK_FLAGS "-undefined dynamic_lookup") ++endif() ++ + target_include_directories(${_target_name_lib} + PUBLIC + ${CMAKE_CURRENT_BINARY_DIR}/rosidl_generator_c +@@ -180,31 +178,9 @@ target_include_directories(${_target_name_lib} + ${PythonExtra_INCLUDE_DIRS} + ) + +-# Check if numpy is in the include path +-find_file(_numpy_h numpy/numpyconfig.h +- PATHS ${PythonExtra_INCLUDE_DIRS} +-) + +-if(APPLE OR WIN32 OR NOT _numpy_h) +- # add include directory for numpy headers +- set(_python_code +- "import numpy" +- "print(numpy.get_include())" +- ) +- execute_process( +- COMMAND "${PYTHON_EXECUTABLE}" "-c" "${_python_code}" +- OUTPUT_VARIABLE _output +- RESULT_VARIABLE _result +- OUTPUT_STRIP_TRAILING_WHITESPACE +- ) +- if(NOT _result EQUAL 0) +- message(FATAL_ERROR +- "execute_process(${PYTHON_EXECUTABLE} -c '${_python_code}') returned " +- "error code ${_result}") +- endif() +- message(STATUS "Using numpy include directory: ${_output}") +- target_include_directories(${_target_name_lib} PUBLIC "${_output}") +-endif() ++message(STATUS "Using numpy include directory: ${Python3_NumPy_INCLUDE_DIRS}") ++target_include_directories(${_target_name_lib} PUBLIC "${Python3_NumPy_INCLUDE_DIRS}") + + rosidl_target_interfaces(${_target_name_lib} + ${rosidl_generate_interfaces_TARGET} rosidl_typesupport_c) +@@ -255,9 +261,15 @@ foreach(_typesupport_impl ${_typesupport_impls}) + target_link_libraries( + ${_target_name} + ${_target_name_lib} +- ${PythonExtra_LIBRARIES} + ${rosidl_generate_interfaces_TARGET}__${_typesupport_impl} + ) ++ ++ if(NOT APPLE) ++ target_link_libraries(${_target_name} ${PythonExtra_LIBRARIES}) ++ else() ++ set_target_properties(${_target_name} PROPERTIES ++ LINK_FLAGS "-undefined dynamic_lookup") ++ endif() + + target_include_directories(${_target_name} + PUBLIC +diff --git a/rosidl_generator_py/rosidl_generator_py-extras.cmake.in b/rosidl_generator_py/rosidl_generator_py-extras.cmake.in +index 80bed29..ba70acc 100644 +--- a/rosidl_generator_py/rosidl_generator_py-extras.cmake.in ++++ b/rosidl_generator_py/rosidl_generator_py-extras.cmake.in +@@ -2,6 +2,6 @@ + include("${CMAKE_CURRENT_LIST_DIR}/register_py.cmake") + rosidl_generator_py_extras( + "${rosidl_generator_py_DIR}/../../../lib/rosidl_generator_py/rosidl_generator_py" +- "${rosidl_generator_py_DIR}/../../../@PYTHON_INSTALL_DIR@/rosidl_generator_py/__init__.py;${rosidl_generator_py_DIR}/../../../@PYTHON_INSTALL_DIR@/rosidl_generator_py/generate_py_impl.py" ++ "@PYTHON_INSTALL_DIR@/rosidl_generator_py/__init__.py;@PYTHON_INSTALL_DIR@/rosidl_generator_py/generate_py_impl.py" + "${rosidl_generator_py_DIR}/../resource" + ) diff --git a/patch/ros-galactic-rosidl-typesupport-c.patch b/patch/ros-galactic-rosidl-typesupport-c.patch new file mode 100644 index 00000000..95c11e82 --- /dev/null +++ b/patch/ros-galactic-rosidl-typesupport-c.patch @@ -0,0 +1,13 @@ +diff --git a/rosidl_typesupport_c/rosidl_typesupport_c-extras.cmake.in b/rosidl_typesupport_c/rosidl_typesupport_c-extras.cmake.in +index 8afe385..154b63f 100644 +--- a/rosidl_typesupport_c/rosidl_typesupport_c-extras.cmake.in ++++ b/rosidl_typesupport_c/rosidl_typesupport_c-extras.cmake.in +@@ -25,7 +25,7 @@ normalize_path(rosidl_typesupport_c_BIN + "${rosidl_typesupport_c_BIN}") + + set(rosidl_typesupport_c_GENERATOR_FILES +- "${rosidl_typesupport_c_DIR}/../../../@PYTHON_INSTALL_DIR@/rosidl_typesupport_c/__init__.py") ++ "@PYTHON_INSTALL_DIR@/rosidl_typesupport_c/__init__.py") + normalize_path(rosidl_typesupport_c_GENERATOR_FILES + "${rosidl_typesupport_c_GENERATOR_FILES}") + diff --git a/patch/ros-galactic-rosidl-typesupport-connext-c.patch b/patch/ros-galactic-rosidl-typesupport-connext-c.patch new file mode 100644 index 00000000..bbf6f143 --- /dev/null +++ b/patch/ros-galactic-rosidl-typesupport-connext-c.patch @@ -0,0 +1,13 @@ +diff --git a/rosidl_typesupport_connext_c/rosidl_typesupport_connext_c-extras.cmake.in b/rosidl_typesupport_connext_c/rosidl_typesupport_connext_c-extras.cmake.in +index 510e1d4..6770f33 100644 +--- a/rosidl_typesupport_connext_c/rosidl_typesupport_connext_c-extras.cmake.in ++++ b/rosidl_typesupport_connext_c/rosidl_typesupport_connext_c-extras.cmake.in +@@ -19,7 +19,7 @@ else() + "${rosidl_typesupport_connext_c_BIN}") + + set(rosidl_typesupport_connext_c_GENERATOR_FILES +- "${rosidl_typesupport_connext_c_DIR}/../../../@PYTHON_INSTALL_DIR@/rosidl_typesupport_connext_c/__init__.py") ++ "@PYTHON_INSTALL_DIR@/rosidl_typesupport_connext_c/__init__.py") + normalize_path(rosidl_typesupport_connext_c_GENERATOR_FILES + "${rosidl_typesupport_connext_c_GENERATOR_FILES}") + diff --git a/patch/ros-galactic-rosidl-typesupport-connext-cpp.patch b/patch/ros-galactic-rosidl-typesupport-connext-cpp.patch new file mode 100644 index 00000000..31ad675e --- /dev/null +++ b/patch/ros-galactic-rosidl-typesupport-connext-cpp.patch @@ -0,0 +1,13 @@ +diff --git a/rosidl_typesupport_connext_cpp/rosidl_typesupport_connext_cpp-extras.cmake.in b/rosidl_typesupport_connext_cpp/rosidl_typesupport_connext_cpp-extras.cmake.in +index 5deef97..3cd5d2e 100644 +--- a/rosidl_typesupport_connext_cpp/rosidl_typesupport_connext_cpp-extras.cmake.in ++++ b/rosidl_typesupport_connext_cpp/rosidl_typesupport_connext_cpp-extras.cmake.in +@@ -19,7 +19,7 @@ else() + "${rosidl_typesupport_connext_cpp_BIN}") + + set(rosidl_typesupport_connext_cpp_GENERATOR_FILES +- "${rosidl_typesupport_connext_cpp_DIR}/../../../@PYTHON_INSTALL_DIR@/rosidl_typesupport_connext_cpp/__init__.py") ++ "@PYTHON_INSTALL_DIR@/rosidl_typesupport_connext_cpp/__init__.py") + normalize_path(rosidl_typesupport_connext_cpp_GENERATOR_FILES + "${rosidl_typesupport_connext_cpp_GENERATOR_FILES}") + diff --git a/patch/ros-galactic-rosidl-typesupport-cpp.patch b/patch/ros-galactic-rosidl-typesupport-cpp.patch new file mode 100644 index 00000000..a75af4d6 --- /dev/null +++ b/patch/ros-galactic-rosidl-typesupport-cpp.patch @@ -0,0 +1,13 @@ +diff --git a/rosidl_typesupport_cpp/rosidl_typesupport_cpp-extras.cmake.in b/rosidl_typesupport_cpp/rosidl_typesupport_cpp-extras.cmake.in +index 50609ce..0a0ddc6 100644 +--- a/rosidl_typesupport_cpp/rosidl_typesupport_cpp-extras.cmake.in ++++ b/rosidl_typesupport_cpp/rosidl_typesupport_cpp-extras.cmake.in +@@ -25,7 +25,7 @@ normalize_path(rosidl_typesupport_cpp_BIN + "${rosidl_typesupport_cpp_BIN}") + + set(rosidl_typesupport_cpp_GENERATOR_FILES +- "${rosidl_typesupport_cpp_DIR}/../../../@PYTHON_INSTALL_DIR@/rosidl_typesupport_cpp/__init__.py") ++ "@PYTHON_INSTALL_DIR@/rosidl_typesupport_cpp/__init__.py") + normalize_path(rosidl_typesupport_cpp_GENERATOR_FILES + "${rosidl_typesupport_cpp_GENERATOR_FILES}") + diff --git a/patch/ros-galactic-rosidl-typesupport-fastrtps-c.patch b/patch/ros-galactic-rosidl-typesupport-fastrtps-c.patch new file mode 100644 index 00000000..4f4794ec --- /dev/null +++ b/patch/ros-galactic-rosidl-typesupport-fastrtps-c.patch @@ -0,0 +1,13 @@ +diff --git a/rosidl_typesupport_fastrtps_c/rosidl_typesupport_fastrtps_c-extras.cmake.in b/rosidl_typesupport_fastrtps_c/rosidl_typesupport_fastrtps_c-extras.cmake.in +index f23e9d0..cc19345 100644 +--- a/rosidl_typesupport_fastrtps_c/rosidl_typesupport_fastrtps_c-extras.cmake.in ++++ b/rosidl_typesupport_fastrtps_c/rosidl_typesupport_fastrtps_c-extras.cmake.in +@@ -21,7 +21,7 @@ else() + "${rosidl_typesupport_fastrtps_c_BIN}") + + set(rosidl_typesupport_fastrtps_c_GENERATOR_FILES +- "${rosidl_typesupport_fastrtps_c_DIR}/../../../@PYTHON_INSTALL_DIR@/rosidl_typesupport_fastrtps_c/__init__.py") ++ "@PYTHON_INSTALL_DIR@/rosidl_typesupport_fastrtps_c/__init__.py") + normalize_path(rosidl_typesupport_fastrtps_c_GENERATOR_FILES + "${rosidl_typesupport_fastrtps_c_GENERATOR_FILES}") + diff --git a/patch/ros-galactic-rosidl-typesupport-fastrtps-cpp.patch b/patch/ros-galactic-rosidl-typesupport-fastrtps-cpp.patch new file mode 100644 index 00000000..74c260aa --- /dev/null +++ b/patch/ros-galactic-rosidl-typesupport-fastrtps-cpp.patch @@ -0,0 +1,13 @@ +diff --git a/rosidl_typesupport_fastrtps_cpp/rosidl_typesupport_fastrtps_cpp-extras.cmake.in b/rosidl_typesupport_fastrtps_cpp/rosidl_typesupport_fastrtps_cpp-extras.cmake.in +index 0dd5b22..67f17fd 100644 +--- a/rosidl_typesupport_fastrtps_cpp/rosidl_typesupport_fastrtps_cpp-extras.cmake.in ++++ b/rosidl_typesupport_fastrtps_cpp/rosidl_typesupport_fastrtps_cpp-extras.cmake.in +@@ -22,7 +22,7 @@ else() + "${rosidl_typesupport_fastrtps_cpp_BIN}") + + set(rosidl_typesupport_fastrtps_cpp_GENERATOR_FILES +- "${rosidl_typesupport_fastrtps_cpp_DIR}/../../../@PYTHON_INSTALL_DIR@/rosidl_typesupport_fastrtps_cpp/__init__.py") ++ "@PYTHON_INSTALL_DIR@/rosidl_typesupport_fastrtps_cpp/__init__.py") + normalize_path(rosidl_typesupport_fastrtps_cpp_GENERATOR_FILES + "${rosidl_typesupport_fastrtps_cpp_GENERATOR_FILES}") + diff --git a/patch/ros-galactic-rosidl-typesupport-gurumdds-c.patch b/patch/ros-galactic-rosidl-typesupport-gurumdds-c.patch new file mode 100644 index 00000000..6897827d --- /dev/null +++ b/patch/ros-galactic-rosidl-typesupport-gurumdds-c.patch @@ -0,0 +1,13 @@ +diff --git a/rosidl_typesupport_gurumdds_c/rosidl_typesupport_gurumdds_c-extras.cmake.in b/rosidl_typesupport_gurumdds_c/rosidl_typesupport_gurumdds_c-extras.cmake.in +index 1c8a3dc..3a69e87 100644 +--- a/rosidl_typesupport_gurumdds_c/rosidl_typesupport_gurumdds_c-extras.cmake.in ++++ b/rosidl_typesupport_gurumdds_c/rosidl_typesupport_gurumdds_c-extras.cmake.in +@@ -19,7 +19,7 @@ else() + "${rosidl_typesupport_gurumdds_c_BIN}") + + set(rosidl_typesupport_gurumdds_c_GENERATOR_FILES +- "${rosidl_typesupport_gurumdds_c_DIR}/../../../@PYTHON_INSTALL_DIR@/rosidl_typesupport_gurumdds_c/__init__.py") ++ "@PYTHON_INSTALL_DIR@/rosidl_typesupport_gurumdds_c/__init__.py") + normalize_path(rosidl_typesupport_gurumdds_c_GENERATOR_FILES + "${rosidl_typesupport_gurumdds_c_GENERATOR_FILES}") + diff --git a/patch/ros-galactic-rosidl-typesupport-gurumdds-cpp.patch b/patch/ros-galactic-rosidl-typesupport-gurumdds-cpp.patch new file mode 100644 index 00000000..cb034e0b --- /dev/null +++ b/patch/ros-galactic-rosidl-typesupport-gurumdds-cpp.patch @@ -0,0 +1,13 @@ +diff --git a/rosidl_typesupport_gurumdds_cpp/rosidl_typesupport_gurumdds_cpp-extras.cmake.in b/rosidl_typesupport_gurumdds_cpp/rosidl_typesupport_gurumdds_cpp-extras.cmake.in +index 2c7a381..60b85df 100644 +--- a/rosidl_typesupport_gurumdds_cpp/rosidl_typesupport_gurumdds_cpp-extras.cmake.in ++++ b/rosidl_typesupport_gurumdds_cpp/rosidl_typesupport_gurumdds_cpp-extras.cmake.in +@@ -15,7 +15,7 @@ else() + "${rosidl_typesupport_gurumdds_cpp_BIN}") + + set(rosidl_typesupport_gurumdds_cpp_GENERATOR_FILES +- "${rosidl_typesupport_gurumdds_cpp_DIR}/../../../@PYTHON_INSTALL_DIR@/rosidl_typesupport_gurumdds_cpp/__init__.py") ++ "@PYTHON_INSTALL_DIR@/rosidl_typesupport_gurumdds_cpp/__init__.py") + normalize_path(rosidl_typesupport_gurumdds_GENERATOR_FILES + "${rosidl_typesupport_gurumdds_cpp_GENERATOR_FILES}") + diff --git a/patch/ros-galactic-rosidl-typesupport-introspection-c.patch b/patch/ros-galactic-rosidl-typesupport-introspection-c.patch new file mode 100644 index 00000000..bb06de44 --- /dev/null +++ b/patch/ros-galactic-rosidl-typesupport-introspection-c.patch @@ -0,0 +1,13 @@ +diff --git a/rosidl_typesupport_introspection_c/rosidl_typesupport_introspection_c-extras.cmake.in b/rosidl_typesupport_introspection_c/rosidl_typesupport_introspection_c-extras.cmake.in +index 004a1e62..ee3c19ab 100644 +--- a/rosidl_typesupport_introspection_c/rosidl_typesupport_introspection_c-extras.cmake.in ++++ b/rosidl_typesupport_introspection_c/rosidl_typesupport_introspection_c-extras.cmake.in +@@ -21,7 +21,7 @@ normalize_path(rosidl_typesupport_introspection_c_BIN + "${rosidl_typesupport_introspection_c_BIN}") + + set(rosidl_typesupport_introspection_c_GENERATOR_FILES +- "${rosidl_typesupport_introspection_c_DIR}/../../../@PYTHON_INSTALL_DIR@/rosidl_typesupport_introspection_c/__init__.py") ++ "@PYTHON_INSTALL_DIR@/rosidl_typesupport_introspection_c/__init__.py") + normalize_path(rosidl_typesupport_introspection_c_GENERATOR_FILES + "${rosidl_typesupport_introspection_c_GENERATOR_FILES}") + diff --git a/patch/ros-galactic-rosidl-typesupport-introspection-cpp.patch b/patch/ros-galactic-rosidl-typesupport-introspection-cpp.patch new file mode 100644 index 00000000..07f3d5ef --- /dev/null +++ b/patch/ros-galactic-rosidl-typesupport-introspection-cpp.patch @@ -0,0 +1,13 @@ +diff --git a/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp-extras.cmake.in b/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp-extras.cmake.in +index c90641b9..f1d02b9d 100644 +--- a/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp-extras.cmake.in ++++ b/rosidl_typesupport_introspection_cpp/rosidl_typesupport_introspection_cpp-extras.cmake.in +@@ -21,7 +21,7 @@ normalize_path(rosidl_typesupport_introspection_cpp_BIN + "${rosidl_typesupport_introspection_cpp_BIN}") + + set(rosidl_typesupport_introspection_cpp_GENERATOR_FILES +- "${rosidl_typesupport_introspection_cpp_DIR}/../../../@PYTHON_INSTALL_DIR@/rosidl_typesupport_introspection_cpp/__init__.py") ++ "@PYTHON_INSTALL_DIR@/rosidl_typesupport_introspection_cpp/__init__.py") + normalize_path(rosidl_typesupport_introspection_cpp_GENERATOR_FILES + "${rosidl_typesupport_introspection_cpp_GENERATOR_FILES}") + diff --git a/patch/ros-galactic-rosidl-typesupport-opensplice-c.patch b/patch/ros-galactic-rosidl-typesupport-opensplice-c.patch new file mode 100644 index 00000000..b486b296 --- /dev/null +++ b/patch/ros-galactic-rosidl-typesupport-opensplice-c.patch @@ -0,0 +1,13 @@ +diff --git a/rosidl_typesupport_opensplice_c/rosidl_typesupport_opensplice_c-extras.cmake.in b/rosidl_typesupport_opensplice_c/rosidl_typesupport_opensplice_c-extras.cmake.in +index 4a57f4b..22673b5 100644 +--- a/rosidl_typesupport_opensplice_c/rosidl_typesupport_opensplice_c-extras.cmake.in ++++ b/rosidl_typesupport_opensplice_c/rosidl_typesupport_opensplice_c-extras.cmake.in +@@ -21,7 +21,7 @@ else() + "${rosidl_typesupport_opensplice_c_BIN}") + + set(rosidl_typesupport_opensplice_c_GENERATOR_FILES +- "${rosidl_typesupport_opensplice_c_DIR}/../../../@PYTHON_INSTALL_DIR@/rosidl_typesupport_opensplice_c/__init__.py") ++ "@PYTHON_INSTALL_DIR@/rosidl_typesupport_opensplice_c/__init__.py") + normalize_path(rosidl_typesupport_opensplice_c_GENERATOR_FILES + "${rosidl_typesupport_opensplice_c_GENERATOR_FILES}") + diff --git a/patch/ros-galactic-rosidl-typesupport-opensplice-cpp.patch b/patch/ros-galactic-rosidl-typesupport-opensplice-cpp.patch new file mode 100644 index 00000000..0ef733aa --- /dev/null +++ b/patch/ros-galactic-rosidl-typesupport-opensplice-cpp.patch @@ -0,0 +1,13 @@ +diff --git a/rosidl_typesupport_opensplice_cpp/rosidl_typesupport_opensplice_cpp-extras.cmake.in b/rosidl_typesupport_opensplice_cpp/rosidl_typesupport_opensplice_cpp-extras.cmake.in +index c9e5e73..ed334a5 100644 +--- a/rosidl_typesupport_opensplice_cpp/rosidl_typesupport_opensplice_cpp-extras.cmake.in ++++ b/rosidl_typesupport_opensplice_cpp/rosidl_typesupport_opensplice_cpp-extras.cmake.in +@@ -21,7 +21,7 @@ else() + "${rosidl_typesupport_opensplice_cpp_BIN}") + + set(rosidl_typesupport_opensplice_cpp_GENERATOR_FILES +- "${rosidl_typesupport_opensplice_cpp_DIR}/../../../@PYTHON_INSTALL_DIR@/rosidl_typesupport_opensplice_cpp/__init__.py") ++ "@PYTHON_INSTALL_DIR@/rosidl_typesupport_opensplice_cpp/__init__.py") + normalize_path(rosidl_typesupport_opensplice_cpp_GENERATOR_FILES + "${rosidl_typesupport_opensplice_cpp_GENERATOR_FILES}") + diff --git a/patch/ros-galactic-rtabmap.patch b/patch/ros-galactic-rtabmap.patch new file mode 100644 index 00000000..0984000f --- /dev/null +++ b/patch/ros-galactic-rtabmap.patch @@ -0,0 +1,95 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5cdae61..0e691ba 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,5 @@ + # Top-Level CmakeLists.txt +-cmake_minimum_required(VERSION 3.5) ++cmake_minimum_required(VERSION 3.18) + PROJECT( RTABMap ) + SET(PROJECT_PREFIX rtabmap) + +@@ -80,12 +80,12 @@ IF(MINGW) + ENDIF(MINGW) + + # GCC 4 required +-IF(UNIX OR MINGW) +- EXEC_PROGRAM( gcc ARGS "-dumpversion" OUTPUT_VARIABLE GCC_VERSION ) +- IF(GCC_VERSION VERSION_LESS "4.0.0") +- MESSAGE(FATAL_ERROR "GCC ${GCC_VERSION} found, but version 4.x.x minimum is required") +- ENDIF(GCC_VERSION VERSION_LESS "4.0.0") +-ENDIF(UNIX OR MINGW) ++# IF(UNIX OR MINGW) ++# EXEC_PROGRAM( gcc ARGS "-dumpversion" OUTPUT_VARIABLE GCC_VERSION ) ++# IF(GCC_VERSION VERSION_LESS "4.0.0") ++# MESSAGE(FATAL_ERROR "GCC ${GCC_VERSION} found, but version 4.x.x minimum is required") ++# ENDIF(GCC_VERSION VERSION_LESS "4.0.0") ++# ENDIF(UNIX OR MINGW) + + #The CDT Error Parser cannot handle error messages that span + #more than one line, which is the default gcc behavior. +@@ -353,12 +353,26 @@ IF(WITH_TORCH) + ENDIF(WITH_TORCH) + + IF(WITH_PYTHON) +- FIND_PACKAGE(Python3 COMPONENTS Interpreter Development) ++ FIND_PACKAGE(Python3 REQUIRED COMPONENTS Interpreter Development) + IF(Python3_FOUND) + MESSAGE(STATUS "Found Python3") + ENDIF(Python3_FOUND) + ENDIF(WITH_PYTHON) + ++execute_process( ++ COMMAND ++ "${Python3_EXECUTABLE}" -c ++# multiline string; indentation would break this ++"try: ++ import sys ++ import numpy ++ sys.stdout.write(numpy.get_include()) ++except: ++ pass ++" ++ OUTPUT_VARIABLE NUMPY_INCLUDE_DIRS ++) ++ + IF(WITH_PDAL) + FIND_PACKAGE(PDAL QUIET) + IF(PDAL_FOUND) +@@ -1213,7 +1227,7 @@ MESSAGE(STATUS " With SupertPoint = NO (libtorch not found)") + ENDIF() + + IF(Python3_FOUND) +-MESSAGE(STATUS " With Python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} = YES (License: PSF)") ++MESSAGE(STATUS " With Python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} = YES (License: PSF) ${NUMPY_INCLUDE_DIRS}") + ELSEIF(NOT WITH_PYTHON) + MESSAGE(STATUS " With Python3 = NO (WITH_PYTHON=OFF)") + ELSE() +diff --git a/corelib/src/CMakeLists.txt b/corelib/src/CMakeLists.txt +index 25d5e2d..6950109 100644 +--- a/corelib/src/CMakeLists.txt ++++ b/corelib/src/CMakeLists.txt +@@ -150,10 +150,15 @@ SET(INCLUDE_DIRS + ${ZLIB_INCLUDE_DIRS} + ) + ++find_package(PkgConfig REQUIRED) ++pkg_check_modules(udev REQUIRED libudev) ++ ++ + SET(LIBRARIES + ${OpenCV_LIBS} + ${PCL_LIBRARIES} + ${ZLIB_LIBRARIES} ++ ${udev_LINK_LIBRARIES} + ) + + IF(Sqlite3_FOUND) +@@ -204,6 +209,7 @@ IF(Python3_FOUND) + python/PyDetector.cpp + ) + SET(INCLUDE_DIRS ++ ${NUMPY_INCLUDE_DIRS} + ${TORCH_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR}/python + ${INCLUDE_DIRS} diff --git a/patch/ros-galactic-rviz-assimp-vendor.patch b/patch/ros-galactic-rviz-assimp-vendor.patch new file mode 100644 index 00000000..b1782c40 --- /dev/null +++ b/patch/ros-galactic-rviz-assimp-vendor.patch @@ -0,0 +1,53 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e92c59f2..9cfdbec5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -83,6 +83,8 @@ if(FORCE_BUILD_VENDOR_PKG OR NOT assimp_FOUND OR "${assimp_VERSION}" VERSION_LES + set(ENV_VAR_VALUE "opt/rviz_assimp_vendor/lib") + endif() + ament_environment_hooks(env_hook/rviz_assimp_vendor_library_path.dsv.in) ++else() ++ ament_export_dependencies(assimp) + endif() + + if(BUILD_TESTING) +diff --git a/rviz_assimp_vendor-extras.cmake.in b/rviz_assimp_vendor-extras.cmake.in +index 8e41fe66..67467f16 100644 +--- a/rviz_assimp_vendor-extras.cmake.in ++++ b/rviz_assimp_vendor-extras.cmake.in +@@ -4,30 +4,14 @@ + # https://bugs.launchpad.net/ubuntu/+source/assimp/+bug/1869405 + set(ON 1) + +-find_package(assimp QUIET) ++find_package(assimp REQUIRED) + +-if(NOT assimp_FOUND OR "${assimp_VERSION}" VERSION_LESS 4.1.0) +- # add the local Modules directory to the modules path +- set(assimp_DIR "${@PROJECT_NAME@_DIR}/../../../opt/rviz_assimp_vendor/lib/cmake/assimp-4.1") +- message(STATUS "Setting assimp_DIR to: '${assimp_DIR}'") +-endif() ++set(ASSIMP_LIBRARIES assimp::assimp) + +-find_package(assimp REQUIRED QUIET) ++set(rviz_assimp_vendor_LIBRARIES "${ASSIMP_LIBRARIES}") + +-# workaround bug in Assimp 4.1.0 https://github.com/assimp/assimp/issues/1914 +-# Affecting Ubuntu package: libassimp-dev 4.1.0~dfsg-3, Brew: assimp 4.1.0 +-string(REPLACE "/lib/lib/" "/lib/" ASSIMP_LIBRARY_DIRS "${ASSIMP_LIBRARY_DIRS}") +-string(REGEX REPLACE "/lib/include$" "/include" ASSIMP_INCLUDE_DIRS "${ASSIMP_INCLUDE_DIRS}") ++find_library(ASSIMP_LIB assimp) ++get_filename_component(ASSIMP_LIBRARY_DIRS "${ASSIMP_LIB}" DIRECTORY) + +-set(rviz_assimp_vendor_LIBRARIES) +-foreach(library IN LISTS ASSIMP_LIBRARIES) +- message(STATUS "library: ${library}") +- if(IS_ABSOLUTE "${library}") +- list(APPEND rviz_assimp_vendor_LIBRARIES "${library}") +- else() +- find_library(library_abs ${library} PATHS "${ASSIMP_LIBRARY_DIRS}" NO_DEFAULT_PATH) +- list(APPEND rviz_assimp_vendor_LIBRARIES "${library_abs}") +- endif() +-endforeach() + set(rviz_assimp_vendor_LIBRARY_DIRS ${ASSIMP_LIBRARY_DIRS}) + set(rviz_assimp_vendor_INCLUDE_DIRS ${ASSIMP_INCLUDE_DIRS}) diff --git a/patch/ros-galactic-rviz-default-plugins.patch b/patch/ros-galactic-rviz-default-plugins.patch new file mode 100644 index 00000000..e6923b21 --- /dev/null +++ b/patch/ros-galactic-rviz-default-plugins.patch @@ -0,0 +1,40 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d6b1e67f..19e21299 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -219,12 +219,12 @@ add_library(rviz_default_plugins SHARED + target_include_directories(rviz_default_plugins PUBLIC + $ + $ +- ${Qt5Widgets_INCLUDE_DIRS} + ) + + target_link_libraries(rviz_default_plugins PUBLIC + rviz_ogre_vendor::OgreMain + rviz_ogre_vendor::OgreOverlay ++ Qt5::Widgets + ) + + # Causes the visibility macros to use dllexport rather than dllimport, +diff --git a/include/rviz_default_plugins/displays/interactive_markers/interactive_marker.hpp b/include/rviz_default_plugins/displays/interactive_markers/interactive_marker.hpp +index 0dc32a42fd0..4a8f2b9f970 100644 +--- a/include/rviz_default_plugins/displays/interactive_markers/interactive_marker.hpp ++++ b/include/rviz_default_plugins/displays/interactive_markers/interactive_marker.hpp +@@ -54,6 +54,8 @@ + + #include "rviz_default_plugins/displays/interactive_markers/interactive_marker_control.hpp" + ++#include "rviz_default_plugins/visibility_control.hpp" ++ + namespace Ogre + { + class SceneNode; +@@ -72,7 +74,7 @@ namespace displays + { + class InteractiveMarkerDisplay; + +-class InteractiveMarker : public QObject ++class RVIZ_DEFAULT_PLUGINS_PUBLIC InteractiveMarker : public QObject + { + Q_OBJECT + diff --git a/patch/ros-galactic-rviz-ogre-vendor.patch b/patch/ros-galactic-rviz-ogre-vendor.patch new file mode 100644 index 00000000..3abf87b3 --- /dev/null +++ b/patch/ros-galactic-rviz-ogre-vendor.patch @@ -0,0 +1,119 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index faac7e1b..8b93592e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -204,28 +204,36 @@ macro(build_ogre) + ) + endmacro() + +-if(BUILDING_FREETYPE_LOCALLY) +- build_freetype() +-endif() +-if(BUILDING_ZLIB_LOCALLY) +- build_zlib() +-endif() ++set(RVIZ_OGRE_IS_VENDORBUILD OFF) + +-build_ogre() ++find_package(OGRE) + +-if(WIN32) +- ament_environment_hooks(env_hook/rviz_ogre_vendor_library_path.bat) +- set(ENV_VAR_NAME "PATH") +- set(ENV_VAR_VALUE "opt\\rviz_ogre_vendor\\bin") +-else() +- ament_environment_hooks(env_hook/rviz_ogre_vendor_library_path.sh) +- if(APPLE) +- set(ENV_VAR_NAME "DYLD_LIBRARY_PATH") ++if(FORCE_BUILD_VENDOR_PKG OR NOT OGRE_FOUND OR "${OGRE_VERSION}" VERSION_LESS 1.12.1) ++ set(RVIZ_OGRE_IS_VENDORBUILD ON) ++ if(BUILDING_FREETYPE_LOCALLY) ++ build_freetype() ++ endif() ++ if(BUILDING_ZLIB_LOCALLY) ++ build_zlib() ++ endif() ++ ++ build_ogre() ++ ++ if(WIN32) ++ ament_environment_hooks(env_hook/rviz_ogre_vendor_library_path.bat) ++ set(ENV_VAR_NAME "PATH") ++ set(ENV_VAR_VALUE "opt\\rviz_ogre_vendor\\bin") + else() +- set(ENV_VAR_NAME "LD_LIBRARY_PATH") ++ ament_environment_hooks(env_hook/rviz_ogre_vendor_library_path.sh) ++ if(APPLE) ++ set(ENV_VAR_NAME "DYLD_LIBRARY_PATH") ++ else() ++ set(ENV_VAR_NAME "LD_LIBRARY_PATH") ++ endif() ++ set(ENV_VAR_VALUE "opt/rviz_ogre_vendor/lib") + endif() +- set(ENV_VAR_VALUE "opt/rviz_ogre_vendor/lib") + endif() ++ + ament_environment_hooks(env_hook/rviz_ogre_vendor_library_path.dsv.in) + + if(BUILD_TESTING) +diff --git a/rviz_ogre_vendor-extras.cmake.in b/rviz_ogre_vendor-extras.cmake.in +index 0ab09b60..6365c570 100644 +--- a/rviz_ogre_vendor-extras.cmake.in ++++ b/rviz_ogre_vendor-extras.cmake.in +@@ -1,20 +1,26 @@ + # add the local Modules directory to the modules path +-if(WIN32) +- set(OGRE_DIR "${@PROJECT_NAME@_DIR}/../../../opt/rviz_ogre_vendor/CMake") +- set(OGRE_CMAKE_MODULE_DIR "${@PROJECT_NAME@_DIR}/../../../opt/rviz_ogre_vendor/CMake") +- list(INSERT CMAKE_MODULE_PATH 0 ${OGRE_CMAKE_MODULE_DIR}) +- message(STATUS "Prepending to CMAKE_MODULE_PATH: '${OGRE_CMAKE_MODULE_DIR}'") +-elseif(APPLE) +- set(OGRE_DIR "${@PROJECT_NAME@_DIR}/../../../opt/rviz_ogre_vendor/CMake") ++set (RVIZ_OGRE_IS_VENDORBUILD @RVIZ_OGRE_IS_VENDORBUILD@) ++if (RVIZ_OGRE_IS_VENDORBUILD) ++ if(WIN32) ++ set(OGRE_DIR "${@PROJECT_NAME@_DIR}/../../../opt/rviz_ogre_vendor/CMake") ++ set(OGRE_CMAKE_MODULE_DIR "${@PROJECT_NAME@_DIR}/../../../opt/rviz_ogre_vendor/CMake") ++ list(INSERT CMAKE_MODULE_PATH 0 ${OGRE_CMAKE_MODULE_DIR}) ++ message(STATUS "Prepending to CMAKE_MODULE_PATH: '${OGRE_CMAKE_MODULE_DIR}'") ++ elseif(APPLE) ++ set(OGRE_DIR "${@PROJECT_NAME@_DIR}/../../../opt/rviz_ogre_vendor/CMake") ++ else() ++ set(OGRE_DIR "${@PROJECT_NAME@_DIR}/../../../opt/rviz_ogre_vendor/lib/OGRE/cmake") ++ endif() ++ message(STATUS "Setting OGRE_DIR to: '${OGRE_DIR}'") ++ ++ set(FREETYPE_HOME "${rviz_ogre_vendor_DIR}/../../../opt/rviz_ogre_vendor") ++ set(ZLIB_HOME "${rviz_ogre_vendor_DIR}/../../../opt/rviz_ogre_vendor") ++ ++ find_package(OGRE REQUIRED NO_SYSTEM_ENVIRONMENT_PATH) + else() +- set(OGRE_DIR "${@PROJECT_NAME@_DIR}/../../../opt/rviz_ogre_vendor/lib/OGRE/cmake") ++ find_package(OGRE REQUIRED) + endif() +-message(STATUS "Setting OGRE_DIR to: '${OGRE_DIR}'") + +-set(FREETYPE_HOME "${rviz_ogre_vendor_DIR}/../../../opt/rviz_ogre_vendor") +-set(ZLIB_HOME "${rviz_ogre_vendor_DIR}/../../../opt/rviz_ogre_vendor") +- +-find_package(OGRE REQUIRED NO_SYSTEM_ENVIRONMENT_PATH) + message(STATUS "OGRE_LIBRARIES: ${OGRE_LIBRARIES}") + message(STATUS "OGRE_LIBRARY_DIRS: ${OGRE_LIBRARY_DIRS}") + message(STATUS "OGRE_PLUGINS: ${OGRE_PLUGINS}") +@@ -97,15 +103,7 @@ foreach(_lib IN LISTS OGRE_LIBRARIES) + message(FATAL_ERROR "Could not find freetype package") + endif() + +- if(WIN32) +- if(_ogre_main_static_library_debug_abs) +- set(ZLIB_LIBRARIES "${ZLIB_HOME}/lib/zlibstaticd.lib") +- else() +- set(ZLIB_LIBRARIES "${ZLIB_HOME}/lib/zlibstatic.lib") +- endif() +- else() +- find_package(ZLIB REQUIRED) +- endif() ++ find_package(ZLIB REQUIRED) + + if(NOT ZLIB_LIBRARIES) + message(FATAL_ERROR "Could not find zlib library") diff --git a/patch/ros-galactic-rviz-rendering.patch b/patch/ros-galactic-rviz-rendering.patch new file mode 100644 index 00000000..ad0970bf --- /dev/null +++ b/patch/ros-galactic-rviz-rendering.patch @@ -0,0 +1,44 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a0e8c892..a05ef366 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -121,6 +121,7 @@ ament_target_dependencies(rviz_rendering + ) + ament_export_dependencies( + rviz_ogre_vendor ++ rviz_assimp_vendor + eigen3_cmake_module + Eigen3 + resource_retriever +diff --git a/src/rviz_rendering/material_manager.cpp b/src/rviz_rendering/material_manager.cpp +index 3866ae00..11eede92 100644 +--- a/src/rviz_rendering/material_manager.cpp ++++ b/src/rviz_rendering/material_manager.cpp +@@ -122,9 +122,9 @@ void MaterialManager::enableAlphaBlending( + + void MaterialManager::createDefaultMaterials() + { +- auto material = Ogre::MaterialManager::getSingleton().create( ++ auto retrieve_result = Ogre::MaterialManager::getSingleton().createOrRetrieve( + "BaseWhiteNoLighting", "rviz_rendering"); +- material->setLightingEnabled(false); ++ std::dynamic_pointer_cast(retrieve_result.first)->setLightingEnabled(false); + } + + } // namespace rviz_rendering +diff --git a/src/rviz_rendering/render_system.cpp b/src/rviz_rendering/render_system.cpp +index 1765e804..eb426dd8 100644 +--- a/src/rviz_rendering/render_system.cpp ++++ b/src/rviz_rendering/render_system.cpp +@@ -301,9 +301,9 @@ RenderSystem::setPluginDirectory() + std::string prefix_path; + ament_index_cpp::get_resource("packages", "rviz_ogre_vendor", content, &prefix_path); + #ifdef _WIN32 +- set_ogre_plugin_directory(prefix_path + "\\opt\\rviz_ogre_vendor\\bin\\"); ++ set_ogre_plugin_directory(prefix_path + "\\bin\\"); + #else +- set_ogre_plugin_directory(prefix_path + "/opt/rviz_ogre_vendor/lib/OGRE/"); ++ set_ogre_plugin_directory(prefix_path + "/lib/OGRE/"); + #endif + } + diff --git a/patch/ros-galactic-rviz2.patch b/patch/ros-galactic-rviz2.patch new file mode 100644 index 00000000..45ffce64 --- /dev/null +++ b/patch/ros-galactic-rviz2.patch @@ -0,0 +1,102 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 37118e6b..14571801 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -19,26 +19,26 @@ find_package(rviz_ogre_vendor REQUIRED) + + find_package(Qt5 REQUIRED COMPONENTS Widgets) + # TODO(wjwwood): this block is to setup the windeployqt tool, could be removed later. +-if(Qt5_FOUND AND WIN32 AND TARGET Qt5::qmake AND NOT TARGET Qt5::windeployqt) +- get_target_property(_qt5_qmake_location Qt5::qmake IMPORTED_LOCATION) ++# if(Qt5_FOUND AND WIN32 AND TARGET Qt5::qmake AND NOT TARGET Qt5::windeployqt) ++# get_target_property(_qt5_qmake_location Qt5::qmake IMPORTED_LOCATION) + +- execute_process( +- COMMAND "${_qt5_qmake_location}" -query QT_INSTALL_PREFIX +- RESULT_VARIABLE return_code +- OUTPUT_VARIABLE qt5_install_prefix +- OUTPUT_STRIP_TRAILING_WHITESPACE +- ) ++# execute_process( ++# COMMAND "${_qt5_qmake_location}" -query QT_INSTALL_PREFIX ++# RESULT_VARIABLE return_code ++# OUTPUT_VARIABLE qt5_install_prefix ++# OUTPUT_STRIP_TRAILING_WHITESPACE ++# ) + +- set(imported_location "${qt5_install_prefix}/bin/windeployqt.exe") ++# set(imported_location "${qt5_install_prefix}/bin/windeployqt.exe") + +- if(EXISTS ${imported_location}) +- add_executable(Qt5::windeployqt IMPORTED) ++# if(EXISTS ${imported_location}) ++# add_executable(Qt5::windeployqt IMPORTED) + +- set_target_properties(Qt5::windeployqt PROPERTIES +- IMPORTED_LOCATION ${imported_location} +- ) +- endif() +-endif() ++# set_target_properties(Qt5::windeployqt PROPERTIES ++# IMPORTED_LOCATION ${imported_location} ++# ) ++# endif() ++# endif() + + add_executable(${PROJECT_NAME} + src/main.cpp +@@ -54,30 +54,30 @@ target_link_libraries(${PROJECT_NAME} + # necessary dlls and stuff to the bin folder. + # see: + # https://stackoverflow.com/questions/41193584/deploy-all-qt-dependencies-when-building#41199492 +-if(TARGET Qt5::windeployqt) +- # execute windeployqt in a tmp directory after build +- add_custom_command(TARGET ${PROJECT_NAME} +- POST_BUILD +- COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/windeployqt" +- COMMAND set PATH=%PATH%$${qt5_install_prefix}/bin +- COMMAND +- Qt5::windeployqt +- --dir "${CMAKE_CURRENT_BINARY_DIR}/windeployqt" +- "$/$" +- ) +- +- # copy deployment directory during installation +- install( +- DIRECTORY +- "${CMAKE_CURRENT_BINARY_DIR}/windeployqt/" +- DESTINATION bin +- ) +- install( +- DIRECTORY +- "${CMAKE_CURRENT_BINARY_DIR}/windeployqt/" +- DESTINATION lib/${PROJECT_NAME} +- ) +-endif() ++# if(TARGET Qt5::windeployqt) ++# # execute windeployqt in a tmp directory after build ++# add_custom_command(TARGET ${PROJECT_NAME} ++# POST_BUILD ++# COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_CURRENT_BINARY_DIR}/windeployqt" ++# COMMAND set PATH=%PATH%$${qt5_install_prefix}/bin ++# COMMAND ++# Qt5::windeployqt ++# --dir "${CMAKE_CURRENT_BINARY_DIR}/windeployqt" ++# "$/$" ++# ) ++ ++# # copy deployment directory during installation ++# install( ++# DIRECTORY ++# "${CMAKE_CURRENT_BINARY_DIR}/windeployqt/" ++# DESTINATION bin ++# ) ++# install( ++# DIRECTORY ++# "${CMAKE_CURRENT_BINARY_DIR}/windeployqt/" ++# DESTINATION lib/${PROJECT_NAME} ++# ) ++# endif() + + install(TARGETS ${PROJECT_NAME} DESTINATION bin) + install(TARGETS ${PROJECT_NAME} DESTINATION lib/${PROJECT_NAME}) diff --git a/patch/ros-galactic-sdformat-urdf.patch b/patch/ros-galactic-sdformat-urdf.patch new file mode 100644 index 00000000..16467a40 --- /dev/null +++ b/patch/ros-galactic-sdformat-urdf.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 23f11ab..846d08a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -14,7 +14,7 @@ find_package(ament_cmake_ros REQUIRED) + + find_package(pluginlib REQUIRED) + find_package(rcutils REQUIRED) +-find_package(sdformat9 REQUIRED) ++find_package(sdformat11 REQUIRED) + find_package(urdfdom_headers REQUIRED) + find_package(urdf_parser_plugin REQUIRED) + find_package(tinyxml2_vendor REQUIRED) +@@ -25,7 +25,7 @@ add_library(sdformat_urdf SHARED + src/sdformat_urdf.cpp + ) + target_link_libraries(sdformat_urdf PUBLIC +- sdformat9::sdformat9 ++ sdformat11::sdformat11 + ) + target_link_libraries(sdformat_urdf PRIVATE + rcutils::rcutils +@@ -50,7 +50,7 @@ target_link_libraries(sdformat_urdf_plugin PRIVATE + ) + + ament_export_dependencies(urdfdom_headers) +-ament_export_dependencies(sdformat9) ++ament_export_dependencies(sdformat11) + + install(TARGETS sdformat_urdf EXPORT sdformat_urdf-export + ARCHIVE DESTINATION lib diff --git a/patch/ros-galactic-spacenav.patch b/patch/ros-galactic-spacenav.patch new file mode 100644 index 00000000..0841883e --- /dev/null +++ b/patch/ros-galactic-spacenav.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 247381b..4474a03 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -31,7 +31,7 @@ ament_target_dependencies(spacenav + "rclcpp" + "sensor_msgs") + +-target_link_libraries(spacenav spnav) ++target_link_libraries(spacenav ${SPNAV_LIBRARIES}) + + # Install targets + install(TARGETS spacenav diff --git a/patch/ros-galactic-tf2-py.patch b/patch/ros-galactic-tf2-py.patch new file mode 100644 index 00000000..6616be5f --- /dev/null +++ b/patch/ros-galactic-tf2-py.patch @@ -0,0 +1,69 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4312925f..aa53e2fa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,51 +20,25 @@ if(CMAKE_COMPILER_IS_GNUCXX) + add_compile_options(-Wno-cast-function-type) + endif() + ++find_package(Python3 REQUIRED COMPONENTS Interpreter Development) + find_package(ament_cmake REQUIRED) + find_package(ament_cmake_python REQUIRED) + find_package(geometry_msgs REQUIRED) + find_package(tf2 REQUIRED) + +-find_package(python_cmake_module REQUIRED) +-find_package(PythonExtra REQUIRED) +- +-set(_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}") +- +-if(WIN32 AND CMAKE_BUILD_TYPE STREQUAL "Debug") +- set(PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE_DEBUG}") +-endif() +- + ament_python_install_package(${PROJECT_NAME}) + + include_directories(include) + +-function(set_properties _targetname _build_type) +- set_target_properties(${_targetname} PROPERTIES +- PREFIX "" +- LIBRARY_OUTPUT_DIRECTORY${_build_type} "${CMAKE_CURRENT_BINARY_DIR}/test_${PROJECT_NAME}" +- RUNTIME_OUTPUT_DIRECTORY${_build_type} "${CMAKE_CURRENT_BINARY_DIR}/test_${PROJECT_NAME}" +- OUTPUT_NAME "_${_targetname}${PythonExtra_EXTENSION_SUFFIX}" +- SUFFIX "${PythonExtra_EXTENSION_EXTENSION}") +-endfunction() ++python3_add_library(_tf2_py src/tf2_py.cpp) + +-add_library(${PROJECT_NAME} SHARED src/tf2_py.cpp) +- +-set_properties(${PROJECT_NAME} "") +-if(WIN32) +- set_properties(${PROJECT_NAME} "_DEBUG") +- set_properties(${PROJECT_NAME} "_MINSIZEREL") +- set_properties(${PROJECT_NAME} "_RELEASE") +- set_properties(${PROJECT_NAME} "_RELWITHDEBINFO") +-endif() +- +-ament_target_dependencies(${PROJECT_NAME} +- "geometry_msgs" +- "tf2" +- "PythonExtra" ++target_link_libraries(_tf2_py PRIVATE ++ ${geometry_msgs_TARGETS} ++ tf2::tf2 + ) + + install(TARGETS +- ${PROJECT_NAME} ++ _tf2_py + DESTINATION ${PYTHON_INSTALL_DIR}/${PROJECT_NAME} + ) + +@@ -89,6 +63,4 @@ if(BUILD_TESTING) + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_tf2_py/__init__.py" "") + endif() + +-set(PYTHON_EXECUTABLE "${_PYTHON_EXECUTABLE}") +- + ament_package() diff --git a/patch/ros-galactic-tf2.win.patch b/patch/ros-galactic-tf2.win.patch new file mode 100644 index 00000000..e6b3c9bb --- /dev/null +++ b/patch/ros-galactic-tf2.win.patch @@ -0,0 +1,302 @@ +From cf3b76af61bbac8ddb66ace6f712fc6050290ae6 Mon Sep 17 00:00:00 2001 +From: Chris Lalancette +Date: Tue, 17 Nov 2020 15:26:38 +0000 +Subject: [PATCH] Change TF2Error names to be a bit more descriptive. + +The driving reason behind this is to avoid the NO_ERROR macro +on Windows. We can't totally get around the problem right now, +but we can deprecate the old names and switch to new ones. +After Galactic, we can remove the old names and get rid of the +problem completely. + +Signed-off-by: Chris Lalancette +--- + tf2/include/tf2/buffer_core.h | 2 +- + tf2/include/tf2/exceptions.h | 48 +++++++++++++++++++++++---- + tf2/src/buffer_core.cpp | 62 +++++++++++++++++------------------ + tf2_py/src/tf2_py.cpp | 2 +- + 4 files changed, 74 insertions(+), 40 deletions(-) + +diff --git a/tf2/include/tf2/exceptions.h b/tf2/include/tf2/exceptions.h +index c516da85..c187b5e7 100644 +--- a/tf2/include/tf2/exceptions.h ++++ b/tf2/include/tf2/exceptions.h +@@ -40,17 +40,51 @@ + namespace tf2 + { + ++// TODO(clalancette): We can remove these workarounds when we remove the ++// deprecated TF2Error enums. ++#if defined(_WIN32) ++#pragma push_macro("NO_ERROR") ++#undef NO_ERROR ++#endif ++#if defined(__APPLE__) ++// The clang compiler on Apple claims that [[deprecated]] on an enumerator value ++// is a C++17 feature, when it was really introduced in C++14. Ignore that ++// warning when defining the structure; this whole thing will go away when we ++// remove the deprecated values. ++#pragma clang diagnostic push ++#pragma clang diagnostic ignored "-Wc++17-extensions" ++#endif ++ + enum class TF2Error : std::uint8_t + { +- NO_ERROR = 0, +- LOOKUP_ERROR = 1, +- CONNECTIVITY_ERROR = 2, +- EXTRAPOLATION_ERROR = 3, +- INVALID_ARGUMENT_ERROR = 4, +- TIMEOUT_ERROR = 5, +- TRANSFORM_ERROR = 6 ++ // While the TF2_ prefix here is a bit redundant, it also prevents us from ++ // colliding with Windows defines (specifically, NO_ERROR). ++ TF2_NO_ERROR = 0, ++ TF2_LOOKUP_ERROR = 1, ++ TF2_CONNECTIVITY_ERROR = 2, ++ TF2_EXTRAPOLATION_ERROR = 3, ++ TF2_INVALID_ARGUMENT_ERROR = 4, ++ TF2_TIMEOUT_ERROR = 5, ++ TF2_TRANSFORM_ERROR = 6, ++ ++ NO_ERROR [[deprecated("Use TF2_NO_ERROR instead")]] = 0, ++ LOOKUP_ERROR [[deprecated("Use TF2_LOOKUP_ERROR instead")]] = 1, ++ CONNECTIVITY_ERROR [[deprecated("Use TF2_CONNECTIVITY_ERROR instead")]] = 2, ++ EXTRAPOLATION_ERROR [[deprecated("Use TF2_EXTRAPOLATION_ERROR instead")]] = 3, ++ INVALID_ARGUMENT_ERROR [[deprecated("Use TF2_INVALID_ARGUMENT_ERROR instead")]] = 4, ++ TIMEOUT_ERROR [[deprecated("Use TF2_TIMEOUT_ERROR instead")]] = 5, ++ TRANSFORM_ERROR [[deprecated("Use TF2_TRANSFORM_ERROR instead")]] = 6 + }; + ++// TODO(clalancette): We can remove these workarounds when we remove the ++// deprecated TF2Error enums. ++#if defined(__APPLE__) ++#pragma clang diagnostic pop ++#endif ++#if defined(_WIN32) ++#pragma pop_macro("NO_ERROR") ++#endif ++ + /** \brief A base class for all tf2 exceptions + * This inherits from ros::exception + * which inherits from std::runtime_exception +diff --git a/tf2/src/buffer_core.cpp b/tf2/src/buffer_core.cpp +index 0ecc350b..9e54acfa 100644 +--- a/tf2/src/buffer_core.cpp ++++ b/tf2/src/buffer_core.cpp +@@ -408,13 +408,13 @@ tf2::TF2Error BufferCore::walkToTopParent( + // Short circuit if zero length transform to allow lookups on non existant links + if (source_id == target_id) { + f.finalize(Identity, time); +- return tf2::TF2Error::NO_ERROR; ++ return tf2::TF2Error::TF2_NO_ERROR; + } + + // If getting the latest get the latest common time + if (time == TimePointZero) { + tf2::TF2Error retval = getLatestCommonTime(target_id, source_id, time, error_string); +- if (retval != tf2::TF2Error::NO_ERROR) { ++ if (retval != tf2::TF2Error::TF2_NO_ERROR) { + return retval; + } + } +@@ -450,7 +450,7 @@ tf2::TF2Error BufferCore::walkToTopParent( + // Early out... target frame is a direct parent of the source frame + if (frame == target_id) { + f.finalize(TargetParentOfSource, time); +- return tf2::TF2Error::NO_ERROR; ++ return tf2::TF2Error::TF2_NO_ERROR; + } + + f.accum(true); +@@ -466,7 +466,7 @@ tf2::TF2Error BufferCore::walkToTopParent( + allFramesAsStringNoLock() << std::endl; + *error_string = ss.str(); + } +- return tf2::TF2Error::LOOKUP_ERROR; ++ return tf2::TF2Error::TF2_LOOKUP_ERROR; + } + } + +@@ -494,7 +494,7 @@ tf2::TF2Error BufferCore::walkToTopParent( + *error_string = ss.str(); + } + +- return tf2::TF2Error::EXTRAPOLATION_ERROR; ++ return tf2::TF2Error::TF2_EXTRAPOLATION_ERROR; + } + + // Early out... source frame is a direct parent of the target frame +@@ -503,7 +503,7 @@ tf2::TF2Error BufferCore::walkToTopParent( + if (frame_chain) { + frame_chain->swap(reverse_frame_chain); + } +- return tf2::TF2Error::NO_ERROR; ++ return tf2::TF2Error::TF2_NO_ERROR; + } + + f.accum(false); +@@ -518,7 +518,7 @@ tf2::TF2Error BufferCore::walkToTopParent( + allFramesAsStringNoLock() << std::endl; + *error_string = ss.str(); + } +- return tf2::TF2Error::LOOKUP_ERROR; ++ return tf2::TF2Error::TF2_LOOKUP_ERROR; + } + } + +@@ -530,10 +530,10 @@ tf2::TF2Error BufferCore::walkToTopParent( + lookupFrameString(source_id) << "] to frame [" << lookupFrameString(target_id) << "]"; + *error_string = ss.str(); + } +- return tf2::TF2Error::EXTRAPOLATION_ERROR; ++ return tf2::TF2Error::TF2_EXTRAPOLATION_ERROR; + } + createConnectivityErrorString(source_id, target_id, error_string); +- return tf2::TF2Error::CONNECTIVITY_ERROR; ++ return tf2::TF2Error::TF2_CONNECTIVITY_ERROR; + } + + f.finalize(FullPath, time); +@@ -562,7 +562,7 @@ tf2::TF2Error BufferCore::walkToTopParent( + } + } + +- return tf2::TF2Error::NO_ERROR; ++ return tf2::TF2Error::TF2_NO_ERROR; + } + + struct TransformAccum +@@ -730,13 +730,13 @@ void BufferCore::lookupTransformImpl( + std::string error_string; + TransformAccum accum; + tf2::TF2Error retval = walkToTopParent(accum, time, target_id, source_id, &error_string); +- if (retval != tf2::TF2Error::NO_ERROR) { ++ if (retval != tf2::TF2Error::TF2_NO_ERROR) { + switch (retval) { +- case tf2::TF2Error::CONNECTIVITY_ERROR: ++ case tf2::TF2Error::TF2_CONNECTIVITY_ERROR: + throw ConnectivityException(error_string); +- case tf2::TF2Error::EXTRAPOLATION_ERROR: ++ case tf2::TF2Error::TF2_EXTRAPOLATION_ERROR: + throw ExtrapolationException(error_string); +- case tf2::TF2Error::LOOKUP_ERROR: ++ case tf2::TF2Error::TF2_LOOKUP_ERROR: + throw LookupException(error_string); + default: + CONSOLE_BRIDGE_logError("Unknown error code: %d", retval); +@@ -806,7 +806,7 @@ bool BufferCore::canTransformNoLock( + } + + CanTransformAccum accum; +- if (walkToTopParent(accum, time, target_id, source_id, error_msg) == tf2::TF2Error::NO_ERROR) { ++ if (walkToTopParent(accum, time, target_id, source_id, error_msg) == tf2::TF2Error::TF2_NO_ERROR) { + return true; + } + +@@ -988,7 +988,7 @@ tf2::TF2Error BufferCore::getLatestCommonTime( + TimePoint & time, std::string * error_string) const + { + // Error if one of the frames don't exist. +- if (source_id == 0 || target_id == 0) {return tf2::TF2Error::LOOKUP_ERROR;} ++ if (source_id == 0 || target_id == 0) {return tf2::TF2Error::TF2_LOOKUP_ERROR;} + + if (source_id == target_id) { + TimeCacheInterfacePtr cache = getFrame(source_id); +@@ -998,7 +998,7 @@ tf2::TF2Error BufferCore::getLatestCommonTime( + } else { + time = TimePointZero; + } +- return tf2::TF2Error::NO_ERROR; ++ return tf2::TF2Error::TF2_NO_ERROR; + } + + std::vector lct_cache; +@@ -1037,7 +1037,7 @@ tf2::TF2Error BufferCore::getLatestCommonTime( + if (time == TimePoint::max()) { + time = TimePointZero; + } +- return tf2::TF2Error::NO_ERROR; ++ return tf2::TF2Error::TF2_NO_ERROR; + } + + ++depth; +@@ -1048,7 +1048,7 @@ tf2::TF2Error BufferCore::getLatestCommonTime( + allFramesAsStringNoLock() << std::endl; + *error_string = ss.str(); + } +- return tf2::TF2Error::LOOKUP_ERROR; ++ return tf2::TF2Error::TF2_LOOKUP_ERROR; + } + } + +@@ -1091,7 +1091,7 @@ tf2::TF2Error BufferCore::getLatestCommonTime( + if (time == TimePoint::max()) { + time = TimePointZero; + } +- return tf2::TF2Error::NO_ERROR; ++ return tf2::TF2Error::TF2_NO_ERROR; + } + + ++depth; +@@ -1102,13 +1102,13 @@ tf2::TF2Error BufferCore::getLatestCommonTime( + allFramesAsStringNoLock() << std::endl; + *error_string = ss.str(); + } +- return tf2::TF2Error::LOOKUP_ERROR; ++ return tf2::TF2Error::TF2_LOOKUP_ERROR; + } + } + + if (common_parent == 0) { + createConnectivityErrorString(source_id, target_id, error_string); +- return tf2::TF2Error::CONNECTIVITY_ERROR; ++ return tf2::TF2Error::TF2_CONNECTIVITY_ERROR; + } + + // Loop through the source -> root list until we hit the common parent +@@ -1131,7 +1131,7 @@ tf2::TF2Error BufferCore::getLatestCommonTime( + } + + time = common_time; +- return tf2::TF2Error::NO_ERROR; ++ return tf2::TF2Error::TF2_NO_ERROR; + } + + std::string BufferCore::allFramesAsYAML(TimePoint current_time) const +@@ -1525,13 +1525,13 @@ void BufferCore::_chainAsVector( + tf2::TF2Error retval = walkToTopParent( + accum, source_time, fixed_id, source_id, &error_string, + &source_frame_chain); +- if (retval != tf2::TF2Error::NO_ERROR) { ++ if (retval != tf2::TF2Error::TF2_NO_ERROR) { + switch (retval) { +- case tf2::TF2Error::CONNECTIVITY_ERROR: ++ case tf2::TF2Error::TF2_CONNECTIVITY_ERROR: + throw ConnectivityException(error_string); +- case tf2::TF2Error::EXTRAPOLATION_ERROR: ++ case tf2::TF2Error::TF2_EXTRAPOLATION_ERROR: + throw ExtrapolationException(error_string); +- case tf2::TF2Error::LOOKUP_ERROR: ++ case tf2::TF2Error::TF2_LOOKUP_ERROR: + throw LookupException(error_string); + default: + CONSOLE_BRIDGE_logError("Unknown error code: %d", retval); +@@ -1545,13 +1545,13 @@ void BufferCore::_chainAsVector( + accum, target_time, target_id, fixed_id, &error_string, + &target_frame_chain); + +- if (retval != tf2::TF2Error::NO_ERROR) { ++ if (retval != tf2::TF2Error::TF2_NO_ERROR) { + switch (retval) { +- case tf2::TF2Error::CONNECTIVITY_ERROR: ++ case tf2::TF2Error::TF2_CONNECTIVITY_ERROR: + throw ConnectivityException(error_string); +- case tf2::TF2Error::EXTRAPOLATION_ERROR: ++ case tf2::TF2Error::TF2_EXTRAPOLATION_ERROR: + throw ExtrapolationException(error_string); +- case tf2::TF2Error::LOOKUP_ERROR: ++ case tf2::TF2Error::TF2_LOOKUP_ERROR: + throw LookupException(error_string); + default: + CONSOLE_BRIDGE_logError("Unknown error code: %d", retval); diff --git a/patch/ros-galactic-theora-image-transport.patch b/patch/ros-galactic-theora-image-transport.patch new file mode 100644 index 00000000..1a5de6fb --- /dev/null +++ b/patch/ros-galactic-theora-image-transport.patch @@ -0,0 +1,169 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d301dee..d7fdcd7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -22,11 +22,11 @@ find_package(sensor_msgs REQUIRED) + find_package(std_msgs REQUIRED) + + find_package(OpenCV REQUIRED imgproc) +-find_package(PkgConfig) +-pkg_check_modules(PC_OGG REQUIRED ogg) +-pkg_check_modules(PC_THEORA REQUIRED theora) +-pkg_check_modules(PC_THEORAENC REQUIRED theoraenc) +-pkg_check_modules(PC_THEORADEC REQUIRED theoradec) ++list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake) ++ ++ ++find_package(OGG REQUIRED) ++find_package(THEORA REQUIRED) + + set (LIBRARY_NAME ${PROJECT_NAME}_component) + +@@ -40,17 +40,13 @@ add_library( + + include_directories(include + ${OpenCV_INCLUDE_DIRS} +- ${PC_OGG_INCLUDE_DIRS} +- ${PC_THEORA_INCLUDE_DIRS} +- ${PC_THEORAENC_INCLUDE_DIRS} +- ${PC_THEORADEC_INCLUDE_DIRS}) ++ ${THEORA_INCLUDE_DIRS} ++ ${OGG_INCLUDE_DIRS}) + + target_link_libraries(${LIBRARY_NAME} + ${OpenCV_LIBRARIES} +- ${PC_OGG_LIBRARIES} +- ${PC_THEORA_LIBRARIES} +- ${PC_THEORAENC_LIBRARIES} +- ${PC_THEORADEC_LIBRARIES} ++ ${OGG_LIBRARIES} ++ ${THEORA_LIBRARIES} + ) + + ament_target_dependencies(${LIBRARY_NAME} +@@ -61,17 +57,10 @@ ament_target_dependencies(${LIBRARY_NAME} + "sensor_msgs" + ) + +-add_definitions(${PC_OGG_CFLAGS_OTHER} +- ${PC_THEORA_CFLAGS_OTHER} +- ${PC_THEORAENC_CFLAGS_OTHER} +- ${PC_THEORADEC_CFLAGS_OTHER}) +- + add_executable(ogg_saver src/ogg_saver.cpp) +-target_link_libraries(ogg_saver ${PC_THEORA_LIBRARY} +- ${PC_OGG_LIBRARY} +- ${OpenCV_LIBRARIES} +- ${PC_THEORAENC_LIBRARIES} +- ${PC_THEORADEC_LIBRARIES}) ++target_link_libraries(ogg_saver ${THEORA_LIBRARIES} ++ ${OGG_LIBRARIES} ++ ${OpenCV_LIBRARIES}) + + ament_target_dependencies(ogg_saver + "rclcpp" +diff --git a/cmake/FindOGG.cmake b/cmake/FindOGG.cmake +new file mode 100644 +index 0000000..3121d17 +--- /dev/null ++++ b/cmake/FindOGG.cmake +@@ -0,0 +1,26 @@ ++find_path(OGG_INCLUDE_DIR ++ NAMES ++ ogg/ogg.h ++ DOC "ogg include directory") ++mark_as_advanced(OGG_INCLUDE_DIR) ++ ++find_library(OGG_LIBRARY ++ NAMES ++ ogg ++ DOC "ogg library") ++mark_as_advanced(OGG_LIBRARY) ++ ++include(FindPackageHandleStandardArgs) ++find_package_handle_standard_args(OGG REQUIRED_VARS OGG_LIBRARY OGG_INCLUDE_DIR) ++ ++if (OGG_FOUND) ++ set(OGG_LIBRARIES "${OGG_LIBRARY}") ++ set(OGG_INCLUDE_DIRS "${OGG_INCLUDE_DIR}") ++ ++ if (NOT TARGET OGG::OGG) ++ add_library(OGG::OGG UNKNOWN IMPORTED) ++ set_target_properties(OGG::OGG PROPERTIES ++ IMPORTED_LOCATION "${OGG_LIBRARY}" ++ INTERFACE_INCLUDE_DIRECTORIES "${OGG_INCLUDE_DIR}") ++ endif () ++endif () +diff --git a/cmake/FindTHEORA.cmake b/cmake/FindTHEORA.cmake +new file mode 100644 +index 0000000..73205cf +--- /dev/null ++++ b/cmake/FindTHEORA.cmake +@@ -0,0 +1,67 @@ ++include(CMakeFindDependencyMacro) ++ ++find_path(THEORA_INCLUDE_DIR ++ NAMES ++ theora/theora.h ++ DOC "theora include directory") ++mark_as_advanced(THEORA_INCLUDE_DIR) ++ ++get_filename_component(computed_theora_root "${THEORA_INCLUDE_DIR}" DIRECTORY) ++ ++find_library(THEORA_LIBRARY ++ NAMES ++ theora ++ HINTS ++ "${computed_theora_root}/lib" ++ "${computed_theora_root}/lib64" ++ DOC "theora library") ++mark_as_advanced(THEORA_LIBRARY) ++ ++find_library(THEORA_enc_LIBRARY ++ NAMES ++ theoraenc ++ HINTS ++ "${computed_theora_root}/lib" ++ "${computed_theora_root}/lib64" ++ DOC "theora encoding library") ++mark_as_advanced(THEORA_enc_LIBRARY) ++ ++find_library(THEORA_dec_LIBRARY ++ NAMES ++ theoradec ++ HINTS ++ "${computed_theora_root}/lib" ++ "${computed_theora_root}/lib64" ++ DOC "theora decoding library") ++mark_as_advanced(THEORA_dec_LIBRARY) ++ ++include(FindPackageHandleStandardArgs) ++find_package_handle_standard_args(THEORA ++ REQUIRED_VARS THEORA_LIBRARY THEORA_enc_LIBRARY THEORA_dec_LIBRARY THEORA_INCLUDE_DIR) ++ ++if (THEORA_FOUND) ++ set(THEORA_LIBRARIES "${THEORA_LIBRARY}" "${THEORA_enc_LIBRARY}" "${THEORA_dec_LIBRARY}") ++ set(THEORA_INCLUDE_DIRS "${THEORA_INCLUDE_DIR}") ++ ++ if (NOT TARGET THEORA::THEORA) ++ add_library(THEORA::THEORA UNKNOWN IMPORTED) ++ set_target_properties(THEORA::THEORA PROPERTIES ++ IMPORTED_LOCATION "${THEORA_LIBRARY}" ++ INTERFACE_INCLUDE_DIRECTORIES ${THEORA_INCLUDE_DIR}) ++ endif () ++ ++ if (NOT TARGET THEORA::ENC) ++ add_library(THEORA::ENC UNKNOWN IMPORTED) ++ set_target_properties(THEORA::ENC PROPERTIES ++ IMPORTED_LOCATION "${THEORA_enc_LIBRARY}" ++ INTERFACE_INCLUDE_DIRECTORIES ${THEORA_INCLUDE_DIR}) ++ endif() ++ ++ if (NOT TARGET THEORA::DEC) ++ add_library(THEORA::DEC UNKNOWN IMPORTED) ++ set_target_properties(THEORA::DEC PROPERTIES ++ IMPORTED_LOCATION "${THEORA_dec_LIBRARY}" ++ INTERFACE_INCLUDE_DIRECTORIES ${THEORA_INCLUDE_DIR}) ++ endif() ++endif () ++ diff --git a/patch/ros-galactic-tvm-vendor.patch b/patch/ros-galactic-tvm-vendor.patch new file mode 100644 index 00000000..64d90434 --- /dev/null +++ b/patch/ros-galactic-tvm-vendor.patch @@ -0,0 +1,214 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e8a1cef..95efce6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -28,28 +28,21 @@ if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 14) + endif() + +-if(${ROS_VERSION} EQUAL 1) +- cmake_minimum_required(VERSION 2.8.3) ++cmake_minimum_required(VERSION 3.5) + +- # find dependencies +- find_package(catkin REQUIRED) +-elseif(${ROS_VERSION} EQUAL 2) +- cmake_minimum_required(VERSION 3.5) +- +- if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") +- add_compile_options(-Wall -Wextra -Wpedantic) +- endif() +- +- # find dependencies +- find_package(ament_cmake REQUIRED) ++if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") ++add_compile_options(-Wall -Wextra -Wpedantic) + endif() + ++# find dependencies ++find_package(ament_cmake REQUIRED) ++ + include(ExternalProject) + + set(PATCH_FILE ${CMAKE_CURRENT_SOURCE_DIR}/config.cmake.patch) +-if(ROS_VERSION EQUAL 2) +- set(PATCH_FILE ${CMAKE_CURRENT_SOURCE_DIR}/config.cmake.gpu.patch) +-endif() ++# if(ROS_VERSION EQUAL 2) ++# set(PATCH_FILE ${CMAKE_CURRENT_SOURCE_DIR}/config.cmake.gpu.patch) ++# endif() + + ExternalProject_Add(tvm-build + GIT_REPOSITORY https://github.com/apache/incubator-tvm +@@ -66,8 +59,8 @@ ExternalProject_Add(tvm-build + ExternalProject_Add_Step(tvm-build dmlc-build + DEPENDEES patch + WORKING_DIRECTORY /3rdparty/dmlc-core +- COMMAND ${CMAKE_COMMAND} --configure -DCMAKE_POSITION_INDEPENDENT_CODE=ON . +- COMMAND ${CMAKE_MAKE_PROGRAM} ++ COMMAND ${CMAKE_COMMAND} -DCMAKE_POSITION_INDEPENDENT_CODE=ON . ++ COMMAND make VERBOSE=1 + BYPRODUCTS libdmlc.a + ) + +@@ -85,89 +78,40 @@ add_library(dmlc STATIC IMPORTED + IMPORTED_LOCATION ${SOURCE_DIR}/3rdparty/dmlc-core + ) + +-if(${ROS_VERSION} EQUAL 1) +- catkin_package( +- INCLUDE_DIRS include +- LIBRARIES +- tvm +- tvm_runtime +- dmlc +- EXPORTED_TARGETS tvm-build +- ) +- +- add_custom_command(TARGET tvm-build POST_BUILD +- COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_SOURCE_DIR}/include/tvm_vendor/tvm +- COMMAND ${CMAKE_COMMAND} -E create_symlink ${SOURCE_DIR}/include/tvm/runtime/ ${CMAKE_CURRENT_SOURCE_DIR}/include/tvm_vendor/tvm/runtime +- COMMAND ${CMAKE_COMMAND} -E make_directory ${CATKIN_DEVEL_PREFIX}/lib +- COMMAND ${CMAKE_COMMAND} -E copy ${SOURCE_DIR}/libtvm.so ${CATKIN_DEVEL_PREFIX}/lib +- COMMAND ${CMAKE_COMMAND} -E copy ${SOURCE_DIR}/libtvm_runtime.so ${CATKIN_DEVEL_PREFIX}/lib +- COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_SOURCE_DIR}/include/tvm_vendor/dlpack +- COMMAND ${CMAKE_COMMAND} -E create_symlink ${SOURCE_DIR}/3rdparty/dlpack/include/dlpack/dlpack.h ${CMAKE_CURRENT_SOURCE_DIR}/include/tvm_vendor/dlpack/dlpack.h +- COMMAND ${CMAKE_COMMAND} -E create_symlink ${SOURCE_DIR}/3rdparty/dlpack/contrib/dlpack/dlpackcpp.h ${CMAKE_CURRENT_SOURCE_DIR}/include/tvm_vendor/dlpack/dlpackcpp.h +- COMMAND ${CMAKE_COMMAND} -E create_symlink ${SOURCE_DIR}/3rdparty/dmlc-core/include/dmlc/ ${CMAKE_CURRENT_SOURCE_DIR}/include/tvm_vendor/dmlc +- COMMAND ${CMAKE_COMMAND} -E create_symlink ${SOURCE_DIR}/3rdparty/dmlc-core/libdmlc.a ${CATKIN_DEVEL_PREFIX}/lib/libdmlc.a +- ) +- +- install(DIRECTORY ${SOURCE_DIR}/include/tvm/runtime +- DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}/tvm +- ) +- +- install( +- FILES +- ${SOURCE_DIR}/libtvm.so +- ${SOURCE_DIR}/libtvm_runtime.so +- DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +- ) +- +- install( +- FILES +- ${SOURCE_DIR}/3rdparty/dlpack/include/dlpack/dlpack.h +- ${SOURCE_DIR}/3rdparty/dlpack/contrib/dlpack/dlpackcpp.h +- DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}/dlpack +- ) +- +- install(DIRECTORY ${SOURCE_DIR}/3rdparty/dmlc-core/include/dmlc +- DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} +- ) +- +- install(FILES ${SOURCE_DIR}/3rdparty/dmlc-core/libdmlc.a +- DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +- ) +-elseif(${ROS_VERSION} EQUAL 2) +- ament_export_include_directories(include include/tvm_vendor) +- ament_export_libraries(tvm tvm_runtime) +- +- install(DIRECTORY ${SOURCE_DIR}/include/tvm/runtime/ +- DESTINATION include/${PROJECT_NAME}/tvm/runtime +- ) +- +- install( +- FILES +- ${SOURCE_DIR}/libtvm.so +- ${SOURCE_DIR}/libtvm_runtime.so +- DESTINATION lib +- ) +- +- install( +- FILES +- ${SOURCE_DIR}/3rdparty/dlpack/include/dlpack/dlpack.h +- ${SOURCE_DIR}/3rdparty/dlpack/contrib/dlpack/dlpackcpp.h +- DESTINATION include/${PROJECT_NAME}/dlpack +- ) +- +- install(DIRECTORY ${SOURCE_DIR}/3rdparty/dmlc-core/include/dmlc +- DESTINATION include/${PROJECT_NAME} +- ) +- +- install(FILES ${SOURCE_DIR}/3rdparty/dmlc-core/libdmlc.a +- DESTINATION lib +- ) +- +- install( +- FILES +- cmake/tvm_runtimeConfig.cmake +- cmake/tvmConfig.cmake +- DESTINATION share/${PROJECT_NAME}/cmake) +- +- ament_package() +-endif() ++ ++ament_export_include_directories(include include/tvm_vendor) ++ament_export_libraries(tvm tvm_runtime) ++ ++install(DIRECTORY ${SOURCE_DIR}/include/tvm/runtime/ ++DESTINATION include/${PROJECT_NAME}/tvm/runtime ++) ++ ++install( ++FILES ++ ${SOURCE_DIR}/libtvm.so ++ ${SOURCE_DIR}/libtvm_runtime.so ++DESTINATION lib ++) ++ ++install( ++FILES ++ ${SOURCE_DIR}/3rdparty/dlpack/include/dlpack/dlpack.h ++ ${SOURCE_DIR}/3rdparty/dlpack/contrib/dlpack/dlpackcpp.h ++DESTINATION include/${PROJECT_NAME}/dlpack ++) ++ ++install(DIRECTORY ${SOURCE_DIR}/3rdparty/dmlc-core/include/dmlc ++DESTINATION include/${PROJECT_NAME} ++) ++ ++install(FILES ${SOURCE_DIR}/3rdparty/dmlc-core/libdmlc.a ++DESTINATION lib ++) ++ ++install( ++FILES ++ cmake/tvm_runtimeConfig.cmake ++ cmake/tvmConfig.cmake ++DESTINATION share/${PROJECT_NAME}/cmake) ++ ++ament_package() +diff --git a/config.cmake.patch b/config.cmake.patch +index 64d8cf9..83d5f29 100644 +--- a/config.cmake.patch ++++ b/config.cmake.patch +@@ -11,4 +11,28 @@ index 9754385fa..530c4bee1 100644 + + # Whether to use MKL + # Possible values: +- ++diff --git a/cmake/modules/contrib/BLAS.cmake b/cmake/modules/contrib/BLAS.cmake ++index 06c875588..05a65e208 100644 ++--- a/cmake/modules/contrib/BLAS.cmake +++++ b/cmake/modules/contrib/BLAS.cmake ++@@ -19,6 +19,20 @@ if(USE_BLAS STREQUAL "openblas") ++ find_library(BLAS_LIBRARY openblas) ++ list(APPEND TVM_RUNTIME_LINKER_LIBS ${BLAS_LIBRARY}) ++ list(APPEND RUNTIME_SRCS src/runtime/contrib/cblas/cblas.cc) +++ +++ find_path(CBLAS_INCLUDE_DIRS +++ NAMES cblas.h +++ HINTS ${CBLAS_HINTS} +++ PATH_SUFFIXES +++ include inc include/x86_64 include/x64 +++ openblas/include include/blis blis/include blis/include/blis +++ Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Versions/Current/Headers +++ PATHS ${CBLAS_PATHS} +++ DOC "Netlib BLAS include header cblas.h" +++ ) +++ +++ include_directories(${CBLAS_INCLUDE_DIRS}) +++ ++ message(STATUS "Using BLAS library " ${BLAS_LIBRARY}) ++ elseif(USE_BLAS STREQUAL "atlas" OR USE_BLAS STREQUAL "blas") ++ find_library(BLAS_LIBRARY cblas) diff --git a/patch/ros-galactic-ublox-dgnss-node.patch b/patch/ros-galactic-ublox-dgnss-node.patch new file mode 100644 index 00000000..40af99a6 --- /dev/null +++ b/patch/ros-galactic-ublox-dgnss-node.patch @@ -0,0 +1,30 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7e849fe..427c5cf 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -26,6 +26,7 @@ find_package(ublox_ubx_msgs REQUIRED) + find_package(ublox_ubx_interfaces REQUIRED) + + find_package(PkgConfig REQUIRED) ++pkg_check_modules(libudev REQUIRED libudev) + pkg_check_modules(libusb REQUIRED libusb-1.0) + + include_directories(include SYSTEM) +@@ -45,11 +46,14 @@ ament_target_dependencies(ublox_dgnss_components + std_msgs + ublox_ubx_msgs + ublox_ubx_interfaces ++ libusb ++ libudev + ) + +-target_link_libraries(ublox_dgnss_components +- usb-1.0 +-) ++# target_link_libraries(ublox_dgnss_components ++# ${libusb_LIBRARIES} ++# ${libudev_LIBRARIES} ++# ) + + rclcpp_components_register_node(ublox_dgnss_components PLUGIN "ublox_dgnss::UbloxDGNSSNode" EXECUTABLE ublox_dgnss_node) + diff --git a/patch/ros-galactic-usb-cam.patch b/patch/ros-galactic-usb-cam.patch new file mode 100644 index 00000000..e2a31ea0 --- /dev/null +++ b/patch/ros-galactic-usb-cam.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6c7abf3..3737f94 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -15,8 +15,8 @@ ament_auto_find_build_dependencies() + + ## pkg-config libraries + find_package(PkgConfig REQUIRED) +-pkg_check_modules(avcodec libavcodec REQUIRED) +-pkg_check_modules(swscale libswscale REQUIRED) ++pkg_search_module(avcodec libavcodec REQUIRED) ++pkg_search_module(swscale libswscale REQUIRED) + + include_directories(include + ${avcodec_INCLUDE_DIRS} +@@ -35,8 +35,8 @@ ament_auto_add_library(${PROJECT_NAME}_node SHARED + + target_link_libraries(${PROJECT_NAME}_node + ${PROJECT_NAME} +- ${avcodec_LIBRARIES} +- ${swscale_LIBRARIES} ++ ${avcodec_LINK_LIBRARIES} ++ ${swscale_LINK_LIBRARIES} + # TODO(lucasw) should this have been in libavcodec? + #avutil + ) diff --git a/patch/ros-noetic-yaml-cpp-vendor.patch b/patch/ros-noetic-yaml-cpp-vendor.patch new file mode 100644 index 00000000..5f007906 --- /dev/null +++ b/patch/ros-noetic-yaml-cpp-vendor.patch @@ -0,0 +1,69 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5e0719f..1d8d85e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,8 +8,6 @@ option(FORCE_BUILD_VENDOR_PKG + + find_package(ament_cmake REQUIRED) + +-set(PACKAGE_VERSION "1.0.0") +- + macro(build_yaml_cpp) + set(extra_cmake_args) + +@@ -24,9 +22,7 @@ macro(build_yaml_cpp) + list(APPEND extra_cmake_args "-DYAML_CPP_BUILD_TESTS=OFF") + list(APPEND extra_cmake_args "-DYAML_CPP_BUILD_TOOLS=OFF") + list(APPEND extra_cmake_args "-DYAML_CPP_BUILD_CONTRIB=OFF") +- list(APPEND extra_cmake_args "-DBUILD_SHARED_LIBS=ON") +- list(APPEND extra_cmake_args "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}") +- list(APPEND extra_cmake_args "-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}") ++ list(APPEND extra_cmake_args "-DYAML_BUILD_SHARED_LIBS=ON") + list(APPEND extra_cmake_args "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}") + list(APPEND extra_cmake_args "-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}") + +@@ -41,14 +37,9 @@ macro(build_yaml_cpp) + endif() + + include(ExternalProject) +- # This specific version (past the current latest release of 0.5.3) is required to make +- # yaml-cpp relocatable, hopefully it is released again soon. +- # See: https://github.com/jbeder/yaml-cpp/pull/538 +- # Latest release fails to compile on recent visual studio (VS2017 v15.8.1) +- # See: https://github.com/jbeder/yaml-cpp/pull/597 +- ExternalProject_Add(yaml_cpp-0f9a586 +- URL https://github.com/jbeder/yaml-cpp/archive/0f9a586ca1dc29c2ecb8dd715a315b93e3f40f79.zip +- URL_MD5 ec76c27ebd07d5178cbe85b773df8e62 ++ ExternalProject_Add(yaml_cpp-0.7.0 ++ URL https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-0.7.0.tar.gz ++ URL_MD5 74d646a3cc1b5d519829441db96744f0 + TIMEOUT 600 + LOG_CONFIGURE ${should_log} + LOG_BUILD ${should_log} +@@ -71,7 +62,7 @@ endmacro() + # NO_CMAKE_PACKAGE_REGISTRY used to avoid finding the library downloaded in WORKSPACE B + # when building workspace A. + # This should only find a system installed yaml-cpp and thus the environment hook isn't needed. +-find_package(yaml-cpp 0.6 QUIET NO_CMAKE_PACKAGE_REGISTRY) ++find_package(yaml-cpp QUIET NO_CMAKE_PACKAGE_REGISTRY) + if(FORCE_BUILD_VENDOR_PKG OR NOT yaml-cpp_FOUND) + build_yaml_cpp() + +diff --git a/yaml_cpp_vendor-extras.cmake.in b/yaml_cpp_vendor-extras.cmake.in +index a09422d..deac98c 100644 +--- a/yaml_cpp_vendor-extras.cmake.in ++++ b/yaml_cpp_vendor-extras.cmake.in +@@ -1,11 +1,11 @@ +-find_package(yaml-cpp 0.6 QUIET) ++find_package(yaml-cpp QUIET) + + if(NOT yaml-cpp_FOUND) + # add the local Modules directory to the modules path + if(WIN32) + set(yaml-cpp_DIR "${@PROJECT_NAME@_DIR}/../../../opt/yaml_cpp_vendor/CMake") + else() +- set(yaml-cpp_DIR "${@PROJECT_NAME@_DIR}/../../../opt/yaml_cpp_vendor/lib/cmake/yaml-cpp") ++ set(yaml-cpp_DIR "${@PROJECT_NAME@_DIR}/../../../opt/yaml_cpp_vendor/share/cmake/yaml-cpp") + endif() + message(STATUS "Setting yaml-cpp_DIR to: '${yaml-cpp_DIR}'") + diff --git a/robostack.yaml b/robostack.yaml new file mode 100644 index 00000000..42fe51b3 --- /dev/null +++ b/robostack.yaml @@ -0,0 +1,886 @@ +acl: + robostack: + linux: [libacl] + osx: [] + win64: [] +alsa-oss: + robostack: [alsa-lib] +apr: + robostack: [apr] +armadillo: + robostack: [armadillo] +asio: + robostack: [asio] +assimp: + robostack: [assimp] +assimp-dev: + robostack: [assimp] +avahi-daemon: + robostack: [python-avahi] +benchmark: + robostack: [benchmark] +binutils: + robostack: + linux: [binutils] + osx: [binutils] + win64: [] +bison: + robostack: [bison] +boost: + robostack: [boost] +bullet: + robostack: [bullet] +bzip2: + robostack: [bzip2] +ca-certificates: + robostack: [ca-certificates] +cmake: + robostack: [cmake] +coinor-libcbc-dev: + robostack: [coin-or-cbc] +coinor-libcgl-dev: + robostack: [coin-or-cgl] +coinor-libclp-dev: + robostack: [coin-or-clp] +coinor-libcoinutils-dev: + robostack: [coin-or-utils] +coinor-libipopt-dev: + robostack: [ipopt] +collada-dom: + robostack: [collada-dom] +cppcheck: + robostack: [cppcheck] +cppunit: + robostack: + linux: [cppunit] + osx: [cppunit] + win64: [] +cppzmq: + robostack: [cppzmq] +curl: + robostack: [libcurl] +cython: + robostack: [cython] +doxygen: + robostack: [doxygen] +eigen: + robostack: [eigen] +emacs: + robostack: [emacs] +ffmpeg: + robostack: [ffmpeg] +flac: + robostack: [libflac] +flex: + robostack: [flex] +fmt: + robostack: [fmt] +g++-static: + robostack: [] +gawk: + robostack: [gawk] +gazebo: + robostack: [gazebo] +gazebo11: + robostack: [gazebo] +gazebo9: + robostack: [gazebo] +geographiclib: + robostack: [geographiclib-cpp] +geographiclib-tools: + robostack: [geographiclib-cpp] +git: + robostack: [git] +glut: + robostack: + linux: [freeglut] + osx: [] + win64: [freeglut] +google-mock: + robostack: [gmock] +graphicsmagick: + robostack: [graphicsmagick] +graphviz: + robostack: [graphviz] +gstreamer1.0: + robostack: [gstreamer] +gstreamer1.0-alsa: + robostack: [gstreamer] +gstreamer1.0-plugins-base: + robostack: [gst-plugins-base] +gstreamer1.0-plugins-good: + robostack: [gst-plugins-good] +gstreamer1.0-plugins-ugly: + robostack: [gst-plugins-ugly] +gtest: + robostack: [gtest] +gtk2: + robostack: [gtk2] +gtk3: + robostack: [libglib, glib, gtk3, harfbuzz, libxcb, pthread-stubs, xorg-libxau, xorg-libxi, + xorg-libxrandr, xorg-libxcursor, xorg-libxtst, xorg-libxcomposite, xorg-libxdamage, + xorg-libxinerama, xorg-xineramaproto, epoxy, REQUIRE_GL] +ignition-common4: + robostack: [libignition-common4] +ignition-gazebo3: + robostack: [libignition-gazebo5] +ignition-gazebo5: + robostack: [libignition-gazebo5] +ignition-gui5: + robostack: [libignition-gui5] +ignition-math6: + robostack: [libignition-math6] +ignition-msgs5: + robostack: [libignition-msgs5] +ignition-msgs7: + robostack: [libignition-msgs7] +ignition-rendering5: + robostack: [libignition-rendering5] +ignition-transport8: + robostack: [libignition-transport8] +ignition-transport10: + robostack: [libignition-transport10] +java: + robostack: [openjdk] +jupyter-notebook: + robostack: [notebook] +ipython3: + robostack: [ipython] +kitchen: + robostack: [kitchen] +lcov: + robostack: [lcov] +leveldb: + robostack: [leveldb] +libblas-dev: + robostack: [libblas, libcblas] +libboost-chrono-dev: + robostack: [boost-cpp] +libboost-date-time: + robostack: [boost-cpp] +libboost-date-time-dev: + robostack: [boost-cpp] +libboost-dev: + robostack: [boost-cpp] +libboost-filesystem: + robostack: [boost-cpp] +libboost-filesystem-dev: + robostack: [boost-cpp] +libboost-iostreams-dev: + robostack: [boost-cpp] +libboost-program-options: + robostack: [boost-cpp] +libboost-program-options-dev: + robostack: [boost-cpp] +libboost-python: + robostack: [boost] +libboost-python-dev: + robostack: [boost] +libboost-regex-dev: + robostack: [boost-cpp] +libboost-serialization: + robostack: [boost-cpp] +libboost-serialization-dev: + robostack: [boost-cpp] +libboost-system: + robostack: [boost-cpp] +libboost-system-dev: + robostack: [boost-cpp] +libboost-thread: + robostack: [boost-cpp] +libboost-thread-dev: + robostack: [boost-cpp] +libcairo2-dev: + robostack: [cairo] +libcap-dev: + robostack: + linux: [libcap] + osx: [] + win64: [] +libccd-dev: + robostack: [libccd] +libceres-dev: + robostack: [ceres-solver] +libclang-dev: + robostack: [libclang] +libconsole-bridge-dev: + robostack: [console_bridge] +libcunit-dev: + robostack: [cunit] +libdc1394-dev: + robostack: [libdc1394] +libfcl-dev: + robostack: [fcl] +libffi-dev: + robostack: [libffi] +libflann-dev: + robostack: [flann] +libfltk-dev: + robostack: [fltk] +libfreenect-dev: + robostack: [] +libfreetype6: + robostack: [freetype] +libfreetype6-dev: + robostack: [freetype] +libftdi-dev: + robostack: [libftdi, libusb] +libgazebo11-dev: + robostack: [gazebo] +libgazebo9-dev: + robostack: [gazebo] +libgdal-dev: + robostack: [libgdal] +libgeos++-dev: + robostack: [geos] +libgflags-dev: + robostack: [gflags] +libglew-dev: + robostack: [glew] +libglfw3-dev: + robostack: [glfw 3.*] +libglu-dev: + robostack: + linux: [libglu] + osx: [] + win64: [] +libgoogle-glog-dev: + robostack: [glog] +libgpgme-dev: + robostack: + linux: [gpgme] + osx: [gpgme] + win64: [] +libgps: + robostack: [gpsd] +libgsl: + robostack: [gsl] +libgstreamer-plugins-base1.0-dev: + robostack: [gst-plugins-base] +libgstreamer1.0-dev: + robostack: [gstreamer] +libgts: + robostack: [gts] +libhdf5-dev: + robostack: [hdf5] +libi2c-dev: + robostack: [libi2c] +libjpeg: + robostack: [libjpeg-turbo] +libjsoncpp: + robostack: [jsoncpp] +libjsoncpp-dev: + robostack: [jsoncpp] +liblapack-dev: + robostack: [liblapack] +libmicrohttpd: + robostack: [libmicrohttpd] +libncurses-dev: + robostack: + linux: [ncurses] + osx: [ncurses] + win64: [] +libnl-3: + robostack: [libnl 3.*] +libnl-3-dev: + robostack: [libnl 3.*] +libnlopt-cxx-dev: + robostack: [nlopt] +libnlopt-dev: + robostack: [nlopt] +libnlopt0: + robostack: [nlopt] +libogg: + robostack: [libogg] +libogre: + robostack: [ogre] +libogre-dev: + robostack: [ogre] +libomp-dev: + robostack: + linux: [libgomp] + osx: [llvm-openmp] + win64: [] +libopenblas-dev: + robostack: [libblas] +libopencv-dev: + robostack: [py-opencv, libopencv, REQUIRE_OPENGL] +libopenni-dev: + robostack: [] +liborocos-kdl: + robostack: [orocos-kdl] +liborocos-kdl-dev: + robostack: [orocos-kdl] +libpcap: + robostack: [libpcap] +libpcl-all: + robostack: [pcl] +libpcl-all-dev: + robostack: [pcl] +libpng-dev: + robostack: [libpng] +libpoco-dev: + robostack: [poco] +libpqxx: + robostack: [libpqxx] +libpqxx-dev: + robostack: [libpqxx] +libqglviewer2-qt5: + robostack: [libqglviewer] +libqglviewer-dev-qt5: + robostack: [libqglviewer] +libqhull: + robostack: [qhull] +libqt5-core: + robostack: + linux: [qt 5.12] + osx: [qt-main] + win64: [qt 5] +libqt5-gui: + robostack: + linux: [qt 5.12, REQUIRE_OPENGL] + osx: [qt-main, REQUIRE_OPENGL] + win64: [qt 5] +libqt5-opengl: + robostack: + linux: [qt 5.12, REQUIRE_OPENGL] + osx: [qt-main, REQUIRE_OPENGL] + win64: [qt 5] +libqt5-opengl-dev: + robostack: + linux: [qt 5.12, REQUIRE_OPENGL] + osx: [qt-main, REQUIRE_OPENGL] + win64: [qt 5] +libqt5-widgets: + robostack: + linux: [qt 5.12, REQUIRE_OPENGL] + osx: [qt-main, REQUIRE_OPENGL] + win64: [qt 5] +libqt5x11extras5-dev: + robostack: + linux: [qt 5.12, REQUIRE_OPENGL] + osx: [qt-main, REQUIRE_OPENGL] + win64: [qt 5] +libreadline: + robostack: [readline] +libreadline-dev: + robostack: [readline] +libsndfile1-dev: + robostack: [libsndfile] +libspnav-dev: + robostack: [libspnav] +libsqlite3-dev: + robostack: [sqlite 3.*] +libssl-dev: + robostack: [openssl] +libtheora: + robostack: [libtheora] +libtool: + robostack: [libtool] +libturbojpeg: + robostack: [libjpeg-turbo] +libudev-dev: + robostack: [libusb] +liburdfdom-dev: + robostack: [urdfdom] +liburdfdom-headers-dev: + robostack: [urdfdom_headers] +liburdfdom-tools: + robostack: [urdfdom] +libusb-1.0: + robostack: [libusb] +libusb-1.0-dev: + robostack: [libusb] +libusb-dev: + robostack: [libusb] +libuvc-dev: + robostack: [libuvc, libusb] +libvtk: + robostack: [vtk] +libvtk-qt: + robostack: [vtk] +libx11: + robostack: [xorg-libx11, REQUIRE_OPENGL] +libx11-dev: + robostack: [xorg-libx11, REQUIRE_OPENGL] +libxaw: + robostack: + linux: [xorg-libxaw] + osx: [xorg-libxaw] + win64: [] +libxext: + robostack: [xorg-libxext] +libxi-dev: + robostack: [xorg-libxi] +libxml2: + robostack: [libxml2] +libxml2-utils: + robostack: [libxml2] +libxmlrpc-c++: + robostack: [xmlrpc-c] +libxmu-dev: + robostack: [xorg-libxmu] +libxrandr: + robostack: + linux: [xorg-libxrandr] + osx: [xorg-libxrandr] + win64: [] +libxt-dev: + robostack: [xorg-libxt] +libxxf86vm: + robostack: [REQUIRE_OPENGL] +libzmq3-dev: + robostack: [zeromq, cppzmq] +libzstd-dev: + robostack: [zstd] +linux-kernel-headers: + robostack: [] +log4cxx: + robostack: [log4cxx] +lua5.2-dev: + robostack: [lua] +lz4: + robostack: [lz4] +maven: + robostack: [maven] +mongodb: + robostack: [mongodb] +mosquitto: + robostack: [paho-mqtt] +msgpack: + robostack: [msgpack-python] +muparser: + robostack: [muparser] +netpbm: + robostack: [netpbm] +nlopt: + robostack: [nlopt] +ocl-icd-opencl-dev: + robostack: [ocl-icd] +opengl: + robostack: + linux: [REQUIRE_OPENGL] + osx: [REQUIRE_OPENGL] + win64: [] +openssl: + robostack: [openssl] +pcre: + robostack: [pcre] +pkg-config: + robostack: [pkg-config] +portaudio19-dev: + robostack: [portaudio] +postgresql: + robostack: [postgresql] +proj: + robostack: [proj] +protobuf: + robostack: [libprotobuf, protobuf] +protobuf-dev: + robostack: [libprotobuf, protobuf] +pugixml-dev: + robostack: [pugixml] +pycodestyle: + robostack: [pycodestyle] +pydocstyle: + robostack: [pydocstyle] +pydrive-pip: + robostack: [pydrive] +pyflakes3: + robostack: [pyflakes] +python: + robostack: [python] +python-argparse: + robostack: [] +python-autobahn: + robostack: [autobahn] +python-bson: + robostack: [pymongo] +python-cairo: + robostack: [pycairo] +python-catkin-pkg: + robostack: [catkin_pkg] +python-catkin-pkg-modules: + robostack: [catkin_pkg] +python-chainer-pip: + robostack: [chainer] +python-coverage: + robostack: [coverage] +python-crypto: + robostack: [pycrypto] +python-defusedxml: + robostack: [defusedxml] +python-dev: + robostack: [python] +python-dlib: + robostack: [dlib] +python-empy: + robostack: [empy] +python-enum34: + robostack: [enum34] +python-freezegun-pip: + robostack: [freezegun] +python-gdown-pip: + robostack: [gdown] +python-gnupg: + robostack: [python-gnupg] +python-imaging: + robostack: [pillow] +python-inject-pip: + robostack: [inject] +python-lxml: + robostack: [lxml] +python-matplotlib: + robostack: [matplotlib-base] +python-mock: + robostack: [mock] +python-netifaces: + robostack: [netifaces] +python-nose: + robostack: [nose] +python-numpy: + robostack: [numpy] +python-opencv: + robostack: [py-opencv, libopencv] +python-opengl: + robostack: [pyopengl, REQUIRE_OPENGL] +python-paramiko: + robostack: [paramiko] +python-psutil: + robostack: [psutil] +python-pyassimp: + robostack: [assimp] +python-pycryptodome: + robostack: [pycryptodome, pycryptodomex] +python-pydot: + robostack: [pydot] +python-pygithub3: + robostack: [pygithub] +python-pygraphviz: + robostack: [pygraphviz] +python-pyusb-pip: + robostack: [pyusb] +python-qt5-bindings: + robostack: + linux: [pyqt 5] + osx: [pyqt 5, pyqt-builder] + win64: [pyqt 5] +python-rosdep: + robostack: [rosdep] +python-rosdep-modules: + robostack: [rosdep] +python-rospkg: + robostack: [rospkg] +python-rospkg-modules: + robostack: [rospkg] +python-setuptools: + robostack: [setuptools] +python-sip: + robostack: [sip] +python-six: + robostack: [six] +python-slacker-cli: + robostack: [slacker] +python-speechrecognition-pip: + robostack: [speechrecognition] +python-tabulate-pip: + robostack: [tabulate] +python-tk: + robostack: [tk] +python-tornado: + robostack: [tornado] +python-twisted-core: + robostack: [twisted] +python-wxtools: + robostack: [wxpython] +python-yaml: + robostack: [pyyaml] +python3: + robostack: [python] +python3-argcomplete: + robostack: [argcomplete] +python3-autobahn: + robostack: [autobahn] +python3-bson: + robostack: [pymongo] +python3-cairo: + robostack: [pycairo] +python3-catkin-pkg: + robostack: [catkin_pkg] +python3-catkin-pkg-modules: + robostack: [catkin_pkg] +python3-catkin-tools: + robostack: [catkin_tools] +python3-cherrypy3: + robostack: [cherrypy] +python3-click: + robostack: [click] +python3-collada: + robostack: [pycollada] +python3-colorama: + robostack: [colorama] +python3-coverage: + robostack: [coverage] +python3-cryptography: + robostack: [cryptography] +python3-defusedxml: + robostack: [defusedxml] +python3-dev: + robostack: [python] +python3-docopt: + robostack: [docopt] +python3-docutils: + robostack: [docutils] +python3-empy: + robostack: [empy] +python3-flake8: + robostack: [flake8] +python3-future: + robostack: [future] +python3-github: + robostack: [pygithub] +python3-github3: + robostack: [pygithub] +python3-gnupg: + robostack: [python-gnupg] +python3-grpc-tools: + robostack: [grpcio-tools] +python3-grpcio: + robostack: [grpcio] +python3-h5py: + robostack: [h5py] +python3-ifcfg: + robostack: [ifcfg] +python3-imageio: + robostack: [imageio] +python3-importlib-metadata: + robostack: [importlib-metadata] +python3-importlib-resources: + robostack: [importlib_resources] +python3-kitchen: + robostack: [kitchen] +python3-lark-parser: + robostack: [lark-parser] +python3-lxml: + robostack: [lxml] +python3-matplotlib: + robostack: [matplotlib-base] +python3-mechanize: + robostack: [mechanize] +python3-mock: + robostack: [mock] +python3-msgpack: + robostack: [msgpack-python] +python3-mypy: + robostack: [mypy] +python3-netifaces: + robostack: [netifaces] +python3-nose: + robostack: [nose] +python3-numpy: + robostack: [numpy] +python3-opencv: + robostack: [py-opencv, libopencv] +python3-opengl: + robostack: [pyopengl, REQUIRE_OPENGL] +python3-packaging: + robostack: [packaging] +python3-pandas: + robostack: [pandas] +python3-paramiko: + robostack: [paramiko] +python3-pep8: + robostack: [pep8] +python3-pil: + robostack: [pillow] +python3-pip: + robostack: [pip] +python3-pkg-resources: + robostack: [] +python3-psutil: + robostack: [psutil] +python3-pyassimp: + robostack: [assimp] +python3-pycodestyle: + robostack: [pycodestyle] +python3-pycryptodome: + robostack: [pycryptodome, pycryptodomex] +python3-pydot: + robostack: [pydot] +python3-pygraphviz: + robostack: [pygraphviz] +python3-pykdl: + robostack: [python-orocos-kdl] +python3-pymongo: + robostack: [pymongo] +python3-pyproj: + robostack: [pyproj] +python3-pytest: + robostack: [pytest] +python3-pytest-cov: + robostack: [pytest-cov] +python3-pytest-mock: + robostack: [pytest-mock] +python3-qt5-bindings: + robostack: + linux: [pyqt 5.12] + osx: [pyqt 5, pyqt-builder] + win64: [pyqt 5] +python3-qt5-bindings-gl: + robostack: + linux: [pyqt 5.12] + osx: [pyqt 5, pyqt-builder] + win64: [pyqt 5] +python3-qt5-bindings-webkit: + robostack: + linux: [pyqt 5.12] + osx: [pyqt 5, pyqt-builder] + win64: [pyqt 5] +python3-requests: + robostack: [requests] +python3-requests-oauthlib: + robostack: [requests-oauthlib] +python3-rosdep: + robostack: [rosdep] +python3-rosdep-modules: + robostack: [rosdep] +python3-rosdistro-modules: + robostack: [rosdistro] +python3-rospkg: + robostack: [rospkg] +python3-rospkg-modules: + robostack: [rospkg] +python3-ruamel.yaml: + robostack: [ruamel.yaml] +python3-scipy: + robostack: [scipy] +python3-serial: + robostack: [pyserial] +python3-setuptools: + robostack: [setuptools] +python3-simplejson: + robostack: [simplejson] +python3-six: + robostack: [six] +python3-shapely: + robostack: [shapely] +python3-skimage: + robostack: [scikit-image] +python3-sklearn: + robostack: [scikit-learn] +python3-sphinx: + robostack: [sphinx] +python3-termcolor: + robostack: [termcolor] +python3-texttable: + robostack: [texttable] +python3-tk: + robostack: [tk] +python3-tornado: + robostack: [tornado] +python3-twisted: + robostack: [twisted] +python3-usb: + robostack: [pyusb] +python3-venv: + robostack: [virtualenv, pip, pip-tools, setuptools] +python3-websocket: + robostack: [websocket-client] +python3-yaml: + robostack: [pyyaml] +python3-zmq: + robostack: [pyzmq] +qt5-image-formats-plugins: + robostack: + linux: [qt 5.12] + osx: [qt-main] + win64: [qt 5] +qt5-qmake: + robostack: + linux: [qt 5.12] + osx: [qt-main] + win64: [qt 5] +qtbase5-dev: + robostack: + linux: [qt 5.12, REQUIRE_OPENGL] + osx: [qt-main, REQUIRE_OPENGL] + win64: [qt 5] +roboticstoolbox-python: + robostack: [roboticstoolbox-python] +rsync: + robostack: [rsync] +rti-connext-dds-5.3.1: + robostack: [] +sbcl: + robostack: + linux: [sbcl] + osx: [sbcl] + win64: [] +screen: + robostack: [screen] +sdformat: + robostack: [libsdformat11] +sdl: + robostack: [sdl] +sdl-image: + robostack: [sdl_image] +sdl2: + robostack: [sdl2] +socat: + robostack: [socat] +spacenavd: + robostack: [libspnav] +spdlog: + robostack: [spdlog] +sshpass: + robostack: [sshpass] +subversion: + robostack: [subversion] +suitesparse: + robostack: [suitesparse] +swig: + robostack: [swig] +sysstat: + robostack: [sysstat] +tango-icon-theme: + robostack: [] +tbb: + robostack: [tbb, tbb-devel] +time: + robostack: [time] +tinyxml: + robostack: [tinyxml] +tinyxml2: + robostack: [tinyxml2] +udev: + robostack: [libusb] +uncrustify: + robostack: [uncrustify] +unzip: + robostack: [unzip] +uuid: + robostack: + linux: [libuuid] + osx: [] + win64: [] +virtualenv: + robostack: [virtualenv] +wget: + robostack: [wget] +wx-common: + robostack: [wxpython] +wxpython: + robostack: [wxpython] +wxwidgets: + robostack: [wxpython] +x11-dev: + robostack: [xorg-libx11, REQUIRE_OPENGL] +yaml: + robostack: [yaml, yaml-cpp] +yaml-cpp: + robostack: [yaml-cpp] +zbar: + robostack: [zbar] +zlib: + robostack: [zlib] + diff --git a/vinca_linux_64.yaml b/vinca_linux_64.yaml new file mode 100644 index 00000000..9e046863 --- /dev/null +++ b/vinca_linux_64.yaml @@ -0,0 +1,359 @@ +ros_distro: humble + +# mapping for package keys +conda_index: + - robostack.yaml + - packages-ignore.yaml + +build_number: 3 + +mutex_package: ros2-distro-mutex 0.1 humble + +skip_all_deps: false + +# If full rebuild, the build number of the existing package has +# to match the selected build number for skipping +full_rebuild: true + +packages_skip_by_deps: + # - nav2-rotation-shim-controller + # - rviz + # - diagnostic_updater + +packages_remove_from_deps: + - cartographer + - warehouse_ros_mongo + # - stage-ros + # - python_qt_binding + # - joint_state_publisher_gui + # - stage + +skip_existing: + - https://conda.anaconda.org/robostack-humble/ + +packages_select_by_deps: + # only subset of packages to reduce maintainer load + - ament + # - ros_base + + # - rosbridge_suite + # - rviz2 + # - desktop + # - behaviortree_cpp_v3 + # - navigation2 + # - moveit + # - ros_workspace + # - control_toolbox + # - robot_localization + # - ros1_bridge + # - velodyne + + # Used to work, now needs fixes + # - rtabmap + # - webots-ros2 + # - webots-ros2-abb + # - webots-ros2-core + # - webots-ros2-demos + # - webots-ros2-epuck + # - webots-ros2-examples + # - webots-ros2-importer + # - webots-ros2-msgs + # - webots-ros2-tesla + # - webots-ros2-tiago + # - webots-ros2-turtlebot + # - webots-ros2-tutorials + # - webots-ros2-universal-robot + # - webots-ros2-ur-e-description + # - webots_ros2 + + # needs a rebuild of ros-noetic first + # - ros1-rosbag-storage-vendor + + # build locally but not on CI; for now uploaded from local + # - popf + # - ros-ign-bridge + # - ros-ign-image + + # working + # - sbg_driver + # - ruckig + # - rosbridge-msgs + # - rosbridge-library + # - joint-state-broadcaster + # - joint-state-publisher + # - joint-trajectory-controller + # - xacro + # - ros2launch-security + # - picknik-ament-copyright + # - nodl-to-policy + # - geometry-tutorials + # - sdformat-urdf + # - cartographer-ros + # - plansys2-bt-actions + # - plansys2-terminal + # - nav2-system-tests + # - lanelet2 + # - plansys2-bringup + # - octovis + # - gps-umd + # - usb-cam + # - tvm-vendor + # - ros2-socketcan + # - mrpt2 + # - ublox-dgnss + # - fmi-adapter-examples + # - spacenav + # - ros-ign + # - menge-vendor + # - openvslam + # - ackermann-msgs + # - four-wheel-steering-msgs + # - ign-rviz + # - ign-rviz-common + # - ign-rviz-plugins + # - image-pipeline + # - image-view + # - libphidget22 + # - nao-lola + # - phidgets-accelerometer + # - phidgets-analog-inputs + # - phidgets-api + # - phidgets-digital-inputs + # - phidgets-digital-outputs + # - phidgets-drivers + # - phidgets-gyroscope + # - phidgets-high-speed-encoder + # - phidgets-ik + # - phidgets-magnetometer + # - phidgets-motors + # - phidgets-spatial + # - phidgets-temperature + # - robot-localization + # - ros-ign-bridge + # - ros-ign-gazebo + # - ros-ign-image + # - ros-ign-interfaces + # - soccer-marker-generation + # - vision-msgs + # - plotjuggler-ros + # - plotjuggler + # - acado-vendor + # - ament-clang-format + # - ament-clang-tidy + # - ament-cmake-catch2 + # - ament-cmake-clang-format + # - ament-cmake-clang-tidy + # - ament-cmake-mypy + # - ament-cmake-nose + # - ament-cmake-pclint + # - ament-cmake-pycodestyle + # - ament-cmake-pyflakes + # - ament-nodl + # - ament-pclint + # - ament-pycodestyle + # - ament-pyflakes + # - apex-containers + # - apex-test-tools + # - apriltag + # - async-web-server-cpp + # - autoware-auto-msgs + # - backward-ros + # - bno055 + # - bond-core + # - camera-calibration + # - camera-calibration-parsers + # - camera-info-manager + # - can-msgs + # - cartographer-ros-msgs + # - cascade-lifecycle-msgs + # - color-names + # - compressed-depth-image-transport + # - compressed-image-transport + # - control-box-rst + # - control-toolbox + # - depth-image-proc + # - diagnostic-aggregator + # - diagnostic-updater + # - domain-bridge + # - dynamic-edt-3d + # - dynamixel-sdk + # - dynamixel-sdk-custom-interfaces + # - dynamixel-sdk-examples + # - examples-rclcpp-cbg-executor + # - examples-rclpy-guard-conditions + # - examples-rclpy-pointcloud-publisher + # - examples-tf2-py + # - filters + # - gazebo-dev + # - gazebo-msgs + # - gazebo-plugins + # - gazebo-ros + # - gazebo-ros-pkgs + # - geodesy + # - geographic-info + # - geographic-msgs + # - gps-msgs + # - gps-tools + # - grbl-msgs + # - grbl-ros + # - gurumdds-cmake-module + # - hls-lfcd-lds-driver + # - ifm3d-core + # - image-common + # - image-proc + # - image-publisher + # - image-rotate + # - joy-linux + # - joy-teleop + # - key-teleop + # - laser-proc + # - launch-system-modes + # - lgsvl-msgs + # - libmavconn + # - librealsense2 + # - marti-can-msgs + # - marti-common-msgs + # - marti-dbw-msgs + # - marti-nav-msgs + # - marti-perception-msgs + # - marti-sensor-msgs + # - marti-status-msgs + # - marti-visualization-msgs + # - mavlink + # - mavros + # - mavros-msgs + # - mouse-teleop + # - moveit-resources + # - moveit-ros-perception + # - moveit-runtime + # - moveit-servo + # - nao-button-sim + # - nao-command-msgs + # - nao-sensor-msgs + # - nav2-bringup + # - nav2-gazebo-spawner + # - nmea-msgs + # - nodl-python + # - ntpd-driver + # - osqp-vendor + # - ouster-msgs + # - pcl-ros + # - perception-pcl + # - phidgets-msgs + # - plansys2-core + # - plansys2-lifecycle-manager + # - plansys2-msgs + # - plansys2-pddl-parser + # - plotjuggler-msgs + # - point-cloud-msg-wrapper + # - qpoases-vendor + # - qt-gui-app + # - qt-gui-core + # - quaternion-operation + # - radar-msgs + # - rc-common-msgs + # - rcdiscover + # - rc-genicam-api + # - rclc + # - rclc-examples + # - rclc-lifecycle + # - rclc-parameter + # - rclcpp-cascade-lifecycle + # - rcl-logging-log4cxx + # - rcl-logging-noop + # - rc-reason-clients + # - rc-reason-msgs + # - rcss3d-agent + # - realsense2-camera + # - realsense2-camera-msgs + # - realsense2-description + # - realtime-tools + # - rmf-battery + # - rmf-building-map-msgs + # - rmf-building-map-tools + # - rmf-charger-msgs + # - rmf-cmake-uncrustify + # - rmf-dispenser-msgs + # - rmf-door-msgs + # - rmf-fleet-msgs + # - rmf-ingestor-msgs + # - rmf-lift-msgs + # - rmf-task-msgs + # - rmf-traffic + # - rmf-traffic-editor + # - rmf-traffic-editor-assets + # - rmf-traffic-editor-test-maps + # - rmf-traffic-msgs + # - rmf-utils + # - rmf-visualization-msgs + # - rmf-workcell-msgs + # - rmw-gurumdds-cpp + # - rmw-gurumdds-shared-cpp + # - ros2nodl + # - ros2-ouster + # - ros2trace + # - ros2trace-analysis + # - rosbag2-performance-benchmarking + # - rosidl-generator-dds-idl + # - rplidar-ros + # - rqt + # - rqt-moveit + # - rqt-robot-dashboard + # - rqt-robot-monitor + # - rqt-robot-steering + # - run-move-group + # # - run-moveit-cpp + # - sdformat-test-files + # - self-test + # - sensor-msgs-py + # - serial-driver + # - slam-toolbox + # - soccer-vision-msgs + # - stereo-image-proc + # - stubborn-buddies + # - stubborn-buddies-msgs + # - system-modes + # - system-modes-examples + # - system-modes-msgs + # - teleop-tools + # - teleop-tools-msgs + # - test-apex-test-tools + # - test-bond + # - test-launch-system-modes + # - tf-transformations + # - topic-statistics-demo + # - tracetools-analysis + # - tracetools-launch + # - tracetools-read + # - tracetools-test + # - tracetools-trace + # - turtlebot3-fake-node + # - turtlebot3-gazebo + # - turtlebot3-msgs + # - turtlebot3-simulations + # - ublox + # - ublox-gps + # - ublox-msgs + # - ublox-serialization + # - ublox-ubx-interfaces + # - ublox-ubx-msgs + # - udp-driver + # - udp-msgs + # - urg-c + # - urg-node + # - urg-node-msgs + # - v4l2-camera + # - vision-opencv + # - wiimote-msgs + + # Don't work yet + # - run_moveit_cpp + # - wiimote + # - rc-dynamics-api + # - rosbag2-bag-v2-plugins + + # this needs libdwarf and libiberty + # I think we need to build libdwarf first ... + # - osrf_testing_tools_cpp + +patch_dir: patch