From ce56fef10cf71aece8cc6ddfc683e030fe9b65ff Mon Sep 17 00:00:00 2001 From: Kenji Miyake Date: Tue, 10 Aug 2021 22:43:54 +0900 Subject: [PATCH 01/10] Support ROS2 build Signed-off-by: Kenji Miyake --- .github/workflows/build.yml | 35 +++++++++++++++++++++++++++++++++ CMakeLists.txt | 39 ++++++++++++++++++++++++++++++++++++- package.xml | 17 ++++++++++------ 3 files changed, 84 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0d7e5938..3206d21f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,3 +32,38 @@ jobs: file: ${{github.workspace}}/docker/${{ matrix.ROS_DISTRO }}/Dockerfile context: . push: false + + build-ros2: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + ros_distribution: + - foxy + - galactic + - rolling + include: + # Foxy Fitzroy (June 2020 - May 2023) + - docker_image: rostooling/setup-ros-docker:ubuntu-focal-ros-foxy-ros-base-latest + ros_distribution: foxy + ros_version: 2 + # Galactic Geochelone (May 2021 - November 2022) + - docker_image: rostooling/setup-ros-docker:ubuntu-focal-ros-galactic-ros-base-latest + ros_distribution: galactic + ros_version: 2 + # Rolling Ridley (June 2020 - Present) + - docker_image: rostooling/setup-ros-docker:ubuntu-focal-ros-rolling-ros-base-latest + ros_distribution: rolling + ros_version: 2 + container: + image: ${{ matrix.docker_image }} + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Run action-ros-ci + uses: ros-tooling/action-ros-ci@v0.2 + with: + package-name: ndt_omp + target-ros2-distro: ${{ matrix.ros_distribution }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 7829d15d..a081fd37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.3) +cmake_minimum_required(VERSION 3.5) project(ndt_omp) # should use march=native ? @@ -8,6 +8,8 @@ set(CMAKE_CXX_FLAGS "-std=c++14 -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2") # 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 @@ -77,3 +79,38 @@ install( # install headers install(DIRECTORY include/pclomp DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}) +else() +# ROS2 +find_package(ament_cmake_auto REQUIRED) +ament_auto_find_build_dependencies() + +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) + +########### +## Build ## +########### +ament_auto_add_library(ndt_omp SHARED + src/pclomp/voxel_grid_covariance_omp.cpp + src/pclomp/ndt_omp.cpp + src/pclomp/gicp_omp.cpp +) + +target_link_libraries(ndt_omp PUBLIC ${PCL_LIBRARIES}) + +if(OpenMP_CXX_FOUND) + target_link_libraries(ndt_omp PUBLIC OpenMP::OpenMP_CXX) +else() + message(WARNING "OpenMP not found") +endif() + +ament_auto_package() +endif() diff --git a/package.xml b/package.xml index 48161d1e..c0da9ca6 100644 --- a/package.xml +++ b/package.xml @@ -1,5 +1,6 @@ - + + ndt_omp 0.0.0 OpenMP boosted NDT and GICP algorithms @@ -8,12 +9,16 @@ BSD - catkin - pcl_ros - roscpp - pcl_ros - roscpp + catkin + ament_cmake_auto + + pcl_ros + roscpp + + libpcl-all-dev + catkin + ament_cmake From 2205912d232d7c671238314e47d682b9df7883d7 Mon Sep 17 00:00:00 2001 From: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com> Date: Mon, 27 Dec 2021 13:28:22 +0900 Subject: [PATCH 02/10] fix merge error Signed-off-by: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com> --- CMakeLists.txt | 46 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8dbe1752..a081fd37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,24 +25,56 @@ 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} +) -ament_auto_add_library(ndt_omp SHARED +add_library(ndt_omp src/pclomp/voxel_grid_covariance_omp.cpp src/pclomp/ndt_omp.cpp src/pclomp/gicp_omp.cpp ) -target_link_libraries(ndt_omp PUBLIC ${PCL_LIBRARIES}) +add_executable(align + apps/align.cpp +) +add_dependencies(align + ndt_omp +) +target_link_libraries(align + ${catkin_LIBRARIES} + ${PCL_LIBRARIES} + ndt_omp +) -if(OpenMP_CXX_FOUND) - target_link_libraries(ndt_omp PUBLIC OpenMP::OpenMP_CXX) -else() - message(WARNING "OpenMP not found") -endif() +############# +## 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 From d1f29987d1f09c44881ad1f130761eb4e2efdf35 Mon Sep 17 00:00:00 2001 From: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com> Date: Mon, 27 Dec 2021 13:00:10 +0900 Subject: [PATCH 03/10] fix git clone error Signed-off-by: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com> --- docker/melodic/Dockerfile | 4 ++-- docker/melodic_llvm/Dockerfile | 4 ++-- docker/noetic/Dockerfile | 4 ++-- docker/noetic_llvm/Dockerfile | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docker/melodic/Dockerfile b/docker/melodic/Dockerfile index 3a8cd8f8..6e7612f5 100644 --- a/docker/melodic/Dockerfile +++ b/docker/melodic/Dockerfile @@ -11,8 +11,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ 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 clone https://github.com/SMRT-AIST/fast_gicp.git --recursive -RUN git clone https://github.com/koide3/hdl_graph_slam.git +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/ diff --git a/docker/melodic_llvm/Dockerfile b/docker/melodic_llvm/Dockerfile index e0fdb7f2..12f80614 100644 --- a/docker/melodic_llvm/Dockerfile +++ b/docker/melodic_llvm/Dockerfile @@ -11,8 +11,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ 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 clone https://github.com/SMRT-AIST/fast_gicp.git --recursive -RUN git clone https://github.com/koide3/hdl_graph_slam.git +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/ diff --git a/docker/noetic/Dockerfile b/docker/noetic/Dockerfile index 66ce99c6..2a4f2f22 100644 --- a/docker/noetic/Dockerfile +++ b/docker/noetic/Dockerfile @@ -11,8 +11,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ 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 clone https://github.com/SMRT-AIST/fast_gicp.git --recursive -RUN git clone https://github.com/koide3/hdl_graph_slam.git +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/ diff --git a/docker/noetic_llvm/Dockerfile b/docker/noetic_llvm/Dockerfile index fabc6664..9794817e 100644 --- a/docker/noetic_llvm/Dockerfile +++ b/docker/noetic_llvm/Dockerfile @@ -11,8 +11,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ 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 clone https://github.com/SMRT-AIST/fast_gicp.git --recursive -RUN git clone https://github.com/koide3/hdl_graph_slam.git +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/ From 81ce6a18ae229649e22688a1e3f0e26a4d024ac7 Mon Sep 17 00:00:00 2001 From: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com> Date: Mon, 27 Dec 2021 14:40:07 +0900 Subject: [PATCH 04/10] remove duplicate command Signed-off-by: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com> --- docker/melodic/Dockerfile | 1 - docker/melodic_llvm/Dockerfile | 1 - docker/noetic/Dockerfile | 1 - docker/noetic_llvm/Dockerfile | 1 - 4 files changed, 4 deletions(-) diff --git a/docker/melodic/Dockerfile b/docker/melodic/Dockerfile index 6e7612f5..18b8e241 100644 --- a/docker/melodic/Dockerfile +++ b/docker/melodic/Dockerfile @@ -1,7 +1,6 @@ FROM ros:melodic RUN apt-get update && apt-get install -y --no-install-recommends \ - && 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 \ diff --git a/docker/melodic_llvm/Dockerfile b/docker/melodic_llvm/Dockerfile index 12f80614..e7e81596 100644 --- a/docker/melodic_llvm/Dockerfile +++ b/docker/melodic_llvm/Dockerfile @@ -1,7 +1,6 @@ FROM ros:melodic RUN apt-get update && apt-get install -y --no-install-recommends \ - && 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 \ diff --git a/docker/noetic/Dockerfile b/docker/noetic/Dockerfile index 2a4f2f22..0f3f4637 100644 --- a/docker/noetic/Dockerfile +++ b/docker/noetic/Dockerfile @@ -1,7 +1,6 @@ FROM ros:noetic RUN apt-get update && apt-get install -y --no-install-recommends \ - && 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 \ diff --git a/docker/noetic_llvm/Dockerfile b/docker/noetic_llvm/Dockerfile index 9794817e..a699e28f 100644 --- a/docker/noetic_llvm/Dockerfile +++ b/docker/noetic_llvm/Dockerfile @@ -1,7 +1,6 @@ FROM ros:noetic RUN apt-get update && apt-get install -y --no-install-recommends \ - && 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 \ From 2c14db221f3d802be4c511ab5c4b72a12c3d6970 Mon Sep 17 00:00:00 2001 From: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com> Date: Mon, 27 Dec 2021 14:51:13 +0900 Subject: [PATCH 05/10] add Dockerfile for foxy and galactic Signed-off-by: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- CMakeLists.txt | 4 ++-- docker/foxy/Dockerfile | 25 +++++++++++++++++++++++++ docker/foxy_llvm/Dockerfile | 27 +++++++++++++++++++++++++++ docker/galactic/Dockerfile | 25 +++++++++++++++++++++++++ docker/galactic_llvm/Dockerfile | 27 +++++++++++++++++++++++++++ 6 files changed, 107 insertions(+), 3 deletions(-) create mode 100644 docker/foxy/Dockerfile create mode 100644 docker/foxy_llvm/Dockerfile create mode 100644 docker/galactic/Dockerfile create mode 100644 docker/galactic_llvm/Dockerfile diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3206d21f..c88ff165 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ROS_DISTRO: [melodic, melodic_llvm, noetic, noetic_llvm] + ROS_DISTRO: [melodic, melodic_llvm, noetic, noetic_llvm, foxy, foxy_llvm, galactic, galactic_llvm] steps: - uses: actions/checkout@v2 diff --git a/CMakeLists.txt b/CMakeLists.txt index a081fd37..fcb08f82 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,10 +104,10 @@ ament_auto_add_library(ndt_omp SHARED src/pclomp/gicp_omp.cpp ) -target_link_libraries(ndt_omp PUBLIC ${PCL_LIBRARIES}) +target_link_libraries(ndt_omp ${PCL_LIBRARIES}) if(OpenMP_CXX_FOUND) - target_link_libraries(ndt_omp PUBLIC OpenMP::OpenMP_CXX) + target_link_libraries(ndt_omp OpenMP::OpenMP_CXX) else() message(WARNING "OpenMP not found") endif() diff --git a/docker/foxy/Dockerfile b/docker/foxy/Dockerfile new file mode 100644 index 00000000..194db6bd --- /dev/null +++ b/docker/foxy/Dockerfile @@ -0,0 +1,25 @@ +FROM ros:foxy + +RUN apt-get update && apt-get install -y --no-install-recommends \ + wget nano build-essential libomp-dev clang lld git\ + ros-foxy-geodesy ros-foxy-pcl-ros ros-foxy-nmea-msgs \ + ros-foxy-rviz2 ros-foxy-libg2o \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN mkdir -p /root/colcon_ws/src +WORKDIR /root/colcon_ws/src +# Comment it out until the repository supports ROS2 builds. +# 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/colcon_ws/src/ndt_omp/ + +WORKDIR /root/colcon_ws +RUN /bin/bash -c '. /opt/ros/foxy/setup.bash; colcon build' +RUN sed -i "6i source \"/root/colcon_ws/devel/setup.bash\"" /ros_entrypoint.sh + +WORKDIR / + +ENTRYPOINT ["/ros_entrypoint.sh"] +CMD ["bash"] diff --git a/docker/foxy_llvm/Dockerfile b/docker/foxy_llvm/Dockerfile new file mode 100644 index 00000000..1d625deb --- /dev/null +++ b/docker/foxy_llvm/Dockerfile @@ -0,0 +1,27 @@ +FROM ros:foxy + +RUN apt-get update && apt-get install -y --no-install-recommends \ + wget nano build-essential libomp-dev clang lld git\ + ros-foxy-geodesy ros-foxy-pcl-ros ros-foxy-nmea-msgs \ + ros-foxy-rviz2 ros-foxy-libg2o \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN mkdir -p /root/colcon_ws/src +WORKDIR /root/colcon_ws/src +# Comment it out until the repository supports ROS2 builds. +# 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/colcon_ws/src/ndt_omp/ + +RUN update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld 50 + +WORKDIR /root/colcon_ws +RUN /bin/bash -c '. /opt/ros/foxy/setup.bash; CC=clang CXX=clang++ colcon build' +RUN sed -i "6i source \"/root/colcon_ws/devel/setup.bash\"" /ros_entrypoint.sh + +WORKDIR / + +ENTRYPOINT ["/ros_entrypoint.sh"] +CMD ["bash"] diff --git a/docker/galactic/Dockerfile b/docker/galactic/Dockerfile new file mode 100644 index 00000000..23c6bc77 --- /dev/null +++ b/docker/galactic/Dockerfile @@ -0,0 +1,25 @@ +FROM ros:galactic + +RUN apt-get update && apt-get install -y --no-install-recommends \ + wget nano build-essential libomp-dev clang lld git\ + ros-galactic-geodesy ros-galactic-pcl-ros ros-galactic-nmea-msgs \ + ros-galactic-rviz2 ros-galactic-libg2o \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN mkdir -p /root/colcon_ws/src +WORKDIR /root/colcon_ws/src +RUN git clone https://github.com/SMRT-AIST/fast_gicp.git --recursive --depth=1 +# Comment it out until the repository supports ROS2 builds. +# RUN git clone https://github.com/koide3/hdl_graph_slam.git --depth=1 + +COPY . /root/colcon_ws/src/ndt_omp/ + +WORKDIR /root/colcon_ws +RUN /bin/bash -c '. /opt/ros/galactic/setup.bash; colcon build' +RUN sed -i "6i source \"/root/colcon_ws/devel/setup.bash\"" /ros_entrypoint.sh + +WORKDIR / + +ENTRYPOINT ["/ros_entrypoint.sh"] +CMD ["bash"] diff --git a/docker/galactic_llvm/Dockerfile b/docker/galactic_llvm/Dockerfile new file mode 100644 index 00000000..70e655ac --- /dev/null +++ b/docker/galactic_llvm/Dockerfile @@ -0,0 +1,27 @@ +FROM ros:galactic + +RUN apt-get update && apt-get install -y --no-install-recommends \ + wget nano build-essential libomp-dev clang lld git\ + ros-galactic-geodesy ros-galactic-pcl-ros ros-galactic-nmea-msgs \ + ros-galactic-rviz2 ros-galactic-libg2o \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN mkdir -p /root/colcon_ws/src +WORKDIR /root/colcon_ws/src +RUN git clone https://github.com/SMRT-AIST/fast_gicp.git --recursive --depth=1 +# Comment it out until the repository supports ROS2 builds. +# RUN git clone https://github.com/koide3/hdl_graph_slam.git --depth=1 + +COPY . /root/colcon_ws/src/ndt_omp/ + +RUN update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld 50 + +WORKDIR /root/colcon_ws +RUN /bin/bash -c '. /opt/ros/galactic/setup.bash; CC=clang CXX=clang++ colcon build' +RUN sed -i "6i source \"/root/colcon_ws/devel/setup.bash\"" /ros_entrypoint.sh + +WORKDIR / + +ENTRYPOINT ["/ros_entrypoint.sh"] +CMD ["bash"] From 12923c0d0a5bd948a36a7a758ba796a7894945ac Mon Sep 17 00:00:00 2001 From: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com> Date: Mon, 27 Dec 2021 15:10:57 +0900 Subject: [PATCH 06/10] fix build error Signed-off-by: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com> --- docker/galactic/Dockerfile | 2 +- docker/galactic_llvm/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/galactic/Dockerfile b/docker/galactic/Dockerfile index 23c6bc77..dbd39729 100644 --- a/docker/galactic/Dockerfile +++ b/docker/galactic/Dockerfile @@ -9,8 +9,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ RUN mkdir -p /root/colcon_ws/src WORKDIR /root/colcon_ws/src -RUN git clone https://github.com/SMRT-AIST/fast_gicp.git --recursive --depth=1 # Comment it out until the repository supports ROS2 builds. +# 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/colcon_ws/src/ndt_omp/ diff --git a/docker/galactic_llvm/Dockerfile b/docker/galactic_llvm/Dockerfile index 70e655ac..b4d390cc 100644 --- a/docker/galactic_llvm/Dockerfile +++ b/docker/galactic_llvm/Dockerfile @@ -9,8 +9,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ RUN mkdir -p /root/colcon_ws/src WORKDIR /root/colcon_ws/src -RUN git clone https://github.com/SMRT-AIST/fast_gicp.git --recursive --depth=1 # Comment it out until the repository supports ROS2 builds. +# 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/colcon_ws/src/ndt_omp/ From e7aeafa01c6c0b960e67467711be32b6a13a0749 Mon Sep 17 00:00:00 2001 From: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com> Date: Mon, 27 Dec 2021 15:37:48 +0900 Subject: [PATCH 07/10] fix git clone error Signed-off-by: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com> --- docker/melodic/Dockerfile | 1 + docker/melodic_llvm/Dockerfile | 1 + docker/noetic/Dockerfile | 1 + docker/noetic_llvm/Dockerfile | 1 + 4 files changed, 4 insertions(+) diff --git a/docker/melodic/Dockerfile b/docker/melodic/Dockerfile index 18b8e241..0d303842 100644 --- a/docker/melodic/Dockerfile +++ b/docker/melodic/Dockerfile @@ -10,6 +10,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ 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 diff --git a/docker/melodic_llvm/Dockerfile b/docker/melodic_llvm/Dockerfile index e7e81596..d49f8f4b 100644 --- a/docker/melodic_llvm/Dockerfile +++ b/docker/melodic_llvm/Dockerfile @@ -10,6 +10,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ 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 diff --git a/docker/noetic/Dockerfile b/docker/noetic/Dockerfile index 0f3f4637..0bfb865b 100644 --- a/docker/noetic/Dockerfile +++ b/docker/noetic/Dockerfile @@ -10,6 +10,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ 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 diff --git a/docker/noetic_llvm/Dockerfile b/docker/noetic_llvm/Dockerfile index a699e28f..d8689374 100644 --- a/docker/noetic_llvm/Dockerfile +++ b/docker/noetic_llvm/Dockerfile @@ -10,6 +10,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ 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 From 36a9ad52ba7e7779b245233ca41ac76365d528b8 Mon Sep 17 00:00:00 2001 From: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com> Date: Mon, 27 Dec 2021 16:51:40 +0900 Subject: [PATCH 08/10] add new line Signed-off-by: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com> --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index fcb08f82..363fa12c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,6 +98,7 @@ find_package(OpenMP) ########### ## Build ## ########### + ament_auto_add_library(ndt_omp SHARED src/pclomp/voxel_grid_covariance_omp.cpp src/pclomp/ndt_omp.cpp From de1c6ed9c158bc2e943e6c327702eb6ffb53d94d Mon Sep 17 00:00:00 2001 From: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com> Date: Mon, 27 Dec 2021 16:54:50 +0900 Subject: [PATCH 09/10] remove ROS2 build Signed-off-by: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com> --- .github/workflows/build.yml | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c88ff165..d81f0e82 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,38 +32,3 @@ jobs: file: ${{github.workspace}}/docker/${{ matrix.ROS_DISTRO }}/Dockerfile context: . push: false - - build-ros2: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - ros_distribution: - - foxy - - galactic - - rolling - include: - # Foxy Fitzroy (June 2020 - May 2023) - - docker_image: rostooling/setup-ros-docker:ubuntu-focal-ros-foxy-ros-base-latest - ros_distribution: foxy - ros_version: 2 - # Galactic Geochelone (May 2021 - November 2022) - - docker_image: rostooling/setup-ros-docker:ubuntu-focal-ros-galactic-ros-base-latest - ros_distribution: galactic - ros_version: 2 - # Rolling Ridley (June 2020 - Present) - - docker_image: rostooling/setup-ros-docker:ubuntu-focal-ros-rolling-ros-base-latest - ros_distribution: rolling - ros_version: 2 - container: - image: ${{ matrix.docker_image }} - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Run action-ros-ci - uses: ros-tooling/action-ros-ci@v0.2 - with: - package-name: ndt_omp - target-ros2-distro: ${{ matrix.ros_distribution }} From 0246885679bc52b4c6a4f022c684620f77d8ef01 Mon Sep 17 00:00:00 2001 From: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com> Date: Thu, 13 Jan 2022 16:17:41 +0900 Subject: [PATCH 10/10] change to be able to run ci in pull request Signed-off-by: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com> --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d81f0e82..f00df8e9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,6 @@ on: push: branches: [ master ] pull_request: - branches: [ master ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: