Home

Awesome

cuPCL

<a><img src="https://img.shields.io/badge/-Documentation-bright"/></a>

cuPCL has some libraries used to process points cloud with CUDA and some samples for their usage. There are several subfolders in the project and every subfolder has:

  1. lib implemented by CUDA
  2. Sample code showing the lib usage and checking the perf and accuracy by comparing its output with PCL's

To get started, follow the instructions below.

Xavier, Orin, and Linux x86 are supported(For Jetpack 4.x, Jetpack 5.x, and Linux x86_64 library, please check the respective branch).

If you run into any issues please let us know.

Getting Started

To get started, follow these steps.

Step 1 - Install Dependencies

Install PCL (Eigen included)

$sudo apt-get update
$sudo apt-get install libpcl-dev

Step 2 - Build

Enter any subfolder and then

make

Step 3 - Run

  1. Please boost CPU and GPU firstly
sudo nvpmodel -m 0
sudo jetson_clocks
  1. Usage:
./demo [*.pcd]

How to check the Version of the Lib

$ strings lib* | grep version | grep lib
lib* version: 1.0 Jun  2 2019 09:30:19

Test Enviroment

Jetson Xavier AGX 8GB
Jetpack 4.4.1
CUDA 10.2
PCL 1.8
Eigen 3

Functions List

cuICP

This project provides:

  1. lib for Icp implemented by CUDA
  2. Sample code showing the lib usage and checking the perf and accuracy by comparing its output with PCL's
  3. two point clounds: test_P.pcd and test_Q.pcd that both having 7000 points

cuFilter

The project provides:<br>

  1. lib for Filter implemented by CUDA
  2. Sample code showing the lib usage and checking the perf and accuracy by comparing its output with PCL's
  3. A point clound: sample.pcd which has 119978 points

NOTE: Now it supports two kinds of filters: PassThrough and VoxelGrid.

cuSegmentation

This package provides:<br>

  1. lib for Segmentation implemented by CUDA
  2. Sample code showing the lib usage and checking the perf and accuracy by comparing its output with PCL's
  3. A point clound: sample.pcd which has 119978 points

NOTE: Now it just supports SAC_RANSAC + SACMODEL_PLANE.

cuOctree

This package provides:<br>

  1. lib for Octree implemented by CUDA
  2. Sample code showing the lib usage and checking the perf and accuracy by comparing its output with PCL's
  3. A point clound: sample.pcd which has 119978 points

NOTE: Now it just supports Radius Search and Approx Nearest Search

cuCluster

This package provides:<br>

  1. lib for Cluster implemented by CUDA
  2. Sample code showing the lib usage and checking the perf and accuracy by comparing its output with PCL's

NOTE:

  1. Cluster can be used to extract objects from points cloud after road plane was removed by Segmentation.
  2. The sample will use a PCD(sample.pcd) file which had removed road plane.

cuNDT

This package provides:

  1. lib for NDT implemented by CUDA
  2. Sample code showing the lib usage and checking the perf and accuracy by comparing its output with PCL's
  3. two point clounds: test_P.pcd and test_Q.pcd that both having 7000 points

Performance Comparison

cuICP

GPUCPU-GICPCPU-ICP
count of points cloud700070007000
maximum of iterations202020
cost time(ms)43.3652.87746.0
fitness_score(the lower the better)0.5140.5250.643

cuFilter

Pass Through

GPUCPU
count of points cloud11w+11w+
down,up FilterLimits(-0.5, 0.5)(-0.5, 0.5)
limitsNegativefalsefalse
Points selected51105110
cost time(ms)0.6609542.97487

VoxelGrid

GPUCPU
count of points cloud11w+11w+
LeafSize(1,1,1)(1,1,1)
Points selected34403440
cost time(ms)3.128957.26262

cuSegmentation

GPUCPU
segment by time(ms)14.934669.6264
model coefficients{-0.00273056, 0.0425288, 0.999092, 1.75528}{-0.00273045, 0.0425287, 0.999092, 1.75528}
find points90549054

cuOctree

GPUCPU
count of points cloud119978119978
down,up FilterLimits(0.0,1.0)(0.0,1.0)
limitsNegativefalsefalse
Points selected1626516265
cost time(ms)0.5897522.82811

cuCluster

GPUCPU
Count of points cloud17w+17w+
Cluster cost time(ms)10.31224016.85

cuNDT

GPUCPU
count of points cloud70007000
cost time(ms)34.7789136.858
fitness_score(the lower the better)0.5380.540

Official Blog

https://developer.nvidia.com/blog/accelerating-lidar-for-robotics-with-cuda-based-pcl/ https://developer.nvidia.com/blog/detecting-objects-in-point-clouds-with-cuda-pointpillars/