PCL pointer Ptr 예제

이번 시간에는 아래의 예시를 통해 어떻게 쓰면 될지 하나하나 알아가보도록 하겠습니다.

Line-by-line으로 주석을 달아두었으니 한번 살펴보시길 바랍니다 :)

스스로 잘 이해했는지 테스트

Q1. Ptr을 new를 통해 선언한 pcl::PointCloud<pcl::PointXYZ>::Ptr, Cloudpcl::PointCloud<pcl::PointXYZ>로 선언한 pointcloud라 간략히 표현했을 때,

  • Ptr = Ptr
  • *Ptr = *Ptr
  • *Ptr = Cloud
  • Cloud = *Ptr

이 각각 어떤 의미인가?

img_file

Q2. 위의 그림을 보고 어떤 상황인지 설명이 가능한가?

의미에 답을 내리지 못하시겠으면, 위의 예제 코드를 좀더 차근차근 읽어보시길 바랍니다. :)


Point Cloud Library Tutorial 시리즈입니다.

모든 코드는 이 레포지토리에 있고, ros package로 구성되어 있어 build하여 직접 돌려보실 수 있습니다

  1. ROS Point Cloud Library (PCL) - 0. Tutorial 및 기본 사용법
  2. ROS Point Cloud Library (PCL) - 1. Ptr, ConstPtr의 완벽 이해 (1) shared_ptr
  3. ROS Point Cloud Library (PCL) - 1. Ptr, ConstPtr의 완벽 이해 (2) Ptr in PCL
  4. ROS Point Cloud Library (PCL) - 1. Ptr, ConstPtr의 완벽 이해 (3) Ptr in 클래스 멤버변수
  5. ROS Point Cloud Library (PCL) - 2. 형변환 - toROSMsg, fromROSMsg
  6. ROS Point Cloud Library (PCL) - 3. Transformation
  7. ROS Point Cloud Library (PCL) - 4. Viewer로 visualization하는 법
  8. ROS Point Cloud Library (PCL) - 5. Voxelization
  9. ROS Point Cloud Library (PCL) - 6. PassThrough
  10. ROS Point Cloud Library (PCL) - 7. Statistical Outlier Removal
  11. ROS Point Cloud Library (PCL) - 8. KdTree를 활용한 Radius Search
  12. ROS Point Cloud Library (PCL) - 9. KdTree를 활용한 K-nearest Neighbor Search (KNN)
  13. ROS Point Cloud Library (PCL) - 10. Normal Estimation
  14. ROS Point Cloud Library (PCL) - 11. Iterative Closest Point (ICP)
  15. ROS Point Cloud Library (PCL) - 12. Generalized Iterative Closest Point (G-ICP)