From c29c46d9e78758d86ebb14790d8d5c6966470de3 Mon Sep 17 00:00:00 2001 From: SakodaShintaro Date: Mon, 11 Mar 2024 18:32:41 +0900 Subject: [PATCH 1/2] fix: remove ros1 (#34) * Removed ros1 Signed-off-by: Shintaro Sakoda * Removed ros1 dockers Signed-off-by: Shintaro Sakoda --------- Signed-off-by: Shintaro Sakoda --- .github/workflows/build.yml | 2 +- CMakeLists.txt | 74 ---------------------------------- docker/melodic/Dockerfile | 26 ------------ docker/melodic_llvm/Dockerfile | 28 ------------- docker/noetic/Dockerfile | 26 ------------ docker/noetic_llvm/Dockerfile | 28 ------------- 6 files changed, 1 insertion(+), 183 deletions(-) delete mode 100644 docker/melodic/Dockerfile delete mode 100644 docker/melodic_llvm/Dockerfile delete mode 100644 docker/noetic/Dockerfile delete mode 100644 docker/noetic_llvm/Dockerfile diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f84f2e3f..20aec62b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ROS_DISTRO: [melodic, melodic_llvm, noetic, noetic_llvm, foxy, foxy_llvm, galactic, galactic_llvm] + ROS_DISTRO: [foxy, foxy_llvm, galactic, galactic_llvm] steps: - uses: actions/checkout@v2 diff --git a/CMakeLists.txt b/CMakeLists.txt index 416e44fb..c3b35707 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,78 +20,6 @@ endif() # pcl 1.7 causes a segfault when it is built with debug mode set(CMAKE_BUILD_TYPE "RELEASE") -if($ENV{ROS_VERSION} EQUAL 1) -# ROS1 -find_package(catkin REQUIRED COMPONENTS - roscpp - pcl_ros -) - -find_package(PCL 1.7 REQUIRED) -include_directories(${PCL_INCLUDE_DIRS}) -link_directories(${PCL_LIBRARY_DIRS}) -add_definitions(${PCL_DEFINITIONS}) - -message(STATUS "PCL_INCLUDE_DIRS:" ${PCL_INCLUDE_DIRS}) -message(STATUS "PCL_LIBRARY_DIRS:" ${PCL_LIBRARY_DIRS}) -message(STATUS "PCL_DEFINITIONS:" ${PCL_DEFINITIONS}) - -find_package(OpenMP) -if (OPENMP_FOUND) - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") -endif() - -################################### -## catkin specific configuration ## -################################### -catkin_package( - INCLUDE_DIRS include - LIBRARIES ndt_omp -) - -########### -## Build ## -########### -include_directories(include) -include_directories( - ${catkin_INCLUDE_DIRS} -) - -add_library(ndt_omp - src/pclomp/voxel_grid_covariance_omp.cpp - src/pclomp/ndt_omp.cpp - src/pclomp/gicp_omp.cpp -) - -add_executable(align - apps/align.cpp -) -add_dependencies(align - ndt_omp -) -target_link_libraries(align - ${catkin_LIBRARIES} - ${PCL_LIBRARIES} - ndt_omp -) - -############# -## INSTALL ## -############# - -install( - TARGETS - ndt_omp - ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} - LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} -) - -# install headers -install(DIRECTORY include/pclomp - DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}) -else() # ROS2 find_package(ament_cmake_auto REQUIRED) ament_auto_find_build_dependencies() @@ -155,5 +83,3 @@ target_link_libraries(regression_test ${PCL_LIBRARIES} ndt_omp multigrid_ndt_omp ) - -endif() diff --git a/docker/melodic/Dockerfile b/docker/melodic/Dockerfile deleted file mode 100644 index 0d303842..00000000 --- a/docker/melodic/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM ros:melodic - -RUN apt-get update && apt-get install -y --no-install-recommends \ - wget nano build-essential libomp-dev clang lld\ - ros-melodic-geodesy ros-melodic-pcl-ros ros-melodic-nmea-msgs \ - ros-melodic-rviz ros-melodic-tf-conversions ros-melodic-libg2o \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -RUN mkdir -p /root/catkin_ws/src -WORKDIR /root/catkin_ws/src -RUN /bin/bash -c '. /opt/ros/melodic/setup.bash; catkin_init_workspace' -RUN git config --global http.postBuffer 2M -RUN git clone https://github.com/SMRT-AIST/fast_gicp.git --recursive --depth=1 -RUN git clone https://github.com/koide3/hdl_graph_slam.git --depth=1 - -COPY . /root/catkin_ws/src/ndt_omp/ - -WORKDIR /root/catkin_ws -RUN /bin/bash -c '. /opt/ros/melodic/setup.bash; catkin_make' -RUN sed -i "6i source \"/root/catkin_ws/devel/setup.bash\"" /ros_entrypoint.sh - -WORKDIR / - -ENTRYPOINT ["/ros_entrypoint.sh"] -CMD ["bash"] diff --git a/docker/melodic_llvm/Dockerfile b/docker/melodic_llvm/Dockerfile deleted file mode 100644 index d49f8f4b..00000000 --- a/docker/melodic_llvm/Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -FROM ros:melodic - -RUN apt-get update && apt-get install -y --no-install-recommends \ - wget nano build-essential libomp-dev clang lld\ - ros-melodic-geodesy ros-melodic-pcl-ros ros-melodic-nmea-msgs \ - ros-melodic-rviz ros-melodic-tf-conversions ros-melodic-libg2o \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -RUN mkdir -p /root/catkin_ws/src -WORKDIR /root/catkin_ws/src -RUN /bin/bash -c '. /opt/ros/melodic/setup.bash; catkin_init_workspace' -RUN git config --global http.postBuffer 2M -RUN git clone https://github.com/SMRT-AIST/fast_gicp.git --recursive --depth=1 -RUN git clone https://github.com/koide3/hdl_graph_slam.git --depth=1 - -COPY . /root/catkin_ws/src/ndt_omp/ - -RUN update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld 50 - -WORKDIR /root/catkin_ws -RUN /bin/bash -c '. /opt/ros/melodic/setup.bash; CC=clang CXX=clang++ catkin_make' -RUN sed -i "6i source \"/root/catkin_ws/devel/setup.bash\"" /ros_entrypoint.sh - -WORKDIR / - -ENTRYPOINT ["/ros_entrypoint.sh"] -CMD ["bash"] diff --git a/docker/noetic/Dockerfile b/docker/noetic/Dockerfile deleted file mode 100644 index 0bfb865b..00000000 --- a/docker/noetic/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM ros:noetic - -RUN apt-get update && apt-get install -y --no-install-recommends \ - wget nano build-essential libomp-dev clang lld git\ - ros-noetic-geodesy ros-noetic-pcl-ros ros-noetic-nmea-msgs \ - ros-noetic-rviz ros-noetic-tf-conversions ros-noetic-libg2o \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -RUN mkdir -p /root/catkin_ws/src -WORKDIR /root/catkin_ws/src -RUN /bin/bash -c '. /opt/ros/noetic/setup.bash; catkin_init_workspace' -RUN git config --global http.postBuffer 2M -RUN git clone https://github.com/SMRT-AIST/fast_gicp.git --recursive --depth=1 -RUN git clone https://github.com/koide3/hdl_graph_slam.git --depth=1 - -COPY . /root/catkin_ws/src/ndt_omp/ - -WORKDIR /root/catkin_ws -RUN /bin/bash -c '. /opt/ros/noetic/setup.bash; catkin_make' -RUN sed -i "6i source \"/root/catkin_ws/devel/setup.bash\"" /ros_entrypoint.sh - -WORKDIR / - -ENTRYPOINT ["/ros_entrypoint.sh"] -CMD ["bash"] diff --git a/docker/noetic_llvm/Dockerfile b/docker/noetic_llvm/Dockerfile deleted file mode 100644 index d8689374..00000000 --- a/docker/noetic_llvm/Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -FROM ros:noetic - -RUN apt-get update && apt-get install -y --no-install-recommends \ - wget nano build-essential libomp-dev clang lld git\ - ros-noetic-geodesy ros-noetic-pcl-ros ros-noetic-nmea-msgs \ - ros-noetic-rviz ros-noetic-tf-conversions ros-noetic-libg2o \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -RUN mkdir -p /root/catkin_ws/src -WORKDIR /root/catkin_ws/src -RUN /bin/bash -c '. /opt/ros/noetic/setup.bash; catkin_init_workspace' -RUN git config --global http.postBuffer 2M -RUN git clone https://github.com/SMRT-AIST/fast_gicp.git --recursive --depth=1 -RUN git clone https://github.com/koide3/hdl_graph_slam.git --depth=1 - -COPY . /root/catkin_ws/src/ndt_omp/ - -RUN update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld 50 - -WORKDIR /root/catkin_ws -RUN /bin/bash -c '. /opt/ros/noetic/setup.bash; CC=clang CXX=clang++ catkin_make' -RUN sed -i "6i source \"/root/catkin_ws/devel/setup.bash\"" /ros_entrypoint.sh - -WORKDIR / - -ENTRYPOINT ["/ros_entrypoint.sh"] -CMD ["bash"] From 6314301f31036318c2cc2677a6b2997067f73df3 Mon Sep 17 00:00:00 2001 From: SakodaShintaro Date: Mon, 11 Mar 2024 18:32:52 +0900 Subject: [PATCH 2/2] Fixed C++ version from 14 to 17 (#35) Signed-off-by: Shintaro Sakoda --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c3b35707..57b069d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.5) project(ndt_omp) -add_definitions(-std=c++14) -set(CMAKE_CXX_FLAGS "-std=c++14") +add_definitions(-std=c++17) +set(CMAKE_CXX_FLAGS "-std=c++17") # Compile flags for SIMD instructions if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")