Skip to content

Commit 4a2ad69

Browse files
Features/ground align and pruning (#55)
* write cpp test for heaptrack * add ground alignment part * add self-similarity check * add ground align to heaptrack test * remove unused piece of code * remove self_similarity_filter flag, make it default * modify pipeline to return all closures for a given local map * update test.cpp for changes in api * modify density map generation after heaptrack insights * use std::size_t for container sizes type consistently * modify functions to implicitly ground align and prune features, rename and constexpr stuff * remove test code for heaptrack * remove explicit API call for ground alignment * modify default config * remove explicit ground alignment, no downsampling before adding to local map * add numeric coz windows is dumb * new API for best, top_k and all closures per map * remove - to also push tar.gz artifact to pypi * Change in API * massive change in API: replace match_and_add function with get_closures * remove gt_closures_pipeline stuff, related 3rdparty librbries * remove from README as well, still available on ICRA2024 tag * add readme to python folder for pypi description * bump version to 2.0.0 * fix name of func * remove the local_map_factor config --------- Co-authored-by: tizianoGuadagnino <[email protected]>
1 parent eef1d23 commit 4a2ad69

35 files changed

+462
-970
lines changed

.github/workflows/cpp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- name: Install dependencies
5050
run: |
5151
sudo apt-get update
52-
sudo apt-get install -y build-essential cmake git libeigen3-dev libtbb-dev libopencv-dev
52+
sudo apt-get install -y build-essential cmake git libeigen3-dev libopencv-dev
5353
- name: Configure CMake
5454
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{github.workspace}}/cpp
5555
- name: Build

.github/workflows/pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
steps:
6060
- uses: actions/download-artifact@v4
6161
with:
62-
pattern: artifact-*
62+
pattern: artifact*
6363
path: dist
6464
merge-multiple: true
6565

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
1111
<a href="https://github.com/PRBonn/MapClosures/blob/main/README.md#Install">Install</a>
1212
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
13-
<a href=https://www.ipb.uni-bonn.de/pdfs/gupta2024icra.pdf>Paper</a>
13+
<a href=https://www.ipb.uni-bonn.de/pdfs/gupta2024icra.pdf>ICRA24 Paper</a>
1414
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
1515
<a href=https://github.com/PRBonn/MapClosures/issues>Contact Us</a>
1616
<br />
@@ -30,7 +30,6 @@ Effectively Detecting Loop Closures using Point Cloud Density Maps.
3030
1. Include the following snippet in your project's `CMakeLists.txt`:
3131
```cmake
3232
set(USE_SYSTEM_EIGEN3 ON CACHE BOOL "use system eigen3")
33-
set(USE_SYSTEM_TBB ON CACHE BOOL "use system tbb")
3433
set(USE_SYSTEM_OPENCV ON CACHE BOOL "use system opencv")
3534
3635
include(FetchContent)
@@ -102,11 +101,6 @@ git checkout ICRA2024
102101
```
103102
Our development aims to push the performances of **MapClosures** above the original results of the paper.
104103

105-
**Note**: You can download the ground-truth loop closure candidates for the datasets used in the paper from [here](https://www.ipb.uni-bonn.de/html/projects/gupta2024icra/MapClosuresGroundtruth.zip). When run with `-e` flag, our pipeline will search for groundtruth data under the folder at path `<data>/loop_closure/`. If not found, it will first generate the groundtruth closures which might consume some time. You can also generate the groundtruth closures following the approach mentioned in our paper using the following command:
106-
```sh
107-
gt_closure_pipeline <dataloader> <path-to-data>
108-
```
109-
110104

111105
## Acknowledgement
112106

config/basic_config.yaml

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

cpp/3rdparty/find_dependencies.cmake

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,8 @@ macro(find_external_dependency PACKAGE_NAME TARGET_NAME INCLUDED_CMAKE_PATH)
4141
endmacro()
4242

4343
find_external_dependency("Eigen3" "Eigen3::Eigen" "${CMAKE_CURRENT_LIST_DIR}/eigen/eigen.cmake")
44-
find_external_dependency("TBB" "TBB::tbb" "${CMAKE_CURRENT_LIST_DIR}/tbb/tbb.cmake")
4544
find_external_dependency("OpenCV" "opencv_features2d"
4645
"${CMAKE_CURRENT_LIST_DIR}/opencv/opencv.cmake")
47-
find_external_dependency("tsl-robin-map" "tsl::robin_map"
48-
"${CMAKE_CURRENT_LIST_DIR}/tsl_robin/tsl_robin.cmake")
46+
find_external_dependency("Sophus" "Sophus::Sophus" "${CMAKE_CURRENT_LIST_DIR}/sophus/sophus.cmake")
4947

5048
include(${CMAKE_CURRENT_LIST_DIR}/hbst/hbst.cmake)
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
MIT License
2-
3-
Copyright (c) 2017 Thibaut Goetghebuer-Planchon <[email protected]>
1+
Copyright (c) 2008-2015 Jesse Beder.
42

53
Permission is hereby granted, free of charge, to any person obtaining a copy
64
of this software and associated documentation files (the "Software"), to deal
@@ -9,13 +7,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
97
copies of the Software, and to permit persons to whom the Software is
108
furnished to do so, subject to the following conditions:
119

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
1412

1513
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1614
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1715
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1816
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1917
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.
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWAR
Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# MIT License
22
#
3-
# Copyright (c) 2022 Ignacio Vizzo, Tiziano Guadagnino, Benedikt Mersch, Cyrill
4-
# Stachniss.
3+
# # Copyright (c) 2023 Saurabh Gupta, Ignacio Vizzo, Cyrill Stachniss, University of Bonn
54
#
65
# Permission is hereby granted, free of charge, to any person obtaining a copy
76
# of this software and associated documentation files (the "Software"), to deal
@@ -21,6 +20,13 @@
2120
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2221
# SOFTWARE.
2322
include(FetchContent)
24-
FetchContent_Declare(tessil SYSTEM
25-
URL https://github.com/Tessil/robin-map/archive/refs/tags/v1.2.1.tar.gz)
26-
FetchContent_MakeAvailable(tessil)
23+
24+
set(SOPHUS_USE_BASIC_LOGGING ON CACHE BOOL "Don't use fmt for Sophus libraru")
25+
set(BUILD_SOPHUS_TESTS OFF CACHE BOOL "Don't build Sophus tests")
26+
set(BUILD_SOPHUS_EXAMPLES OFF CACHE BOOL "Don't build Sophus Examples")
27+
28+
FetchContent_Declare(
29+
sophus SYSTEM URL https://github.com/strasdat/Sophus/archive/refs/tags/1.22.10.tar.gz
30+
PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/sophus.patch UPDATE_DISCONNECTED 1)
31+
32+
FetchContent_MakeAvailable(sophus)

cpp/3rdparty/sophus/sophus.patch

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/sophus/common.hpp b/sophus/common.hpp
2+
index 5634d35b..56a1b590 100644
3+
--- a/sophus/common.hpp
4+
+++ b/sophus/common.hpp
5+
@@ -18,7 +18,7 @@
6+
#define SOPHUS_FMT_CSTR(description, ...) description
7+
#define SOPHUS_FMT_STR(description, ...) std::string(description)
8+
#define SOPHUS_FMT_PRINT(description, ...) std::printf("%s\n", description)
9+
-#define SOPHUS_FMT_ARG(arg)
10+
+#define SOPHUS_FMT_ARG(arg) arg
11+
12+
#else // !SOPHUS_USE_BASIC_LOGGING

cpp/3rdparty/tbb/LICENSE

Lines changed: 0 additions & 201 deletions
This file was deleted.

cpp/3rdparty/tbb/tbb.cmake

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)