mirror of https://github.com/koide3/small_gicp.git
This commit is contained in:
parent
31ad85c2d1
commit
941a02ced8
|
|
@ -0,0 +1,39 @@
|
|||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
paths-ignore: '**.md'
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
paths-ignore: '**.md'
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
TOOLCHAIN: [gcc, llvm]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ secrets.GH_PAT }}
|
||||
submodules: recursive
|
||||
|
||||
- name: Docker login
|
||||
continue-on-error: true
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
|
||||
- name: Docker build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
file: ${{github.workspace}}/docker/Dockerfile${{ matrix.TOOLCHAIN }}
|
||||
context: .
|
||||
push: false
|
||||
|
|
@ -63,7 +63,7 @@ if(BUILD_BENCHMARKS)
|
|||
add_compile_definitions(BUILD_WITH_TBB)
|
||||
endif()
|
||||
if (BUILD_WITH_PCL)
|
||||
find_package(PCL REQUIRED)
|
||||
find_package(PCL REQUIRED COMPONENTS registration)
|
||||
add_compile_definitions(BUILD_WITH_PCL)
|
||||
endif()
|
||||
if (BUILD_WITH_IRIDESCENCE)
|
||||
|
|
@ -130,7 +130,7 @@ endif()
|
|||
##########
|
||||
if(BUILD_TESTS)
|
||||
find_package(fmt REQUIRED)
|
||||
find_package(PCL REQUIRED)
|
||||
find_package(PCL REQUIRED COMPONENTS registration)
|
||||
find_package(TBB REQUIRED)
|
||||
|
||||
include(FetchContent)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
FROM ubuntu:jammy
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||
&& apt-get install --no-install-recommends -y \
|
||||
wget nano build-essential git cmake \
|
||||
libeigen3-dev libfmt-dev libtbb-dev libomp-dev libpcl-dev \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY . /root/small_gicp
|
||||
WORKDIR /root/small_gicp/build
|
||||
RUN rm -rf ./*
|
||||
|
||||
RUN cmake .. -DBUILD_WITH_TBB=ON
|
||||
RUN cmake --build . -j$(nproc)
|
||||
|
||||
RUN cmake .. -DBUILD_TESTS=ON -DBUILD_WITH_TBB=ON -DBUILD_BENCHMARKS=ON -DBUILD_WITH_PCL=ON
|
||||
RUN cmake --build . -j$(nproc)
|
||||
RUN ctest -j$(nproc)
|
||||
|
||||
WORKDIR /
|
||||
|
||||
CMD ["bash"]
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
FROM ubuntu:jammy
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||
&& apt-get install --no-install-recommends -y \
|
||||
wget nano build-essential git cmake \
|
||||
libeigen3-dev libfmt-dev libtbb-dev libomp-dev libpcl-dev \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||
&& apt-get install --no-install-recommends -y \
|
||||
clang lld \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld 50
|
||||
ENV CC=clang
|
||||
ENV CXX=clang++
|
||||
|
||||
COPY . /root/small_gicp
|
||||
WORKDIR /root/small_gicp/build
|
||||
RUN rm -rf ./*
|
||||
|
||||
RUN cmake .. -DBUILD_WITH_TBB=ON
|
||||
RUN cmake --build . -j$(nproc)
|
||||
|
||||
RUN cmake .. -DBUILD_TESTS=ON -DBUILD_WITH_TBB=ON -DBUILD_BENCHMARKS=ON -DBUILD_WITH_PCL=ON
|
||||
RUN cmake --build . -j$(nproc)
|
||||
RUN ctest -j$(nproc)
|
||||
|
||||
WORKDIR /
|
||||
|
||||
CMD ["bash"]
|
||||
|
|
@ -79,6 +79,9 @@ align(const std::vector<Eigen::Matrix<double, 4, 1>>&, const std::vector<Eigen::
|
|||
RegistrationResult
|
||||
align(const PointCloud& target, const PointCloud& source, const KdTree<PointCloud>& target_tree, const Eigen::Isometry3d& init_T, const RegistrationSetting& setting) {
|
||||
switch (setting.type) {
|
||||
default:
|
||||
std::cerr << "invalid registration type" << std::endl;
|
||||
abort();
|
||||
case RegistrationSetting::ICP: {
|
||||
Registration<ICPFactor, ParallelReductionOMP> registration;
|
||||
registration.reduction.num_threads = setting.num_threads;
|
||||
|
|
|
|||
Loading…
Reference in New Issue