LoginSignup
2
0

More than 1 year has passed since last update.

CUDA-PCLのJetson AGX Xavierでの動作確認

Last updated at Posted at 2021-06-16

用意するもの

  • Jetson AGX Xavier(JetPack4.5.1)

必要なパッケージのインストール

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

動作モードの変更

sudo nvpmodel -m 0

プロジェクトをgit clone

git clone https://github.com/NVIDIA-AI-IOT/cuda-pcl

Make(Segmentation)と実行

cd cuda-pcl/cuda-segmentation/
make
./demo sample.pcd
GPU has cuda devices: 1
----device id: 0 info----
  GPU : Xavier 
  Capbility: 7.2
  Global memory: 15816MB
  Const memory: 64KB
  SM in a block: 48KB
  warp size: 32
  threads in a block: 1024
  block dim: (1024,1024,64)
  grid dim: (2147483647,65535,65535)

-------------------------
CUDA segment by Time: 18.8978 ms.
CUDA modelCoefficients: -0.00269913 0.0424975 0.999093 2.10639
CUDA find points: 7519
-------------------------
PCL(CPU) segment by Time: 80.8026 ms.
Model coefficients: -0.0026991 0.0424981 0.999093 2.10639
Model inliers: 7519

Make(fillter)と実行

cd cuda-pcl/cuda-fillter/
make
./demo sample.pcd
GPU has cuda devices: 1
----device id: 0 info----
  GPU : Xavier 
  Capbility: 7.2
  Global memory: 15816MB
  Const memory: 64KB
  SM in a block: 48KB
  warp size: 32
  threads in a block: 1024
  block dim: (1024,1024,64)
  grid dim: (2147483647,65535,65535)


------------checking CUDA ---------------- 
CUDA Loaded 119978 data points from PCD file with the following fields: x y z

------------checking CUDA PassThrough ---------------- 
CUDA PassThrough by Time: 0.513827 ms.
CUDA PassThrough before filtering: 119978
CUDA PassThrough after filtering: 5110

------------checking CUDA VoxelGrid---------------- 
CUDA VoxelGrid by Time: 5.12201 ms.
CUDA VoxelGrid before filtering: 119978
CUDA VoxelGrid after filtering: 3440


------------checking PCL ---------------- 
PCL(CPU) Loaded 119978 data points from PCD file with the following fields: x y z

------------checking PCL(CPU) PassThrough ---------------- 
PCL(CPU) PassThrough by Time: 4.53807 ms.
PointCloud before filtering: 119978 data points (x y z).
PointCloud after filtering: 5110 data points (x y z).

------------checking PCL VoxelGrid---------------- 
PCL VoxelGrid by Time: 13.6458 ms.
PointCloud before filtering: 119978 data points (x y z).
PointCloud after filtering: 3440 data points (x y z).

Make(ICP)と実行

cd cuda-pcl/cuda-icp/
make
./demo test_P.pcd test_Q.pcd
GPU has cuda devices: 1
----device id: 0 info----
  GPU : Xavier 
  Capbility: 7.2
  Global memory: 15816MB
  Const memory: 64KB
  SM in a block: 48KB
  warp size: 32
  threads in a block: 1024
  block dim: (1024,1024,64)
  grid dim: (2147483647,65535,65535)

Loaded 7000 data points for P with the following fields: x y z
Loaded 7000 data points for Q with the following fields: x y z
 iter.Maxiterate 0
 iter.threshold 0
 iter.acceptrate 1

Target rigid transformation : cloud_in -> cloud_icp
Rotation matrix :
    | 0.923880 -0.382683 0.000000 | 
R = | 0.382683 0.923880 0.000000 | 
    | 0.000000 0.000000 1.000000 | 
Translation vector :
t = < 0.000000, 0.000000, 0.200000 >

------------checking CUDA ICP(GPU)---------------- 
CUDA ICP by Time: 0.671692 ms.
CUDA ICP fitness_score: 0.777453
matrix_icp calculated Matrix by Class ICP 
Rotation matrix :
    | 1.000000 0.000000 -0.000000 | 
R = | -0.000000 1.000000 0.000000 | 
    | -0.000000 0.000000 1.000000 | 
Translation vector :
t = < -0.000000, 0.000000, -0.000000 >

------------checking PCL ICP(CPU)---------------- 
PCL icp.align Time: 36.1408 ms.
has converged: 1 score: 0.651369
CUDA ICP fitness_score: 0.651369
transformation_matrix:
   0.999905  0.00279406   0.0134922   0.0161865
-0.00265722    0.999945   -0.010151  0.00527596
 -0.0135198   0.0101141    0.999858   0.0133578
          0           0           0           1

------------checking PCL GICP(CPU)---------------- 
PCL Gicp.align Time: 143.535 ms.
has converged: 1 score: 0.541552
transformation_matrix:
    0.99874  0.00468762   0.0499603  -0.0427716
-0.00344507    0.999683  -0.0249281   0.0265501
 -0.0500613   0.0247246     0.99844    0.148036
          0           0           0           1
2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0