Voltar ao ranking

koide3/fast_gicp

C++

A collection of GICP-based fast point cloud registration algorithms

point-cloudpclgicpicpcudagpumultithreadingregistrationvgicpscan-matchingpythoncpp
Crescimento de estrelas
Estrelas
1.7k
Forks
371
Crescimento semanal
Issues
69
5001k1.5k
fev. de 2020mar. de 2022mai. de 2024jul. de 2026
README

Note: New faster library is released

We released small_gicp that is twice as fast as fast_gicp and with minimum dependencies and clean interfaces.

fast_gicp

This package is a collection of GICP-based fast point cloud registration algorithms. It constains a multi-threaded GICP as well as multi-thread and GPU implementations of our voxelized GICP (VGICP) algorithm. All the implemented algorithms have the PCL registration interface so that they can be used as an inplace replacement for GICP in PCL.

  • FastGICP: multi-threaded GICP algorithm (~40FPS)
  • FastGICPSingleThread: GICP algorithm optimized for single-threading (~15FPS)
  • FastVGICP: multi-threaded and voxelized GICP algorithm (~70FPS)
  • FastVGICPCuda: CUDA-accelerated voxelized GICP algorithm (~120FPS)
  • NDTCuda: CUDA-accelerated D2D NDT algorithm (~500FPS) proctime

Build on melodic & noetic

Installation

Dependencies

We have tested this package on Ubuntu 18.04/20.04 and CUDA 11.1.

On macOS when using brew, you might have to set up your depenencies like this

cmake .. "-DCMAKE_PREFIX_PATH=$(brew --prefix libomp)[;other-custom-prefixes]" -DQt5_DIR=$(brew --prefix qt@5)lib/cmake/Qt5

CUDA

To enable the CUDA-powered implementations, set BUILD_VGICP_CUDA cmake option to ON.

ROS

cd ~/catkin_ws/src
git clone https://github.com/SMRT-AIST/fast_gicp --recursive
cd .. && catkin_make -DCMAKE_BUILD_TYPE=Release
# enable cuda-based implementations
# cd .. && catkin_make -DCMAKE_BUILD_TYPE=Release -DBUILD_VGICP_CUDA=ON

Non-ROS

git clone https://github.com/SMRT-AIST/fast_gicp --recursive
mkdir fast_gicp/build && cd fast_gicp/build
cmake .. -DCMAKE_BUILD_TYPE=Release
# enable cuda-based implementations
# cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_VGICP_CUDA=ON
make -j8

Python bindings

cd fast_gicp
python3 setup.py install --user

Note: If you are on a catkin-enabled environment and the installation doesn't work well, comment out find_package(catkin) in CMakeLists.txt and run the above installation command again.

import pygicp

target = # Nx3 numpy array
source = # Mx3 numpy array

# 1. function interface
matrix = pygicp.align_points(target, source)

# optional arguments
# initial_guess               : Initial guess of the relative pose (4x4 matrix)
# method                      : GICP, VGICP, VGICP_CUDA, or NDT_CUDA
# downsample_resolution       : Downsampling resolution (used only if positive)
# k_correspondences           : Number of points used for covariance estimation
# max_correspondence_distance : Maximum distance for corresponding point search
# voxel_resolution            : Resolution of voxel-based algorithms
# neighbor_search_method      : DIRECT1, DIRECT7, DIRECT27, or DIRECT_RADIUS
# neighbor_search_radius      : Neighbor voxel search radius (for GPU-based methods)
# num_threads                 : Number of threads


# 2. class interface
# you may want to downsample the input clouds before registration
target = pygicp.downsample(target, 0.25)
source = pygicp.downsample(source, 0.25)

# pygicp.FastGICP has more or less the same interfaces as the C++ version
gicp = pygicp.FastGICP()
gicp.set_input_target(target)
gicp.set_input_source(source)
matrix = gicp.align()

# optional
gicp.set_num_threads(4)
gicp.set_max_correspondence_distance(1.0)
gicp.get_final_transformation()
gicp.get_final_hessian()

Benchmark

CPU:Core i9-9900K GPU:GeForce RTX2080Ti

roscd fast_gicp/data
rosrun fast_gicp gicp_align 251370668.pcd 251371071.pcd
target:17249[pts] source:17518[pts]
--- pcl_gicp ---
single:127.508[msec] 100times:12549.4[msec] fitness_score:0.204892
--- pcl_ndt ---
single:53.5904[msec] 100times:5467.16[msec] fitness_score:0.229616
--- fgicp_st ---
single:111.324[msec] 100times:10662.7[msec] 100times_reuse:6794.59[msec] fitness_score:0.204379
--- fgicp_mt ---
single:20.1602[msec] 100times:1585[msec] 100times_reuse:1017.74[msec] fitness_score:0.204412
--- vgicp_st ---
single:112.001[msec] 100times:7959.9[msec] 100times_reuse:4408.22[msec] fitness_score:0.204067
--- vgicp_mt ---
single:18.1106[msec] 100times:1381[msec] 100times_reuse:806.53[msec] fitness_score:0.204067
--- vgicp_cuda (parallel_kdtree) ---
single:15.9587[msec] 100times:1451.85[msec] 100times_reuse:695.48[msec] fitness_score:0.204061
--- vgicp_cuda (gpu_bruteforce) ---
single:53.9113[msec] 100times:3463.5[msec] 100times_reuse:1703.41[msec] fitness_score:0.204049
--- vgicp_cuda (gpu_rbf_kernel) ---
single:5.91508[msec] 100times:590.725[msec] 100times_reuse:226.787[msec] fitness_score:0.20557

See src/align.cpp for the detailed usage.

Test on KITTI

C++

# Perform frame-by-frame registration
rosrun fast_gicp gicp_kitti /your/kitti/path/sequences/00/velodyne

kitti00

Python

cd fast_gicp/src
python3 kitti.py /your/kitti/path/sequences/00/velodyne

Note

In some environments, setting a fewer number of threads rather than the (default) maximum number of threads may result in faster processing (see https://github.com/SMRT-AIST/fast_gicp/issues/145#issuecomment-1890885373).

Papers

  • Kenji Koide, Masashi Yokozuka, Shuji Oishi, and Atsuhiko Banno, Voxelized GICP for fast and accurate 3D point cloud registration, ICRA2021 [link]

Contact

Kenji Koide, k.koide@aist.go.jp

Human-Centered Mobility Research Center, National Institute of Advanced Industrial Science and Technology, Japan [URL]

Repositórios relacionados
PointCloudLibrary/pcl

Point Cloud Library (PCL)

C++Otherpclc-plus-plus
pointclouds.org
11.1k4.7k
timzhang642/3D-Machine-Learning

A resource repository for 3D machine learning

3d-reconstructionpapers
10.2k1.8k
google/draco

Draco is a library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics.

C++Apache License 2.0point-cloud3d-graphics
google.github.io/draco/
7.4k1.1k
open-mmlab/mmdetection3d

OpenMMLab's next-generation platform for general 3D object detection.

PythonPyPIApache License 2.0pytorch3d-object-detection
mmdetection3d.readthedocs.io/en/latest/
6.5k1.8k
OpenDroneMap/ODM

A command line toolkit to generate maps, point clouds, 3D models and DEMs from drone, balloon or kite images. 📷

PythonPyPIGNU Affero General Public License v3.0point-cloudphotogrammetry
opendronemap.org
6.3k1.3k
CGAL/cgal

The public CGAL repository, see the README below

C++Othercgalc-plus-plus
github.com/CGAL/cgal
6k1.6k
cnr-isti-vclab/meshlab

The open source mesh processing system

C++GNU General Public License v3.03dmesh
meshlab.net
5.8k906
open-mmlab/OpenPCDet

OpenPCDet Toolbox for LiDAR-based 3D Object Detection.

PythonPyPIApache License 2.0point-cloud3d-detection
5.7k1.5k
charlesq34/pointnet

PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation

PythonPyPIOtherpoint-cloudclassification
5.4k1.5k
yanx27/Pointnet_Pointnet2_pytorch

PointNet and PointNet++ implemented by pytorch (pure python) and on ModelNet, ShapeNet and S3DIS.

PythonPyPIMIT Licensepointnetpointnet2
4.9k1k
CloudCompare/CloudCompare

CloudCompare main repository

C++Otherpoint-cloud3d-point-clouds
cloudcompare.org
4.6k1.2k
cdcseacave/openMVS

open Multi-View Stereo reconstruction library

C++GNU Affero General Public License v3.0multi-view-stereo3d-reconstruction
cdcseacave.github.io
4.1k982