From 40317b11a2c8ef038939ac3354e07ccb85a43385 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Fri, 18 Jun 2021 08:36:13 +1000 Subject: [PATCH 01/39] Create ci_cross_platform_env.yml --- .github/ci_cross_platform_env.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/ci_cross_platform_env.yml diff --git a/.github/ci_cross_platform_env.yml b/.github/ci_cross_platform_env.yml new file mode 100644 index 0000000000..26cffa0f9e --- /dev/null +++ b/.github/ci_cross_platform_env.yml @@ -0,0 +1,15 @@ +name: test +channels: + - robostack + - conda-forge +dependencies: + - compilers + - ninja + - cmake + - catkin_pkg + - pkg-config + - rosdep + - rosdistro + - ros-distro-mutex 0.1 noetic + - ros-noetic-catkin + - ros-noetic-ros-environment From 0ac939570d0aa1e56e6483d5531f38c1668a4226 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Fri, 18 Jun 2021 08:42:51 +1000 Subject: [PATCH 02/39] Create cross_platform_ci.yml --- .github/workflows/cross_platform_ci.yml | 102 ++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 .github/workflows/cross_platform_ci.yml diff --git a/.github/workflows/cross_platform_ci.yml b/.github/workflows/cross_platform_ci.yml new file mode 100644 index 0000000000..76021872ed --- /dev/null +++ b/.github/workflows/cross_platform_ci.yml @@ -0,0 +1,102 @@ +name: rviz cross-platform RoboStack build + +on: + workflow_dispatch: + pull_request: + push: + branches: + - master + - "[kmn]*-devel*" + +jobs: + run_rviz_compilation: + runs-on: ${{ matrix.os }} + name: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + + steps: + - uses: actions/checkout@v2 + + - name: Set up Build Dependencies + uses: mamba-org/provision-with-micromamba@main + with: + environment-file: .github/ci_cross_platform_env.yml + micromamba-version: latest + + - name: Set up rviz Dependencies on Unix + if: runner.os == 'Linux' || runner.os == 'macOS' + shell: bash -l -eo pipefail {0} + run: | + micromamba activate test + export PATH=$HOME/micromamba-bin:$PATH + rosdep init + rosdep update + rosdep install --from-paths . --ignore-src -r -y + + - name: Build rviz on Unix + if: runner.os == 'Linux' || runner.os == 'macOS' + shell: bash -l -eo pipefail {0} + run: | + if [[ `uname -s` == "Linux" ]]; then + CDT="-cos6-x86_64" + micromamba install -y mesa-libgl-devel$CDT mesa-dri-drivers$CDT \ + libselinux$CDT libxdamage$CDT libxxf86vm$CDT \ + libxext$CDT libxfixes$CDT -c conda-forge + fi + + export CTEST_OUTPUT_ON_FAILURE=1 + mkdir build + cd build + + cmake .. -DCMAKE_PREFIX_PATH=$CONDA_PREFIX \ + -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \ + -DCMAKE_BUILD_TYPE=Release \ + -DCATKIN_SKIP_TESTING=OFF \ + -G "Ninja" + + ninja + ninja run_tests + + - name: Set up rviz Dependencies on Windows + if: runner.os == 'Windows' + shell: cmd + run: | + echo "Activate environment, and use rosdep to install dependencies" + call C:\Users\runneradmin\micromamba\condabin\micromamba.bat activate test + rosdep init + rosdep update + rosdep install --from-paths . --ignore-src -r -y + - name: Build rviz on Windows + if: runner.os == 'Windows' + shell: cmd + run: | + echo "Remove unnecessary / colliding things from PATH" + set "PATH=%PATH:C:\ProgramData\Chocolatey\bin;=%" + set "PATH=%PATH:C:\Program Files (x86)\sbt\bin;=%" + set "PATH=%PATH:C:\Rust\.cargo\bin;=%" + set "PATH=%PATH:C:\Program Files\Git\usr\bin;=%" + set "PATH=%PATH:C:\Program Files\Git\cmd;=%" + set "PATH=%PATH:C:\Program Files\Git\mingw64\bin;=%" + set "PATH=%PATH:C:\Program Files (x86)\Subversion\bin;=%" + set "PATH=%PATH:C:\Program Files\CMake\bin;=%" + set "PATH=%PATH:C:\Program Files\OpenSSL\bin;=%" + set "PATH=%PATH:C:\Strawberry\c\bin;=%" + set "PATH=%PATH:C:\Strawberry\perl\bin;=%" + set "PATH=%PATH:C:\Strawberry\perl\site\bin;=%" + set "PATH=%PATH:c:\tools\php;=%" + set "PATH=%PATH:ostedtoolcache=%" + call C:\Users\runneradmin\micromamba\condabin\micromamba.bat activate test + mkdir build + cd build + SET "CTEST_OUTPUT_ON_FAILURE=1" + cmake .. -DCMAKE_PREFIX_PATH="%CONDA_PREFIX%\Library" ^ + -DCMAKE_INSTALL_PREFIX="%CONDA_PREFIX%\Library" ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCATKIN_SKIP_TESTING=OFF ^ + -DBoost_USE_STATIC_LIBS=OFF ^ + -G "Ninja" + ninja + ninja run_tests From 4e1f38a29740fe380e672ef525bab6ca6e6e08b1 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Fri, 18 Jun 2021 08:48:31 +1000 Subject: [PATCH 03/39] Update CMakeLists.txt --- CMakeLists.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 23719c1b44..53a366d4dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,10 +26,14 @@ find_package(Boost REQUIRED find_package(urdfdom_headers REQUIRED) set(CMAKE_POLICY_DEFAULT_CMP0012 NEW) # required due to a bug in assimp 5.0 -find_package(ASSIMP REQUIRED) -if(NOT DEFINED ASSIMP_LIBRARIES AND TARGET assimp::assimp) - # ASSIMP >= 5.0 no longer defines ASSIMP_LIBRARIES - set(ASSIMP_LIBRARIES assimp::assimp) +find_package(ASSIMP) +if(ASSIMP_FOUND) + if(NOT DEFINED ASSIMP_LIBRARIES AND TARGET assimp::assimp) + # ASSIMP >= 5.0 no longer defines ASSIMP_LIBRARIES + set(ASSIMP_LIBRARIES assimp::assimp) + endif() +else() + find_package(assimp REQUIRED) endif() find_package(OGRE QUIET COMPONENTS Overlay) @@ -219,7 +223,7 @@ catkin_package( #catkin_lint: ignore_once external_directory include_directories(src ${EXPORT_HEADER_DIR}) -include_directories(SYSTEM +include_directories( ${EIGEN3_INCLUDE_DIRS} ${OGRE_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIR} From e51a15539981b2710303f15ac8e851c4f9577323 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Fri, 18 Jun 2021 08:50:09 +1000 Subject: [PATCH 04/39] fontdef was actually changed in ogre > 1.10 --- ogre_media/fonts/{ogre1.10.fontdef => ogre1.12.fontdef} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ogre_media/fonts/{ogre1.10.fontdef => ogre1.12.fontdef} (100%) diff --git a/ogre_media/fonts/ogre1.10.fontdef b/ogre_media/fonts/ogre1.12.fontdef similarity index 100% rename from ogre_media/fonts/ogre1.10.fontdef rename to ogre_media/fonts/ogre1.12.fontdef From 09efe39881f72d390d59ac2ba03a9d46c9ac2207 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Fri, 18 Jun 2021 08:50:38 +1000 Subject: [PATCH 05/39] Fixup OGRE_VERSION for fontdef --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 53a366d4dd..078c9b5e06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -243,8 +243,8 @@ include_directories( add_subdirectory(src) -if(OGRE_VERSION VERSION_LESS "1.10") - set(EXCLUDE_PATTERN "ogre1.10.*") +if(OGRE_VERSION VERSION_LESS "1.12") + set(EXCLUDE_PATTERN "ogre1.12.*") else() set(EXCLUDE_PATTERN "ogre1.9.*") endif() From 40b1fcb3ee17ba56da82c5726f097f03a9f04564 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Fri, 18 Jun 2021 08:51:46 +1000 Subject: [PATCH 06/39] Fixes for Win --- .../interactive_markers/interactive_marker_control.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rviz/default_plugin/interactive_markers/interactive_marker_control.h b/src/rviz/default_plugin/interactive_markers/interactive_marker_control.h index 7f8cfbb248..fd29a8fbe7 100644 --- a/src/rviz/default_plugin/interactive_markers/interactive_marker_control.h +++ b/src/rviz/default_plugin/interactive_markers/interactive_marker_control.h @@ -30,6 +30,10 @@ #ifndef INTERACTIVE_MARKER_CONTROL_H_ #define INTERACTIVE_MARKER_CONTROL_H_ +#ifdef _WIN32 +#undef ERROR +#undef DELETE +#endif #ifndef Q_MOC_RUN #include From c0ec4455cea0c858e119ed2a84a6c068406387e3 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Fri, 18 Jun 2021 08:52:12 +1000 Subject: [PATCH 07/39] Fixes for Win --- src/rviz/default_plugin/marker_display.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rviz/default_plugin/marker_display.cpp b/src/rviz/default_plugin/marker_display.cpp index 79edefd7eb..4bcf7eef99 100644 --- a/src/rviz/default_plugin/marker_display.cpp +++ b/src/rviz/default_plugin/marker_display.cpp @@ -43,6 +43,10 @@ #include +#ifdef DELETE +#undef DELETE +#endif + namespace rviz { //////////////////////////////////////////////////////////////////////////////////////////////////////////////// From ed8e50bdb7b91d1befecd9937cbecd27b72c1265 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Fri, 18 Jun 2021 08:52:33 +1000 Subject: [PATCH 08/39] Fixes for Win --- src/rviz/default_plugin/marker_utils.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rviz/default_plugin/marker_utils.cpp b/src/rviz/default_plugin/marker_utils.cpp index f543b49b4e..288ef6f34f 100644 --- a/src/rviz/default_plugin/marker_utils.cpp +++ b/src/rviz/default_plugin/marker_utils.cpp @@ -45,6 +45,10 @@ #include #include +#ifdef DELETE +#undef DELETE +#endif + namespace rviz { MarkerBase* From 1c79ef263b7f68605d183b0834c730aebae1183e Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Fri, 18 Jun 2021 08:54:48 +1000 Subject: [PATCH 09/39] Fixes for osx and win --- src/rviz/ogre_helpers/render_system.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/rviz/ogre_helpers/render_system.cpp b/src/rviz/ogre_helpers/render_system.cpp index 8cd533373b..d3f0f4ccd2 100644 --- a/src/rviz/ogre_helpers/render_system.cpp +++ b/src/rviz/ogre_helpers/render_system.cpp @@ -40,6 +40,10 @@ #include #endif +#if defined(Q_OS_MAC) +#include +#endif + // X.h #defines CursorShape to be "0". Qt uses CursorShape in normal // C++ way. This wasn't an issue until ogre_logging.h (below) // introduced a #include of . @@ -183,9 +187,13 @@ void RenderSystem::detectGlVersion() int minor = caps->getDriverVersion().minor; gl_version_ = major * 100 + minor * 10; +#ifdef __linux__ std::string gl_version_string = (const char*)glGetString(GL_VERSION); // The "Mesa 2" string is intended to match "Mesa 20.", "Mesa 21." and so on mesa_workaround = gl_version_string.find("Mesa 2") != std::string::npos && gl_version_ >= 320; +#else + mesa_workaround = false; +#endif } switch (gl_version_) From 3e16561f0e4ec3d3b89b245afb19a968818eb82a Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Fri, 18 Jun 2021 08:55:40 +1000 Subject: [PATCH 10/39] Fixes for Win --- src/rviz/yaml_config_writer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rviz/yaml_config_writer.cpp b/src/rviz/yaml_config_writer.cpp index 7fc0715420..ce8ffa1f50 100644 --- a/src/rviz/yaml_config_writer.cpp +++ b/src/rviz/yaml_config_writer.cpp @@ -152,7 +152,9 @@ void YamlConfigWriter::writeConfigNode(const Config& config, YAML::Emitter& emit break; } default: +#ifndef _WIN32 emitter << YAML::Null; +#endif break; } } From 829612aabd2ff7fa9aa607a29ffae1d93851f4f2 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Fri, 18 Jun 2021 09:12:36 +1000 Subject: [PATCH 11/39] Fix whitespace --- .github/workflows/cross_platform_ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cross_platform_ci.yml b/.github/workflows/cross_platform_ci.yml index 76021872ed..ced8892f9d 100644 --- a/.github/workflows/cross_platform_ci.yml +++ b/.github/workflows/cross_platform_ci.yml @@ -46,11 +46,11 @@ jobs: libselinux$CDT libxdamage$CDT libxxf86vm$CDT \ libxext$CDT libxfixes$CDT -c conda-forge fi - + export CTEST_OUTPUT_ON_FAILURE=1 mkdir build cd build - + cmake .. -DCMAKE_PREFIX_PATH=$CONDA_PREFIX \ -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \ -DCMAKE_BUILD_TYPE=Release \ @@ -59,7 +59,7 @@ jobs: ninja ninja run_tests - + - name: Set up rviz Dependencies on Windows if: runner.os == 'Windows' shell: cmd From b3360db865be33a5d6c3de0661f2a7417ba11f29 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Fri, 18 Jun 2021 09:16:49 +1000 Subject: [PATCH 12/39] Try fix catkin_lint --- package.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/package.xml b/package.xml index 4e08c5c28e..ba7fa3a8ea 100644 --- a/package.xml +++ b/package.xml @@ -28,6 +28,7 @@ liburdfdom-dev liburdfdom-headers-dev message_generation + assimp libogre-dev From f1896207db2997d61e44bafb6e153233f3bc7059 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Fri, 18 Jun 2021 09:25:28 +1000 Subject: [PATCH 13/39] Add SYSTEM back in to include_directories --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 078c9b5e06..c3616ee373 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -223,7 +223,7 @@ catkin_package( #catkin_lint: ignore_once external_directory include_directories(src ${EXPORT_HEADER_DIR}) -include_directories( +include_directories(SYSTEM ${EIGEN3_INCLUDE_DIRS} ${OGRE_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIR} From eb5858deb4b16e0d166e42b6b267fa8ad3a04805 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Tue, 2 Nov 2021 13:41:38 +1000 Subject: [PATCH 14/39] Create windows_compat.h --- src/rviz/windows_compat.h | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/rviz/windows_compat.h diff --git a/src/rviz/windows_compat.h b/src/rviz/windows_compat.h new file mode 100644 index 0000000000..00cb3a9202 --- /dev/null +++ b/src/rviz/windows_compat.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2021, Willow Garage, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the Willow Garage, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef WINDOWS_COMPAT_H +#define WINDOWS_COMPAT_H + +#ifdef _WIN32 + +#ifdef ERROR +#undef ERROR +#endif + +#ifdef DELETE +#undef DELETE +#endif + +#endif // _WIN32 + +#endif // WINDOWS_COMPAT_H From dcca4581c22d95d34d1f6ef52e053b64953a1cc3 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Tue, 2 Nov 2021 13:43:23 +1000 Subject: [PATCH 15/39] Use windows_compat.h --- .../interactive_markers/interactive_marker_control.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/rviz/default_plugin/interactive_markers/interactive_marker_control.h b/src/rviz/default_plugin/interactive_markers/interactive_marker_control.h index fd29a8fbe7..04bc767b0b 100644 --- a/src/rviz/default_plugin/interactive_markers/interactive_marker_control.h +++ b/src/rviz/default_plugin/interactive_markers/interactive_marker_control.h @@ -30,11 +30,6 @@ #ifndef INTERACTIVE_MARKER_CONTROL_H_ #define INTERACTIVE_MARKER_CONTROL_H_ -#ifdef _WIN32 -#undef ERROR -#undef DELETE -#endif - #ifndef Q_MOC_RUN #include #include @@ -49,6 +44,7 @@ #include +#include #include #include #include From 433dcc9e39b134403c4b4cbf3d173d32cfc648e9 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Tue, 2 Nov 2021 13:44:35 +1000 Subject: [PATCH 16/39] Use windows_compat.h --- src/rviz/default_plugin/marker_display.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/rviz/default_plugin/marker_display.cpp b/src/rviz/default_plugin/marker_display.cpp index 4bcf7eef99..4802d24ce3 100644 --- a/src/rviz/default_plugin/marker_display.cpp +++ b/src/rviz/default_plugin/marker_display.cpp @@ -40,12 +40,10 @@ #include #include #include +#include #include -#ifdef DELETE -#undef DELETE -#endif namespace rviz { From 4241203c18e233d39d0cabd2b03252a35c79b950 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Tue, 2 Nov 2021 13:45:18 +1000 Subject: [PATCH 17/39] Use windows_compat.h --- src/rviz/default_plugin/marker_utils.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/rviz/default_plugin/marker_utils.cpp b/src/rviz/default_plugin/marker_utils.cpp index 288ef6f34f..03048d2650 100644 --- a/src/rviz/default_plugin/marker_utils.cpp +++ b/src/rviz/default_plugin/marker_utils.cpp @@ -44,10 +44,8 @@ #include #include #include +#include -#ifdef DELETE -#undef DELETE -#endif namespace rviz { From 9e81c2ceefcda9c043cdb38ba6469e9778a7a6fd Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Tue, 2 Nov 2021 14:17:16 +1000 Subject: [PATCH 18/39] Pin openssl for now --- .github/ci_cross_platform_env.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ci_cross_platform_env.yml b/.github/ci_cross_platform_env.yml index 26cffa0f9e..936b8aa71c 100644 --- a/.github/ci_cross_platform_env.yml +++ b/.github/ci_cross_platform_env.yml @@ -13,3 +13,4 @@ dependencies: - ros-distro-mutex 0.1 noetic - ros-noetic-catkin - ros-noetic-ros-environment + - openssl 1.1.1* From 3e6a7650a56270f0fd537e64f5a6c1ef53f53b6e Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Wed, 3 Nov 2021 07:50:01 +1000 Subject: [PATCH 19/39] Try not adding find_package(assimp REQUIRED) --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c3616ee373..ca811dfd04 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,15 +26,15 @@ find_package(Boost REQUIRED find_package(urdfdom_headers REQUIRED) set(CMAKE_POLICY_DEFAULT_CMP0012 NEW) # required due to a bug in assimp 5.0 -find_package(ASSIMP) -if(ASSIMP_FOUND) +find_package(ASSIMP REQUIRED) +# if(ASSIMP_FOUND) if(NOT DEFINED ASSIMP_LIBRARIES AND TARGET assimp::assimp) # ASSIMP >= 5.0 no longer defines ASSIMP_LIBRARIES set(ASSIMP_LIBRARIES assimp::assimp) endif() -else() - find_package(assimp REQUIRED) -endif() +# else() +# find_package(assimp REQUIRED) +# endif() find_package(OGRE QUIET COMPONENTS Overlay) if(OGRE_FOUND) From 7e17e7a432885764eb6e5cdf670c37a2a7c6300c Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Wed, 3 Nov 2021 08:01:58 +1000 Subject: [PATCH 20/39] Switch to lower case assimp --- CMakeLists.txt | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ca811dfd04..f0abbbb047 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,15 +26,11 @@ find_package(Boost REQUIRED find_package(urdfdom_headers REQUIRED) set(CMAKE_POLICY_DEFAULT_CMP0012 NEW) # required due to a bug in assimp 5.0 -find_package(ASSIMP REQUIRED) -# if(ASSIMP_FOUND) - if(NOT DEFINED ASSIMP_LIBRARIES AND TARGET assimp::assimp) - # ASSIMP >= 5.0 no longer defines ASSIMP_LIBRARIES - set(ASSIMP_LIBRARIES assimp::assimp) - endif() -# else() -# find_package(assimp REQUIRED) -# endif() +find_package(assimp REQUIRED) +if(NOT DEFINED ASSIMP_LIBRARIES AND TARGET assimp::assimp) + # ASSIMP >= 5.0 no longer defines ASSIMP_LIBRARIES + set(ASSIMP_LIBRARIES assimp::assimp) +endif() find_package(OGRE QUIET COMPONENTS Overlay) if(OGRE_FOUND) From bd683a44d55488fc1df48fa0f051f7eecdf06207 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Wed, 3 Nov 2021 08:17:56 +1000 Subject: [PATCH 21/39] Update copyright --- src/rviz/windows_compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rviz/windows_compat.h b/src/rviz/windows_compat.h index 00cb3a9202..59d1b4d0b9 100644 --- a/src/rviz/windows_compat.h +++ b/src/rviz/windows_compat.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Willow Garage, Inc. + * Copyright (c) 2021, Tobias Fischer, Queensland University of Technology * All rights reserved. * * Redistribution and use in source and binary forms, with or without From d252cb6df287f169182c5c6bd813d5a58943b84e Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Wed, 3 Nov 2021 08:18:35 +1000 Subject: [PATCH 22/39] Fix copyright --- src/rviz/windows_compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rviz/windows_compat.h b/src/rviz/windows_compat.h index 59d1b4d0b9..21efe25a27 100644 --- a/src/rviz/windows_compat.h +++ b/src/rviz/windows_compat.h @@ -10,7 +10,7 @@ * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * * Neither the name of the Willow Garage, Inc. nor the names of its + * * Neither the name of the Queensland Uni of Technology nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * From 7a3126b5aa59152f4d70fc7858a733554e8532f1 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Wed, 3 Nov 2021 10:15:27 +1000 Subject: [PATCH 23/39] Check if YAML::Null still causes issues --- src/rviz/yaml_config_writer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rviz/yaml_config_writer.cpp b/src/rviz/yaml_config_writer.cpp index ce8ffa1f50..67a2a11cd2 100644 --- a/src/rviz/yaml_config_writer.cpp +++ b/src/rviz/yaml_config_writer.cpp @@ -152,9 +152,9 @@ void YamlConfigWriter::writeConfigNode(const Config& config, YAML::Emitter& emit break; } default: -#ifndef _WIN32 +//#ifndef _WIN32 emitter << YAML::Null; -#endif +//#endif break; } } From fae0c72508645f16d89240666e47d957fb7d71a9 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Wed, 3 Nov 2021 12:19:21 +1000 Subject: [PATCH 24/39] Add comment on Windows workaround for YAML::Null --- src/rviz/yaml_config_writer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rviz/yaml_config_writer.cpp b/src/rviz/yaml_config_writer.cpp index 67a2a11cd2..a42e991f34 100644 --- a/src/rviz/yaml_config_writer.cpp +++ b/src/rviz/yaml_config_writer.cpp @@ -152,9 +152,11 @@ void YamlConfigWriter::writeConfigNode(const Config& config, YAML::Emitter& emit break; } default: -//#ifndef _WIN32 +// Workaround as YAML::Null is missing from Windows DLLs; +// see https://github.com/jbeder/yaml-cpp/issues/950 +#ifndef _WIN32 emitter << YAML::Null; -//#endif +#endif break; } } From f29449c6e1fe5e95c532a18c4e5657671a3b1282 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Wed, 3 Nov 2021 12:28:45 +1000 Subject: [PATCH 25/39] Go back to ogre1.10 font def --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f0abbbb047..c957e986b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -239,8 +239,8 @@ include_directories(SYSTEM add_subdirectory(src) -if(OGRE_VERSION VERSION_LESS "1.12") - set(EXCLUDE_PATTERN "ogre1.12.*") +if(OGRE_VERSION VERSION_LESS "1.10") + set(EXCLUDE_PATTERN "ogre1.10.*") else() set(EXCLUDE_PATTERN "ogre1.9.*") endif() From caba7632f700109d6dc2420a7d4a889352efe252 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Wed, 3 Nov 2021 12:29:11 +1000 Subject: [PATCH 26/39] Undo rename --- ogre_media/fonts/{ogre1.12.fontdef => ogre1.10.fontdef} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ogre_media/fonts/{ogre1.12.fontdef => ogre1.10.fontdef} (100%) diff --git a/ogre_media/fonts/ogre1.12.fontdef b/ogre_media/fonts/ogre1.10.fontdef similarity index 100% rename from ogre_media/fonts/ogre1.12.fontdef rename to ogre_media/fonts/ogre1.10.fontdef From a20da0e3ed189972df29178bdc7f6d117ae1601e Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Wed, 3 Nov 2021 12:31:59 +1000 Subject: [PATCH 27/39] Lint --- src/rviz/yaml_config_writer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rviz/yaml_config_writer.cpp b/src/rviz/yaml_config_writer.cpp index a42e991f34..9cc12ba944 100644 --- a/src/rviz/yaml_config_writer.cpp +++ b/src/rviz/yaml_config_writer.cpp @@ -152,7 +152,7 @@ void YamlConfigWriter::writeConfigNode(const Config& config, YAML::Emitter& emit break; } default: -// Workaround as YAML::Null is missing from Windows DLLs; +// Workaround as YAML::Null is missing from Windows DLLs; // see https://github.com/jbeder/yaml-cpp/issues/950 #ifndef _WIN32 emitter << YAML::Null; From 9b1f9dd7126038ac0cb3dc1fbaf5316a44b4bc47 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Wed, 3 Nov 2021 12:39:07 +1000 Subject: [PATCH 28/39] Fix Windows compilation --- src/rviz/mesh_loader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rviz/mesh_loader.cpp b/src/rviz/mesh_loader.cpp index 18659169d1..06d3200ce0 100644 --- a/src/rviz/mesh_loader.cpp +++ b/src/rviz/mesh_loader.cpp @@ -768,7 +768,7 @@ Ogre::SkeletonPtr loadSkeletonFromResource(const std::string& resource_path) Ogre::SkeletonSerializer ser; Ogre::DataStreamPtr stream(new Ogre::MemoryDataStream(res.data.get(), res.size)); Ogre::SkeletonPtr skeleton = Ogre::SkeletonManager::getSingleton().create( - skeleton_path.filename().c_str(), Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, true); + skeleton_path.filename().string().c_str(), Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, true); ser.importSkeleton(stream, skeleton.get()); return skeleton; From 59483a3c29f784faef51e40e65815d32c270b1ab Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Wed, 3 Nov 2021 12:44:46 +1000 Subject: [PATCH 29/39] Lint --- src/rviz/mesh_loader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rviz/mesh_loader.cpp b/src/rviz/mesh_loader.cpp index 06d3200ce0..54bc081baf 100644 --- a/src/rviz/mesh_loader.cpp +++ b/src/rviz/mesh_loader.cpp @@ -768,7 +768,8 @@ Ogre::SkeletonPtr loadSkeletonFromResource(const std::string& resource_path) Ogre::SkeletonSerializer ser; Ogre::DataStreamPtr stream(new Ogre::MemoryDataStream(res.data.get(), res.size)); Ogre::SkeletonPtr skeleton = Ogre::SkeletonManager::getSingleton().create( - skeleton_path.filename().string().c_str(), Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, true); + skeleton_path.filename().string().c_str(), + Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, true); ser.importSkeleton(stream, skeleton.get()); return skeleton; From b8666eeace5cf2a7f9cfce0b32f86c892afe397d Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Thu, 4 Nov 2021 04:49:43 +1000 Subject: [PATCH 30/39] Fix mamba provision version Co-authored-by: Robert Haschke --- .github/workflows/cross_platform_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cross_platform_ci.yml b/.github/workflows/cross_platform_ci.yml index ced8892f9d..789d8d3dc0 100644 --- a/.github/workflows/cross_platform_ci.yml +++ b/.github/workflows/cross_platform_ci.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v2 - name: Set up Build Dependencies - uses: mamba-org/provision-with-micromamba@main + uses: mamba-org/provision-with-micromamba@v11 with: environment-file: .github/ci_cross_platform_env.yml micromamba-version: latest From da74312760e825342d28e4334c07f9fb356186d3 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Thu, 4 Nov 2021 04:50:11 +1000 Subject: [PATCH 31/39] Shorten display name of GitHub action Co-authored-by: Robert Haschke --- .github/workflows/cross_platform_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cross_platform_ci.yml b/.github/workflows/cross_platform_ci.yml index 789d8d3dc0..f3593e017c 100644 --- a/.github/workflows/cross_platform_ci.yml +++ b/.github/workflows/cross_platform_ci.yml @@ -1,4 +1,4 @@ -name: rviz cross-platform RoboStack build +name: RoboStack on: workflow_dispatch: From 449bba0ba89e08c63061bb957aaef65e30a738da Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Thu, 4 Nov 2021 04:53:53 +1000 Subject: [PATCH 32/39] Rename ci_cross_platform_env.yml to robostack_env.yml --- .github/{ci_cross_platform_env.yml => robostack_env.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ci_cross_platform_env.yml => robostack_env.yml} (100%) diff --git a/.github/ci_cross_platform_env.yml b/.github/robostack_env.yml similarity index 100% rename from .github/ci_cross_platform_env.yml rename to .github/robostack_env.yml From a32d76d4f68be03e932c263c53166f13be51170c Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Thu, 4 Nov 2021 04:56:04 +1000 Subject: [PATCH 33/39] Move unix dep install to dep install step and rename --- .../{cross_platform_ci.yml => robostack.yml} | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) rename .github/workflows/{cross_platform_ci.yml => robostack.yml} (97%) diff --git a/.github/workflows/cross_platform_ci.yml b/.github/workflows/robostack.yml similarity index 97% rename from .github/workflows/cross_platform_ci.yml rename to .github/workflows/robostack.yml index f3593e017c..af0434ee34 100644 --- a/.github/workflows/cross_platform_ci.yml +++ b/.github/workflows/robostack.yml @@ -23,7 +23,7 @@ jobs: - name: Set up Build Dependencies uses: mamba-org/provision-with-micromamba@v11 with: - environment-file: .github/ci_cross_platform_env.yml + environment-file: .github/robostack_env.yml micromamba-version: latest - name: Set up rviz Dependencies on Unix @@ -32,6 +32,14 @@ jobs: run: | micromamba activate test export PATH=$HOME/micromamba-bin:$PATH + + if [[ `uname -s` == "Linux" ]]; then + CDT="-cos6-x86_64" + micromamba install -y mesa-libgl-devel$CDT mesa-dri-drivers$CDT \ + libselinux$CDT libxdamage$CDT libxxf86vm$CDT \ + libxext$CDT libxfixes$CDT -c conda-forge + fi + rosdep init rosdep update rosdep install --from-paths . --ignore-src -r -y @@ -40,13 +48,6 @@ jobs: if: runner.os == 'Linux' || runner.os == 'macOS' shell: bash -l -eo pipefail {0} run: | - if [[ `uname -s` == "Linux" ]]; then - CDT="-cos6-x86_64" - micromamba install -y mesa-libgl-devel$CDT mesa-dri-drivers$CDT \ - libselinux$CDT libxdamage$CDT libxxf86vm$CDT \ - libxext$CDT libxfixes$CDT -c conda-forge - fi - export CTEST_OUTPUT_ON_FAILURE=1 mkdir build cd build From 4ccf52f3a1f8392496bc6b229a8db10e2597e7b0 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Thu, 4 Nov 2021 04:58:07 +1000 Subject: [PATCH 34/39] Lock in micromamba version --- .github/workflows/robostack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/robostack.yml b/.github/workflows/robostack.yml index af0434ee34..d13631d206 100644 --- a/.github/workflows/robostack.yml +++ b/.github/workflows/robostack.yml @@ -24,7 +24,7 @@ jobs: uses: mamba-org/provision-with-micromamba@v11 with: environment-file: .github/robostack_env.yml - micromamba-version: latest + micromamba-version: "0.17.0" - name: Set up rviz Dependencies on Unix if: runner.os == 'Linux' || runner.os == 'macOS' From 0b0aec20b955b7d9e812f673760bc62dc3cfa224 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Thu, 4 Nov 2021 05:00:13 +1000 Subject: [PATCH 35/39] Fix whitespace --- .github/workflows/robostack.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/robostack.yml b/.github/workflows/robostack.yml index d13631d206..4c920df581 100644 --- a/.github/workflows/robostack.yml +++ b/.github/workflows/robostack.yml @@ -32,14 +32,14 @@ jobs: run: | micromamba activate test export PATH=$HOME/micromamba-bin:$PATH - + if [[ `uname -s` == "Linux" ]]; then CDT="-cos6-x86_64" micromamba install -y mesa-libgl-devel$CDT mesa-dri-drivers$CDT \ libselinux$CDT libxdamage$CDT libxxf86vm$CDT \ libxext$CDT libxfixes$CDT -c conda-forge fi - + rosdep init rosdep update rosdep install --from-paths . --ignore-src -r -y From b54f518c30cdce9466364024850863681f787e32 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Thu, 4 Nov 2021 05:01:26 +1000 Subject: [PATCH 36/39] Rename prerelease.yml to prerelease.yaml --- .github/workflows/{prerelease.yml => prerelease.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{prerelease.yml => prerelease.yaml} (100%) diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yaml similarity index 100% rename from .github/workflows/prerelease.yml rename to .github/workflows/prerelease.yaml From d633c6dcb40069bf918b568a75d1eed1a0c983fc Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Thu, 4 Nov 2021 05:01:38 +1000 Subject: [PATCH 37/39] Rename robostack.yml to robostack.yaml --- .github/workflows/{robostack.yml => robostack.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{robostack.yml => robostack.yaml} (100%) diff --git a/.github/workflows/robostack.yml b/.github/workflows/robostack.yaml similarity index 100% rename from .github/workflows/robostack.yml rename to .github/workflows/robostack.yaml From 2ce03210f8c57229235bf04d42d52731148ed2d2 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Thu, 4 Nov 2021 05:01:50 +1000 Subject: [PATCH 38/39] Rename robostack_env.yml to robostack_env.yaml --- .github/{robostack_env.yml => robostack_env.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{robostack_env.yml => robostack_env.yaml} (100%) diff --git a/.github/robostack_env.yml b/.github/robostack_env.yaml similarity index 100% rename from .github/robostack_env.yml rename to .github/robostack_env.yaml From c17370d498637a058be94e28ec564436fa4cfd98 Mon Sep 17 00:00:00 2001 From: Tobias Fischer Date: Thu, 4 Nov 2021 05:10:48 +1000 Subject: [PATCH 39/39] Fix --- .github/workflows/robostack.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/robostack.yaml b/.github/workflows/robostack.yaml index 4c920df581..dfa910a170 100644 --- a/.github/workflows/robostack.yaml +++ b/.github/workflows/robostack.yaml @@ -23,7 +23,7 @@ jobs: - name: Set up Build Dependencies uses: mamba-org/provision-with-micromamba@v11 with: - environment-file: .github/robostack_env.yml + environment-file: .github/robostack_env.yaml micromamba-version: "0.17.0" - name: Set up rviz Dependencies on Unix