Skip to content

Commit 0e91d6f

Browse files
committed
init for TEASER-plusplus
1 parent 617e43e commit 0e91d6f

108 files changed

Lines changed: 31740 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
Language: Cpp
3+
ColumnLimit: 100
4+
DerivePointerAlignment: false
5+
PointerAlignment: Left
6+
SortIncludes: false
7+
InsertNewlineAtEOF: true
8+
...
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[BUG] "
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**Have you run the unit tests?**
14+
15+
- [ ] Yes
16+
- [x] No --- then this issue will be closed.
17+
18+
**Installed Dependencies**
19+
Please report the versions of all dependencies you installed, as well as your OS.
20+
21+
**To Reproduce**
22+
Please post the exact steps you executed to reproduce the bug.
23+
24+
**Additional context**
25+
Add any other context about the problem here.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Unfortunately due to time constraints I won't be able to take any feature requests. All feature requests issues will be closed.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Questions
3+
about: Describe this issue template's purpose here.
4+
title: "[QUESTION]"
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Have you read the documentation?**
11+
12+
- [ ] Yes
13+
- [x] No - then this issue will be closed.
14+
15+
16+
Post your theoretical questions / usage questions here.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: build
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
jobs:
10+
build-debug:
11+
name: CMake Debug Build
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: install-dependencies
16+
run: sudo apt install libeigen3-dev
17+
- name: configure
18+
run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug ..
19+
- name: build
20+
run: cmake --build build
21+
build-release:
22+
name: CMake Release Build
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: install-dependencies
27+
run: sudo apt install libeigen3-dev
28+
- name: configure
29+
run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release ..
30+
- name: build
31+
run: cmake --build build
32+
- name: test
33+
run: cd build && ctest all
34+
python:
35+
name: Python Build
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v4
39+
- name: setup-python
40+
uses: actions/setup-python@v5
41+
with: {python-version: '3.x'}
42+
- name: install-dependencies
43+
run: sudo apt install libeigen3-dev
44+
- name: upgrade-pip
45+
run: python -m pip install --upgrade pip
46+
- name: build
47+
run: python -m pip install ${{github.workspace}}
48+
- name: test
49+
run: python -c "import teaserpp_python; print('☺')"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/bazel-*
2+
BROWSE
3+
/build*
4+
*.bzlc
5+
.cache
6+
.classpath
7+
.clwb/
8+
/ci/bazel-*
9+
compile_commands.json
10+
cscope.*
11+
.deps
12+
/docs/landing_source/.bundle
13+
/generated
14+
.idea/
15+
.project
16+
*.pyc
17+
**/pyformat
18+
SOURCE_VERSION
19+
.settings/
20+
*.sw*
21+
tags
22+
TAGS
23+
/test/coverage/BUILD
24+
/tools/.aspell.en.pws
25+
.vimrc
26+
.vs
27+
.vscode
28+
.ccls-cache
29+
.clangd
30+
/cmake-*
31+
*.m~
32+
python/*.egg-info/
33+
/doc/_build/
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
3+
sphinx:
4+
configuration: doc/conf.py
5+
6+
python:
7+
version: 3.6
8+
install:
9+
- requirements: doc/requirements.txt
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
cmake_minimum_required(VERSION 3.16)
2+
project(teaserpp VERSION 1.0.0)
3+
4+
set(CMAKE_CXX_STANDARD 14)
5+
6+
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/" ${CMAKE_MODULE_PATH})
7+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
8+
9+
# Check build types
10+
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
11+
message(STATUS "Setting build type to 'Release' as none was specified.")
12+
set(CMAKE_BUILD_TYPE "Release" CACHE
13+
STRING "Choose the type of build." FORCE)
14+
endif ()
15+
16+
if (DEFINED SKBUILD)
17+
message(STATUS "Building with Scikit-Build")
18+
endif ()
19+
20+
# Options
21+
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
22+
option(BUILD_TESTS "Build tests" ON)
23+
option(BUILD_TEASER_FPFH "Build TEASER++ wrappers for PCL FPFH estimation." OFF)
24+
option(BUILD_MATLAB_BINDINGS "Build MATLAB bindings" OFF)
25+
option(BUILD_PYTHON_BINDINGS "Build Python bindings" OFF)
26+
option(BUILD_DOC "Build documentation" ON)
27+
option(BUILD_WITH_MARCH_NATIVE "Build with flag march=native" OFF)
28+
option(ENABLE_MKL "Try to use Eigen with MKL" OFF)
29+
option(ENABLE_DIAGNOSTIC_PRINT "Enable printing of diagnostic messages" ON)
30+
31+
if (ENABLE_DIAGNOSTIC_PRINT)
32+
message(STATUS "Enable printing of diagnostic messages.")
33+
add_definitions(-DTEASER_DIAG_PRINT)
34+
endif ()
35+
36+
# Find dependencies
37+
# Eigen3
38+
find_package(Eigen3 3.2 QUIET REQUIRED NO_MODULE)
39+
if (ENABLE_MKL)
40+
find_package(MKL)
41+
if (MKL_FOUND)
42+
message(STATUS "MKL found at: ${MKL_LIBRARIES}")
43+
include_directories(${MKL_INCLUDE_DIR})
44+
add_definitions(-DEIGEN_USE_MKL_ALL)
45+
list(APPEND TEASERPP_BLAS_LAPACK_LIBS ${MKL_LIBRARIES})
46+
else ()
47+
message(STATUS "MKL not found.")
48+
endif ()
49+
endif ()
50+
51+
if (BUILD_TEASER_FPFH)
52+
# Boost
53+
find_package(Boost 1.58 QUIET REQUIRED)
54+
55+
# Suppress CMake warnings
56+
# see here: https://github.com/PointCloudLibrary/pcl/issues/3680
57+
if(NOT DEFINED CMAKE_SUPPRESS_DEVELOPER_WARNINGS)
58+
set(CMAKE_SUPPRESS_DEVELOPER_WARNINGS 1 CACHE INTERNAL "No dev warnings")
59+
endif()
60+
find_package(PCL 1.8 QUIET REQUIRED COMPONENTS common io features kdtree)
61+
62+
# check for -march=native in PCL compile definitions
63+
get_target_property(PCL_COMPILE_OPTIONS pcl_common INTERFACE_COMPILE_OPTIONS)
64+
string(FIND "${PCL_COMPILE_OPTIONS}" "-march=native" PCL_IS_NATIVE)
65+
if (NOT PCL_IS_NATIVE EQUAL -1)
66+
# Fix Eigen alignment conflicting with pcl issue
67+
# See: http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html
68+
add_definitions(-DEIGEN_MAX_STATIC_ALIGN_BYTES=0)
69+
70+
if (NOT BUILD_WITH_MARCH_NATIVE)
71+
message (STATUS "PCL built with -march=native. Enable -march=native for TEASER++ as well")
72+
set(BUILD_WITH_MARCH_NATIVE ON)
73+
endif()
74+
endif()
75+
endif ()
76+
77+
# Building Targets
78+
set(TEASERPP_ROOT ${CMAKE_CURRENT_LIST_DIR})
79+
add_subdirectory(teaser)
80+
81+
if (BUILD_TESTS)
82+
enable_testing()
83+
add_subdirectory(test)
84+
endif ()
85+
86+
if (BUILD_DOC)
87+
add_subdirectory(doc EXCLUDE_FROM_ALL)
88+
endif ()
89+
90+
if (BUILD_MATLAB_BINDINGS)
91+
message(STATUS "Will build MATLAB bindings.")
92+
add_subdirectory(matlab)
93+
endif ()
94+
95+
if (BUILD_PYTHON_BINDINGS)
96+
message(STATUS "TEASER++ Python binding will be built.")
97+
add_subdirectory(python)
98+
endif ()
99+
100+
# export targets
101+
export(TARGETS ${TEASERPP_EXPORTED_TARGETS} FILE teaserpp-exports.cmake)
102+
103+
install(FILES cmake/teaserppConfig.cmake
104+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/teaserpp
105+
)

3rd_party/TEASER-plusplus/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Massachusetts Institute of Technology
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)