diff --git a/.github/workflows/paper.yml b/.github/workflows/paper.yml new file mode 100644 index 0000000..5392adb --- /dev/null +++ b/.github/workflows/paper.yml @@ -0,0 +1,29 @@ +name: Draft PDF +on: + push: + branches: [ paper ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + paper: + runs-on: ubuntu-latest + name: Paper Draft + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build draft PDF + uses: openjournals/openjournals-draft-action@master + with: + journal: joss + # This should be the path to the paper within your repo. + paper-path: docs/paper.md + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: paper + # This is the output path where Pandoc will write the compiled + # PDF. Note, this should be the same directory as the input + # paper.md + path: docs/paper.pdf diff --git a/docs/paper.bib b/docs/paper.bib new file mode 100644 index 0000000..4fa50e9 --- /dev/null +++ b/docs/paper.bib @@ -0,0 +1,120 @@ +@InProceedings{Rusu, + author = {Radu Bogdan Rusu and Steve Cousins}, + title = {{3D is here: Point Cloud Library (PCL)}}, + booktitle = {{IEEE International Conference on Robotics and Automation (ICRA2011)}}, + month = {May}, + year = {2011}, + address = {Shanghai, China}, + doi = {10.1109/ICRA.2011.5980567} +} + +@article{Zhou, + author = {Qian-Yi Zhou and Jaesik Park and Vladlen Koltun}, + title = {{Open3D}: {A} Modern Library for {3D} Data Processing}, + journal = {arXiv:1801.09847}, + year = {2018}, + doi = {10.48550/arXiv.1801.09847} +} + +@ARTICLE{Bai, + author={Bai, Chunge and Xiao, Tao and Chen, Yajie and Wang, Haoqian and Zhang, Fang and Gao, Xiang}, + journal={IEEE Robotics and Automation Letters}, + title={Faster-LIO: Lightweight Tightly Coupled Lidar-Inertial Odometry Using Parallel Sparse Incremental Voxels}, + year={2022}, + volume={7}, + number={2}, + pages={4861-4868}, + doi={10.1109/LRA.2022.3152830} +} + +@inproceedings{Koide, + title = {Voxelized GICP for Fast and Accurate 3D Point Cloud Registration}, + author = {Kenji Koide, Masashi Yokozuka, Shuji Oishi, and Atsuhiko Banno}, + booktitle = {IEEE International Conference on Robotics and Automation (ICRA2021)}, + pages = {11054--11059}, + year = {2021}, + month = {May}, + doi = {10.1109/ICRA48506.2021.9560835} +} + +@article{Zhang, + title={Iterative point matching for registration of free-form curves and surfaces}, + author={Zhang, Zhengyou}, + journal={International journal of computer vision}, + volume={13}, + number={2}, + pages={119--152}, + year={1994}, + publisher={Springer}, + doi={10.1007/BF01427149} +} + +@inproceedings{Segal, + title={Generalized-{ICP}}, + author={Segal, Aleksandr and Haehnel, Dirk and Thrun, Sebastian}, + booktitle={Robotics: science and systems}, + volume={2}, + number={4}, + pages={435}, + year={2009}, + doi={10.15607/rss.2009.v.021} +} + +@INPROCEEDINGS{Wang, + author={Wang, Han and Wang, Chen and Xie, Lihua}, + booktitle={IEEE International Conference on Robotics and Automation (ICRA2020)}, + title={Intensity Scan Context: Coding Intensity and Geometry Relations for Loop Closure Detection}, + year={2020}, + pages={2095-2101}, + doi={10.1109/ICRA40945.2020.9196764} +} + +@inproceedings{Izadinia, + title={Scene recomposition by learning-based icp}, + author={Izadinia, Hamid and Seitz, Steven M}, + booktitle={IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR2020)}, + pages={930--939}, + year={2020}, + doi={10.1109/cvpr42600.2020.00101} +} + +@ARTICLE{Kim, + author={Kim, Kyuwon and Im, Junhyuck and Jee, Gyuin}, + journal={IEEE Transactions on Intelligent Transportation Systems}, + title={Tunnel Facility Based Vehicle Localization in Highway Tunnel Using 3D LIDAR}, + year={2022}, + volume={23}, + number={10}, + pages={17575-17583}, + doi={10.1109/TITS.2022.3160235} +} + +@article{Pomerleau, + author = {Pomerleau, Fran{\c c}ois and Colas, Francis and Siegwart, Roland and Magnenat, St{\'e}phane}, + title = {{Comparing ICP Variants on Real-World Data Sets}}, + journal = {Autonomous Robots}, + year = {2013}, + volume = {34}, + number = {3}, + pages = {133--148}, + month = feb, + doi={10.1007/s10514-013-9327-2} +} + +@INPROCEEDINGS{Serafin, + author={Serafin, Jacopo and Grisetti, Giorgio}, + booktitle={IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS2015)}, + title={NICP: Dense normal based point cloud registration}, + year={2015}, + pages={742-749}, + doi={10.1109/IROS.2015.7353455}} + + +@inproceedings{Datar, +author = {Datar, Mayur and Immorlica, Nicole and Indyk, Piotr and Mirrokni, Vahab S.}, +title = {Locality-sensitive hashing scheme based on p-stable distributions}, +year = {2004}, +doi = {10.1145/997817.997857}, +booktitle = {Twentieth Annual Symposium on Computational Geometry}, +pages = {253–262}, +} \ No newline at end of file diff --git a/docs/paper.md b/docs/paper.md new file mode 100644 index 0000000..e4811fd --- /dev/null +++ b/docs/paper.md @@ -0,0 +1,127 @@ +--- +title: 'small_gicp: Efficient and parallel algorithms for point cloud registration' +tags: + - C++ + - Python + - Point cloud registration +authors: + - name: Kenji Koide + orcid: 0000-0001-5361-1428 + corresponding: true + affiliation: "1" +affiliations: + - name: National Institute of Advanced Industrial Science and Technology (AIST), Japan + index: 1 +date: 22 June 2024 +bibliography: paper.bib +--- + +\def\CC{{C\nolinebreak[4]\hspace{-.05em}\raisebox{.4ex}{\tiny\bf ++}}} + +# Summary + +Point cloud registration is a task of aligning two point clouds measured by 3D ranging +sensors, for example, LiDARs and range cameras. Iterative point cloud registration, +also known as fine registration or local registration, iteratively refines the transformation +between point clouds starting from an initial guess. +Each iteration involves a proximity-based point correspondence search and the minimization +of the distance between corresponding points, continuing until convergence. +Iterative closest point (ICP) and its variants, +such as Generalized ICP, are representative iterative point cloud registration algorithms. +They are widely used in applications like autonomous vehicle localization [@Kim], place recognition [@Wang], +and object classification [@Izadinia]. Since these applications often require real-time or near-real-time +processing, speed is a critical factor in point cloud registration routines. + +**small_gicp** provides efficient and parallel algorithms to create an extremely +fast point cloud registration pipeline. It offers parallel implementations of +downsampling, nearest neighbor search, local feature extraction, and registration +to accelerate the entire process. +small_gicp is implemented as a header-only \CC library with minimal dependencies +to offer efficiency, portability, and customizability. + +# Statement of need + +There are several point cloud processing libraries, and PCL [@Rusu], Open3D +[@Zhou], libpointmatcher [@Pomerleau] are commonly used in real-time applications +owing to their performant implementations. +Although they offer numerous functionalities, including those required for point cloud +registration, they present several challenges for practical applications and scientific +research. + +**Processing speed:** +A typical point cloud registration pipeline includes processes such as downsampling, +nearest neighbor search (e.g., KdTree construction), local feature estimation, and +registration error minimization. +PCL and Open3D support multi-threading only for parts of these processes (feature +estimation and registration error minimization), with the remaining single-threaded +parts often limiting the overall processing speed. +Additionally, the multi-thread implementations in these libraries can have significant +overheads, reducing scalability to many-core CPUs. +These issues make it difficult to meet real-time processing requirements, especially on +low-specification CPUs. It is also difficult to fully utilize the computational power +of modern high-end CPUs. + +**Customizability:** +Customizing the internal workings (e.g., replacing the registration cost function or +changing the correspondence search method) of existing implementations is challenging +due to hard-coded processes. This poses a significant hurdle for research and development, +where testing new cost functions and search algorithms is essential. + +**small_gicp:** +To address these issues and accelerate the development of point cloud registration-related systems, +we designed small_gicp with the following features: + +- Fully parallelized point cloud preprocessing and registration algorithms with minimal overhead, + offering up to 2x speed gain in single-threaded scenarios and better scalability in multi-core + environments. + +- A modular and customizable framework using \CC templates, allowing easy customization of the + algorithm's internal workings while maintaining efficiency. + +- A header-only \CC library implementation for easy integration into user projects, with Python bindings + provided for collaborative use with other libraries (e.g., Open3D). + +# Functionalities + +**small_gicp** implements several preprocessing algorithms related to point cloud registration, and +ICP variant algorithms (point-to-point ICP, point-to-plane ICP, and Generalized ICP based on +distribution-to-distribution correspondence). + +- Downsampling + - Voxelgrid sampling + - Random sampling +- Nearest neighbor search and point accumulation structures + - KdTree + - Linear iVox (supports incremental points insertion and LRU-cache-based voxel deletion) [@Bai] + - Gaussian voxelmap (supports incremental points insertion and LRU-cache-based voxel deletion) [@Koide] +- Registration error functions + - Point-to-point ICP error [@Zhang] + - Point-to-plane ICP error + - Generalized ICP error [@Segal] + - Robust kernels +- Least squares optimizers + - GaussNewton optimizer + - LevenbergMarquardt optimizer + +# Benchmark results + +- Single-threaded and multi-threaded (6 threads) `small_gicp::voxelgrid_sampling` are approximately 1.3x and 3.2x faster than `pcl::VoxelGrid`, respectively. +- Multi-threaded construction of `small_gicp::KdTree` can be up to 6x faster than that of `nanoflann`. +- Single-threaded `small_gicp::GICP` is about 2.4x faster than `pcl::GICP`, with the multi-threaded version showing better scalability. + +More details can be found at \url{https://github.com/koide3/small_gicp/blob/master/BENCHMARK.md}. + +# Future work + +The efficiency of nearest neighbor search significantly impacts the overall performance of point cloud registration. +While small_gicp currently offers efficient and parallel implementations of KdTree and voxelmap, which are general and useful in many situations, +there are other nearest neighbor search methods that can be more efficient under mild assumptions about the point cloud measurement model +(e.g., projective search [@Serafin]). +We plan to implement these alternative neighbor search algorithms to further enhance the speed of the point cloud registration process. +The design of small_gicp, where nearest neighbor search and pose optimization are decoupled, facilitates the easy integration of these new search algorithms. + +# Acknowledgements + +This work was supported in part by JSPS KAKENHI Grant Number 23K16979. + +# References \ No newline at end of file