From 42a4b60701eaf666a8232ccf39576d3b7663d12f Mon Sep 17 00:00:00 2001 From: Alexander Mock Date: Thu, 18 Jan 2024 16:33:26 +0100 Subject: [PATCH 1/5] added workflows by branch --- .github/workflows/humble-ros.yml | 25 +++++++++++++++++++ .../workflows/{main.yml => master-ros.yml} | 17 +++++++++---- .github/workflows/melodic-ros.yml | 25 +++++++++++++++++++ .github/workflows/noetic-ros.yml | 25 +++++++++++++++++++ 4 files changed, 87 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/humble-ros.yml rename .github/workflows/{main.yml => master-ros.yml} (71%) create mode 100644 .github/workflows/melodic-ros.yml create mode 100644 .github/workflows/noetic-ros.yml diff --git a/.github/workflows/humble-ros.yml b/.github/workflows/humble-ros.yml new file mode 100644 index 000000000..a3e78f979 --- /dev/null +++ b/.github/workflows/humble-ros.yml @@ -0,0 +1,25 @@ +name: CI-humble +on: + push: + branches: + - 'humble' + pull_request: + branches: + - 'humble' + workflow_dispatch: + branches: + - '*' +jobs: + industrial_ci: + strategy: + matrix: + env: + - {ROS_DISTRO: humble, ROS_REPO: testing} + - {ROS_DISTRO: humble, ROS_REPO: main} + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - uses: 'ros-industrial/industrial_ci@master' + env: ${{matrix.env}} diff --git a/.github/workflows/main.yml b/.github/workflows/master-ros.yml similarity index 71% rename from .github/workflows/main.yml rename to .github/workflows/master-ros.yml index c3ba767a4..87dd5dc38 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/master-ros.yml @@ -1,7 +1,14 @@ -name: CI - -on: [push, pull_request] - +name: CI-master +on: + push: + branches: + - 'master' + pull_request: + branches: + - 'master' + workflow_dispatch: + branches: + - '*' jobs: industrial_ci: strategy: @@ -11,7 +18,7 @@ jobs: - {ROS_DISTRO: melodic, ROS_REPO: main} - {ROS_DISTRO: noetic, ROS_REPO: testing} - {ROS_DISTRO: noetic, ROS_REPO: main} - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 with: diff --git a/.github/workflows/melodic-ros.yml b/.github/workflows/melodic-ros.yml new file mode 100644 index 000000000..4eae42bb0 --- /dev/null +++ b/.github/workflows/melodic-ros.yml @@ -0,0 +1,25 @@ +name: CI-melodic +on: + push: + branches: + - 'melodic' + pull_request: + branches: + - 'melodic' + workflow_dispatch: + branches: + - '*' +jobs: + industrial_ci: + strategy: + matrix: + env: + - {ROS_DISTRO: melodic, ROS_REPO: testing} + - {ROS_DISTRO: melodic, ROS_REPO: main} + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - uses: 'ros-industrial/industrial_ci@master' + env: ${{matrix.env}} diff --git a/.github/workflows/noetic-ros.yml b/.github/workflows/noetic-ros.yml new file mode 100644 index 000000000..0326f6073 --- /dev/null +++ b/.github/workflows/noetic-ros.yml @@ -0,0 +1,25 @@ +name: CI-noetic +on: + push: + branches: + - 'noetic' + pull_request: + branches: + - 'noetic' + workflow_dispatch: + branches: + - '*' +jobs: + industrial_ci: + strategy: + matrix: + env: + - {ROS_DISTRO: noetic, ROS_REPO: testing} + - {ROS_DISTRO: noetic, ROS_REPO: main} + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - uses: 'ros-industrial/industrial_ci@master' + env: ${{matrix.env}} From df59b91ce89af259caebc6fb2b12700fb514515d Mon Sep 17 00:00:00 2001 From: Alexander Mock Date: Thu, 8 Feb 2024 11:04:05 +0100 Subject: [PATCH 2/5] after compiling lvr2 inside a ros2 ws: local_setup.bash not found. fixed it. TODO: test, if lvr2 is working when compiling and installing it outside of ros2 ws --- CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c3b2ccb20..827742419 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.4) -project(LAS_VEGAS VERSION 2) +project(lvr2 VERSION 2) # OPTIONS option(BUILD_EXAMPLES "Build the examples" OFF) @@ -16,8 +16,6 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) include(GNUInstallDirs) - - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) @@ -719,3 +717,8 @@ if( DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND ) endif( DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND ) +find_package(ament_cmake QUIET) +if(ament_cmake_FOUND) + ament_package() +endif() + From 4ae51f0e8e06345afa69e7e8e371b602990c6ec6 Mon Sep 17 00:00:00 2001 From: Alexander Mock Date: Thu, 4 Apr 2024 15:07:40 +0200 Subject: [PATCH 3/5] cmake instead of ament_cmake for building renamed project to lvr2 instead of LAS_VEGAS otherwise ROS is complaining tested with mesh_tools --- CMakeLists.txt | 19 ++++++++++++------- package.xml | 5 +++-- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 827742419..1108b8cfc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,12 +34,16 @@ if(embree_FOUND) list(APPEND LVR2_DEFINITIONS -DLVR2_USE_EMBREE) endif(embree_FOUND) + + set(CMAKE_MODULE_PATH - ${LAS_VEGAS_SOURCE_DIR}/CMakeModules - ${LAS_VEGAS_SOURCE_DIR}/ext/kintinuous/cmake/Modules + ${PROJECT_SOURCE_DIR}/CMakeModules + ${PROJECT_SOURCE_DIR}/ext/kintinuous/cmake/Modules ${CMAKE_MODULE_PATH} ) +message(WARNING "!!!!: ${CMAKE_MODULE_PATH}") + message(STATUS ${CMAKE_MODULE_PATH}) include_directories(include) @@ -124,6 +128,7 @@ find_package(FLANN REQUIRED) if(FLANN_FOUND) message(STATUS "Found FLANN") include_directories(${FLANN_DIR}) + message(WARNING "!! FLANN DIR: ${FLANN_DIR}") endif(FLANN_FOUND) find_package(Lz4 REQUIRED) @@ -458,7 +463,7 @@ endif() if(CUDA_FOUND AND "${OpenCV_VERSION_PATCH}" VERSION_GREATER "8" AND WITH_KINFU) message(STATUS "Building LVR KinFu.") add_subdirectory(ext/kintinuous) - include_directories(${LAS_VEGAS_SOURCE_DIR}/ext/kintinuous/kfusion/include) + include_directories(${PROJECT_SOURCE_DIR}/ext/kintinuous/kfusion/include) endif() @@ -717,8 +722,8 @@ if( DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND ) endif( DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND ) -find_package(ament_cmake QUIET) -if(ament_cmake_FOUND) - ament_package() -endif() +# find_package(ament_cmake QUIET) +# if(ament_cmake_FOUND) +# ament_package() +# endif() diff --git a/package.xml b/package.xml index ceddd69ad..b83353fab 100644 --- a/package.xml +++ b/package.xml @@ -8,10 +8,10 @@ The Las Vegas Surface Reconstruction Toolkit is an Open Source toolkit to recons Sebastian Pütz Thomas Wiemann + Alexander Mock BSD-3-Clause - https://www.las-vegas.uni-osnabrueck.de/ @@ -25,6 +25,7 @@ The Las Vegas Surface Reconstruction Toolkit is an Open Source toolkit to recons Dominik Feldschnieders Alexander Löhr + cmake libflann-dev libgsl @@ -41,6 +42,6 @@ The Las Vegas Surface Reconstruction Toolkit is an Open Source toolkit to recons yaml-cpp - ament_cmake + cmake From c84b4ee33b7b7310e4f565234953c33d10777081 Mon Sep 17 00:00:00 2001 From: Alexander Mock Date: Thu, 4 Apr 2024 16:07:49 +0200 Subject: [PATCH 4/5] removed prints --- CMakeLists.txt | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1108b8cfc..9c1a36658 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,15 +35,12 @@ if(embree_FOUND) endif(embree_FOUND) - set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules ${PROJECT_SOURCE_DIR}/ext/kintinuous/cmake/Modules ${CMAKE_MODULE_PATH} ) -message(WARNING "!!!!: ${CMAKE_MODULE_PATH}") - message(STATUS ${CMAKE_MODULE_PATH}) include_directories(include) @@ -128,7 +125,6 @@ find_package(FLANN REQUIRED) if(FLANN_FOUND) message(STATUS "Found FLANN") include_directories(${FLANN_DIR}) - message(WARNING "!! FLANN DIR: ${FLANN_DIR}") endif(FLANN_FOUND) find_package(Lz4 REQUIRED) @@ -719,11 +715,4 @@ if( DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND ) ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMENT "Generating API documentation with Doxygen" VERBATIM ) -endif( DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND ) - - -# find_package(ament_cmake QUIET) -# if(ament_cmake_FOUND) -# ament_package() -# endif() - +endif( DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND ) \ No newline at end of file From 1da6abb65bb1ca22164c3410a439a6107fbf7897 Mon Sep 17 00:00:00 2001 From: Alexander Mock Date: Tue, 30 Apr 2024 16:55:20 +0200 Subject: [PATCH 5/5] added release compilation as default. added support for newer cgal versions --- CMakeLists.txt | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c1a36658..4435be53f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,14 @@ option(BUILD_TOOLS "Build tools including lvr2_reconstruct" ON) option(BUILD_TOOLS_EXPERIMENTAL "Build experimental tools" OFF) option(WITH_DRACO "Build libraries with draco enabled" OFF) + +# DEFAULT RELEASE +if (NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt) + if (NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE) + endif() +endif() + set_property(GLOBAL PROPERTY USE_FOLDERS On) set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON) @@ -268,11 +276,14 @@ endif(WITH_PCL) find_package(CGAL) if(CGAL_FOUND) - set(_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) - set(CMAKE_CXX_FLAGS) - # CGAL_USE_FILE overrides theses flags... - include(${CGAL_USE_FILE}) - set(CMAKE_CXX_FLAGS "${_CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS}") + + if(DEFINED CGAL_USE_FILE) + # CGAL_USE_FILE overrides theses flags... + set(_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) + set(CMAKE_CXX_FLAGS) + include(${CGAL_USE_FILE}) + set(CMAKE_CXX_FLAGS "${_CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS}") + endif() message(STATUS "Found CGAL") endif(CGAL_FOUND)