본문 바로가기
Autonomous Vehicle/ROS programming

PCL Install on ROS2

by kim.jeff 2023. 5. 26.

1. Apt-based Installation

sudo apt install libpcl* pcl-tools

 

2. Compling the build file from source

PCL의 경우 버전마다 코드 상의 큰 변화가 있으므로 Source에서 일부 버전을 맞춰야하는 경우가 존재함. 따라서 PCL 공식 홈페이지에서 다운로드 후 빌드하여야 함.

필자의 경우 Ver 1.12 가 필요하여 다음의 Github에서 Tag에서 필요한 버전을 선택하였음.

https://github.com/PointCloudLibrary/pcl

 

GitHub - PointCloudLibrary/pcl: Point Cloud Library (PCL)

Point Cloud Library (PCL). Contribute to PointCloudLibrary/pcl development by creating an account on GitHub.

github.com

 

j@j:~$ cd D
Desktop/   Documents/ Downloads/ 
j@j:~$ cd Documents/pcl-pcl-1.12.0/
j@j:~/Documents/pcl-pcl-1.12.0$ mkdir build && cd build
j@j:~/Documents/pcl-pcl-1.12.0/build$ cmake ..
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works

설치시 참고

https://pcl.readthedocs.io/projects/tutorials/en/latest/compiling_pcl_posix.html

 

Compiling PCL from source on POSIX compliant systems — Point Cloud Library 0.0 documentation

Though not a dependency per se, don’t forget that you also need the CMake build system, at least version 3.5.0. Additional help on how to use the CMake build system is available here. Please note that the following installation instructions are only vali

pcl.readthedocs.io

   49  cd Documents/pcl-pcl-1.12.0/
   50  mkdir build && cd build
   51  cmake ..
   52  make -j2
   53  make -j8
   54  sudo make -j8 install