Skip to content

Commit e6d50e1

Browse files
committed
Initial Commit
1 parent d4d1d68 commit e6d50e1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+3337
-1
lines changed

.clang-format

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
BasedOnStyle: Google
2+
UseTab: Never
3+
IndentWidth: 4
4+
AccessModifierOffset: -4
5+
ColumnLimit: 100
6+
BinPackParameters: false
7+
SortIncludes: true
8+
Standard: c++17
9+
DerivePointerAlignment: false
10+
PointerAlignment: Right

.cmake-format.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
enable_markup: false
2+
line_width: 120
3+
format:
4+
max_subgroups_hwrap: 5

.gitignore

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
build/
2+
install/
3+
log/
4+
results/
5+
wheelhouse/
6+
_skbuild/
7+
.gitlab-ci-local/
8+
9+
# Created by https://www.toptal.com/developers/gitignore/api/python,c++
10+
# Edit at https://www.toptal.com/developers/gitignore?templates=python,c++
11+
### C++ ###
12+
# Prerequisites
13+
*.d
14+
15+
# Compiled Object files
16+
*.slo
17+
*.lo
18+
*.o
19+
*.obj
20+
21+
# Precompiled Headers
22+
*.gch
23+
*.pch
24+
25+
# Compiled Dynamic libraries
26+
*.so
27+
*.dylib
28+
*.dll
29+
30+
# Fortran module files
31+
*.mod
32+
*.smod
33+
34+
# Compiled Static libraries
35+
*.lai
36+
*.la
37+
*.a
38+
*.lib
39+
40+
# Executables
41+
*.exe
42+
*.out
43+
*.app
44+
45+
# Installer logs
46+
pip-log.txt
47+
pip-delete-this-directory.txt
48+
49+
# Unit test / coverage reports
50+
htmlcov/
51+
.tox/
52+
.nox/
53+
.coverage
54+
.coverage.*
55+
.cache
56+
nosetests.xml
57+
coverage.xml
58+
*.cover
59+
*.py,cover
60+
.hypothesis/
61+
.pytest_cache/
62+
cover/
63+
64+
# PyBuilder
65+
.pybuilder/
66+
target/
67+
68+
# Jupyter Notebook
69+
.ipynb_checkpoints
70+
71+
# IPython
72+
profile_default/
73+
ipython_config.py
74+
75+
# Environments
76+
.env
77+
.venv
78+
env/
79+
venv/
80+
ENV/
81+
env.bak/
82+
venv.bak/
83+
84+
### Python ###
85+
# Byte-compiled / optimized / DLL files
86+
__pycache__/
87+
*.py[cod]
88+
*$py.class
89+
90+
# C extensions
91+
*.so
92+
93+
# Distribution / packaging
94+
.Python
95+
build/
96+
develop-eggs/
97+
dist/
98+
downloads/
99+
eggs/
100+
.eggs/
101+
lib/
102+
lib64/
103+
parts/
104+
sdist/
105+
var/
106+
wheels/
107+
share/python-wheels/
108+
*.egg-info/
109+
.installed.cfg
110+
*.egg
111+
MANIFEST
112+
113+
# PyInstaller
114+
# Usually these files are written by a python script from a template
115+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
116+
*.manifest
117+
*.spec
118+
119+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
120+
__pypackages__/
121+
122+
# pytype static type analyzer
123+
.pytype/
124+
125+
# VSCode
126+
.vscode

.gitlab-ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
stages:
2+
- format
3+
- build
4+
cache:
5+
paths:
6+
- .cache/pip
7+
8+
#----- format stage --------------------------------------------------------------------------------
9+
black:
10+
image: python:3.8
11+
stage: format
12+
before_script:
13+
- pip install black
14+
script:
15+
- black --line-length 100 --check $CI_PROJECT_DIR
16+
17+
clang-format:
18+
image: ubuntu:22.04
19+
stage: format
20+
before_script:
21+
- apt-get update && apt-get install --no-install-recommends -y clang-format
22+
script:
23+
- clang-format -Werror --dry-run $(find . -regextype posix-extended -regex ".*\.(cpp|hpp|h)")
24+
25+
#----- build stage ---------------------------------------------------------------------------------
26+
cpp:
27+
image: gitlab.ipb.uni-bonn.de:4567/ssg1002/map_closures:latest
28+
stage: build
29+
script:
30+
make cpp
31+
32+
pip_package:
33+
image: gitlab.ipb.uni-bonn.de:4567/ssg1002/map_closures:latest
34+
stage: build
35+
script:
36+
- VERBOSE=1 pip install --verbose ./python/
37+
- map_closure_pipeline --version

.pre-commit-config.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-added-large-files
9+
- repo: https://github.com/pre-commit/mirrors-clang-format
10+
rev: v14.0.0
11+
hooks:
12+
- id: clang-format
13+
- repo: https://github.com/psf/black
14+
rev: 23.1.0
15+
hooks:
16+
- id: black
17+
args: [--config=python/pyproject.toml]
18+
- repo: https://github.com/ahans/cmake-format-precommit
19+
rev: 8e52fb6506f169dddfaa87f88600d765fca48386
20+
hooks:
21+
- id: cmake-format
22+
- repo: https://github.com/pycqa/isort
23+
rev: 5.12.0
24+
hooks:
25+
- id: isort
26+
args: ["--settings-path=python/pyproject.toml"]

LICENSE

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
MIT License
22

3-
Copyright (c) 2024 Photogrammetry & Robotics Bonn
3+
Copyright (c) 2024 Saurabh Gupta, Tiziano Guadagnino, Benedikt Mersch,
4+
Ignacio Vizzo, Cyrill Stachniss.
45

56
Permission is hereby granted, free of charge, to any person obtaining a copy
67
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.PHONY: cpp
2+
3+
install:
4+
@pip install --verbose ./python/
5+
6+
uninstall:
7+
@pip -v uninstall map-closures
8+
9+
editable:
10+
@pip install scikit-build-core pyproject_metadata pathspec pybind11 ninja cmake
11+
@pip install --no-build-isolation -ve ./python/
12+
13+
cpp:
14+
@cmake -Bbuild cpp/map_closures/
15+
@cmake --build build -j$(nproc --all)

config/README.md

Whitespace-only changes.

config/basic_config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
density_map_resolution: 0.5
2+
density_threshold: 0.05
3+
hamming_distance_threshold: 50
4+
inliers_threshold: 10
5+
local_map_factor: 0.6 # Local Map size as a multiple of the maximum range of the LiDAR

cpp/map_closures/CMakeLists.txt

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# MIT License
2+
#
3+
# Copyright (c) 2024 Saurabh Gupta, Tiziano Guadagnino, Benedikt Mersch,
4+
# Ignacio Vizzo, Cyrill Stachniss.
5+
#
6+
# Permission is hereby granted, free of charge, to any person obtaining a copy
7+
# of this software and associated documentation files (the "Software"), to deal
8+
# in the Software without restriction, including without limitation the rights
9+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
# copies of the Software, and to permit persons to whom the Software is
11+
# furnished to do so, subject to the following conditions:
12+
#
13+
# The above copyright notice and this permission notice shall be included in all
14+
# copies or substantial portions of the Software.
15+
#
16+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
# SOFTWARE.
23+
24+
cmake_minimum_required(VERSION 3.16...3.26)
25+
project(map_closures_cpp VERSION 0.1.0 LANGUAGES CXX)
26+
27+
option(USE_CCACHE "Build using Ccache if found on the path" ON)
28+
option(USE_SYSTEM_EIGEN3 "Use system pre-installed Eigen" ON)
29+
30+
# ccache setup
31+
if(USE_CCACHE)
32+
find_program(CCACHE_PATH ccache)
33+
if(CCACHE_PATH)
34+
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
35+
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
36+
message(STATUS "Using ccache: ${CCACHE_PATH}")
37+
endif()
38+
endif()
39+
40+
set(CMAKE_BUILD_TYPE Release)
41+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
42+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
43+
44+
include(thirdparty/find_dependencies.cmake)
45+
include(cmake/CompilerOptions.cmake)
46+
47+
add_subdirectory(core)
48+
add_subdirectory(pipeline)

0 commit comments

Comments
 (0)