LoginSignup
6
3

More than 3 years have passed since last update.

MacにPCLをインストールする

Last updated at Posted at 2019-04-20

はじめに

普段からPCLを使用していて,それはUbuntu上で動作させていた.
最近Macbook Proを購入して,そちらでの環境はずっと無視していたのだが,そちらでも動作環境があると便利だなと急に思い立ち,すぐにインストールを完了した.

PCL(Point Cloud Library)とは

公式のページはこちらにある.

What is it?
The Point Cloud Library (PCL) is a standalone, large scale, open project for 2D/3D image and point cloud processing.
PCL is released under the terms of the BSD license, and thus free for commercial and research use. We are financially supported by a consortium of commercial companies, with our own non-profit organization, Open Perception. We would also like to thank individual donors and contributors that have been helping the project.

と説明されている.簡単に和訳したものがいかである.どうも英語が苦手なので,間違っていたら指摘していただけるとありがたい.

PCLはスターンドアローンで動作する2D/3D点群処理プロジェクトである.
PCLはBSDライセンスでリリースされており,自由に商用利用および研究利用できる.複数の商業会社によってサポートされている独自の非営利組織である.加えて,プロジェクトを支援する個人にも感謝したい.

点群を処理するためのライブラリである.

インストール方法

調べたところ,MacではHomebrewを用いてコマンド一発でインストールできるようだ.

Homebrewとは

Homebrewを使用していない人はここからやらなくてはいけない.
Homebrewはユーザごとにパッケージを管理してくれる便利なヤツである.
インストール方法はこちらに記載されており,

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

とコマンドを実行すると良い.

PCLのインストール

公式のドキュメンテーションにPCLインストール用のコマンドが記載されており,

$ brew install pcl

とするだけで良い.

cmakeのインストール

PCLのプロジェクトをビルドする際にはcmakeを利用することが推奨されている.なのでこちらもhomebrewからインストールしてしまうと良い.

$ brew install cmake

ビルドエラーが起こるかもしれない

実際にプロジェクトをビルドする際に,以下のエラーがおこった.

buildError
$ make
[ 50%] Linking CXX executable proj
ld: library not found for -lflann
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [proj] Error 1
make[1]: *** [CMakeFiles/proj.dir/all] Error 2
make: *** [all] Error 2

解決方法はこちらに記載した.

6
3
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
6
3