Skip to content

Commit 4a04254

Browse files
authored
Merge pull request #7 from TUMFTM/1-missing-dataloader-variety
1 missing dataloader variety
2 parents fef9e6f + df8dc7c commit 4a04254

37 files changed

+731
-182
lines changed

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ BinPackParameters: false
77
SortIncludes: true
88
Standard: c++20
99
DerivePointerAlignment: false
10-
PointerAlignment: Right
10+
PointerAlignment: Right

.cmake-format.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
enable_markup: false
22
line_width: 120
33
format:
4-
max_subgroups_hwrap: 5
4+
max_subgroups_hwrap: 5

Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,17 @@ RUN apt-get update && apt-get install -y -q --no-install-recommends \
3434
wget \
3535
libeigen3-dev \
3636
libomp-dev \
37+
libtbb-dev \
3738
libgoogle-glog-dev \
3839
libgflags-dev \
3940
libatlas-base-dev \
4041
libsuitesparse-dev \
41-
libpcl-dev \
42-
python3-pip
42+
python3-dev \
43+
python3-pip \
44+
python3-setuptools \
45+
python3-distutils \
46+
pybind11-dev \
47+
liblzf-dev
4348

4449
RUN pip install numpy ninja
4550

@@ -52,7 +57,7 @@ RUN wget http://ceres-solver.org/ceres-solver-2.2.0.tar.gz && \
5257
cmake ../ceres-solver-2.2.0 && make -j3 && make test && make install
5358

5459
# Irindescence
55-
RUN apt-get update && apt-get install -y -q --no-install-recommends curl gnupg
60+
RUN apt-get update && apt-get install -y -q --no-install-recommends curl gnupg libpng-dev libjpeg-dev
5661
RUN mkdir -m 0755 -p /etc/apt/keyrings/
5762
RUN curl -fsSL https://koide3.github.io/ppa/ubuntu2204/KEY.gpg | gpg --dearmor -o /etc/apt/keyrings/koide3_ppa.gpg
5863
RUN echo "deb [signed-by=/etc/apt/keyrings/koide3_ppa.gpg] https://koide3.github.io/ppa/ubuntu2204 ./" | tee /etc/apt/sources.list.d/koide3_ppa.list > /dev/null

Dockerfile.dev

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,17 @@ RUN apt-get update && apt-get install -y -q --no-install-recommends \
3434
wget \
3535
libeigen3-dev \
3636
libomp-dev \
37+
libtbb-dev \
3738
libgoogle-glog-dev \
3839
libgflags-dev \
3940
libatlas-base-dev \
4041
libsuitesparse-dev \
41-
libpcl-dev \
42-
python3-pip
42+
python3-dev \
43+
python3-pip \
44+
python3-setuptools \
45+
python3-distutils \
46+
pybind11-dev \
47+
liblzf-dev
4348

4449
RUN pip install numpy ninja
4550

@@ -52,7 +57,7 @@ RUN wget http://ceres-solver.org/ceres-solver-2.2.0.tar.gz && \
5257
cmake ../ceres-solver-2.2.0 && make -j3 && make test && make install
5358

5459
# Irindescence
55-
RUN apt-get update && apt-get install -y -q --no-install-recommends curl gnupg
60+
RUN apt-get update && apt-get install -y -q --no-install-recommends curl gnupg libpng-dev libjpeg-dev
5661
RUN mkdir -m 0755 -p /etc/apt/keyrings/
5762
RUN curl -fsSL https://koide3.github.io/ppa/ubuntu2204/KEY.gpg | gpg --dearmor -o /etc/apt/keyrings/koide3_ppa.gpg
5863
RUN echo "deb [signed-by=/etc/apt/keyrings/koide3_ppa.gpg] https://koide3.github.io/ppa/ubuntu2204 ./" | tee /etc/apt/sources.list.d/koide3_ppa.list > /dev/null

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
<h2>Zero-Drift Point Cloud Mapping using Map Priors</h2>
44
<br>
55

6+
![C++](https://img.shields.io/badge/-C++-blue?logo=cplusplus)
7+
![Python](https://img.shields.io/badge/Python-3670A0?logo=python&logoColor=ffdd54)
68
[![Docker](https://badgen.net/badge/icon/docker?icon=docker&label)](https://www.docker.com/)
79
![License](https://img.shields.io/badge/license-Apache%202.0-blue)
8-
![Version](https://img.shields.io/badge/version-0.1.0-blue)
10+
![Version](https://img.shields.io/badge/version-0.2.0-blue)
911
[![arXiv](https://img.shields.io/badge/arXiv-1234.56789-b31b1b.svg)](https://arxiv.org/abs/2501.11111)
1012

1113
<br align="center">
@@ -35,9 +37,11 @@ We provide a Docker image on Docker Hub, which will automatically be pulled with
3537
<details>
3638
<summary>Run</summary>
3739

38-
To use our approach, you need a reference map and an initial guess of the first pose.
40+
To use our approach, you need a reference map and an initial guess of the first pose.
41+
More details on reference maps can be found in our paper.
3942

40-
The easiest way to use our approach is with the provided Docker image.
43+
The easiest way to use our approach is with the provided Docker image.
44+
We currently support point cloud files in `.bin`(KITTI), `.pcd`, `.ply` and `.xyz`.
4145
```sh
4246
./docker/run_docker.sh <map_path> <scan_path> <output_path> <x> <y> <z> <qx> <qy> <qz> <qw>
4347

@@ -89,11 +93,7 @@ pip install -e .
8993

9094
## Limitations
9195

92-
* Currently only the KITTI .bin dataloader is implemented
93-
* The reference map has to be in the .pcd format
94-
* Detailed instructions on how to create refrence maps is missing
95-
* Currently the visualization is active on default
96-
* Move to nanobind
96+
* Detailed instructions on how to create refrence maps are missing
9797

9898
## Acknowledgement
9999

@@ -102,6 +102,7 @@ Great inspiration has come from the following repositories. If you use our work,
102102
* [KISS-ICP](https://github.com/PRBonn/kiss-icp)
103103
* [small_gicp](https://github.com/koide3/small_gicp)
104104
* [Iridescence](https://github.com/koide3/iridescence)
105+
* [Open3D](https://github.com/isl-org/Open3D)
105106

106107

107108
## Citation

cpp/CMakeLists.txt

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
1414

1515
find_package(Eigen3 REQUIRED)
1616
find_package(Ceres REQUIRED)
17-
find_package(PCL REQUIRED)
1817
find_package(Iridescence REQUIRED)
1918

19+
find_path(LIBLZF_INCLUDE_DIR lzf.h PATH_SUFFIXES liblzf)
20+
find_library(LIBLZF_LIBRARY NAMES lzf liblzf)
21+
2022
# Fetch external dependencies
2123
include(FetchContent)
2224
FetchContent_Declare(small_gicp GIT_REPOSITORY https://github.com/ga58lar/small_gicp)
@@ -29,18 +31,21 @@ add_library(
2931
core/pose_graph.cpp
3032
core/prediction.cpp
3133
core/preprocess.cpp
32-
io/kitti_loader.cpp
33-
io/map_loader.cpp
34+
io/format/kitti.cpp
35+
io/format/xyz.cpp
36+
io/format/pcd.cpp
37+
io/format/ply.cpp
38+
io/loader_factory.cpp
3439
pipeline/openlidarmap.cpp
3540
utils/file_utils.cpp
3641
utils/pose_utils.cpp
3742
utils/helpers.cpp)
3843

39-
target_include_directories(openlidarmap_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} PRIVATE ${PCL_INCLUDE_DIRS}
40-
${small_gicp_INCLUDE_DIRS})
44+
target_include_directories(openlidarmap_lib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} PRIVATE ${small_gicp_INCLUDE_DIRS}
45+
${LIBLZF_INCLUDE_DIR})
4146

42-
target_link_libraries(openlidarmap_lib PUBLIC Eigen3::Eigen small_gicp ${PCL_LIBRARIES} Ceres::ceres
43-
PRIVATE Iridescence::Iridescence stdc++fs)
47+
target_link_libraries(openlidarmap_lib PUBLIC Eigen3::Eigen small_gicp Ceres::ceres PRIVATE Iridescence::Iridescence
48+
stdc++fs ${LIBLZF_LIBRARY})
4449

4550
# Add executable
4651
add_executable(openlidarmap_cpp apps/main.cpp)

cpp/config/kernel_config.hpp

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@
44

55
namespace openlidarmap::config {
66

7-
struct KernelConfig {
8-
double model_sse{};
9-
size_t num_samples{};
10-
double sigma{};
11-
12-
KernelConfig()
13-
: model_sse(1.0),
14-
num_samples(1),
15-
sigma(1.0) {}
16-
};
17-
18-
} // namespace openlidarmap::config
7+
struct KernelConfig {
8+
double model_sse{};
9+
size_t num_samples{};
10+
double sigma{};
11+
12+
KernelConfig() : model_sse(1.0), num_samples(1), sigma(1.0) {}
13+
};
14+
15+
} // namespace openlidarmap::config

cpp/config/preprocess_config.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ struct PreProcessConfig {
88
double downsampling_resolution{};
99
int num_neighbors{};
1010

11-
PreProcessConfig() : min_range(5.0), max_range(100.0),
12-
downsampling_resolution(1.5), num_neighbors(10) {}
11+
PreProcessConfig()
12+
: min_range(5.0), max_range(100.0), downsampling_resolution(1.5), num_neighbors(10) {}
1313
};
1414

1515
} // namespace openlidarmap::config

cpp/config/types.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,8 @@
44
#include <Eigen/Core>
55
#include <Eigen/Geometry>
66

7-
// PCL
8-
#include <pcl/point_cloud.h>
9-
#include <pcl/point_types.h>
10-
117
namespace openlidarmap {
128

13-
using PointT = pcl::PointXYZ;
14-
using PointCloudT = pcl::PointCloud<PointT>;
159
using Vector7d = Eigen::Matrix<double, 7, 1>;
1610

1711
} // namespace openlidarmap

cpp/core/pose_factor_abs.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ struct AbsPoseError {
1313
template <typename T>
1414
bool operator()(const T *const pose, T *residual) const {
1515
constexpr double STDDEV = 1.0;
16-
16+
1717
for (int i = 0; i < 3; ++i) {
1818
residual[i] = (pose[i] - T(abs_measure_[i])) / T(STDDEV);
1919
}
2020

2121
// Quaternion error
2222
Eigen::Quaternion<T> q1(pose[6], pose[3], pose[4], pose[5]);
23-
Eigen::Quaternion<T> q2{T(abs_measure_[6]), T(abs_measure_[3]),
24-
T(abs_measure_[4]), T(abs_measure_[5])};
23+
Eigen::Quaternion<T> q2{T(abs_measure_[6]), T(abs_measure_[3]), T(abs_measure_[4]),
24+
T(abs_measure_[5])};
2525
Eigen::Quaternion<T> q_error = q1.normalized() * q2.normalized().inverse();
2626

2727
// Convert quaternion error to residual

0 commit comments

Comments
 (0)