Skip to content

Latest commit

 

History

History
75 lines (58 loc) · 2.29 KB

INSTALL_UBUNTU.md

File metadata and controls

75 lines (58 loc) · 2.29 KB

Guide: How to compile on Ubuntu

This guide shows how to compile the Online LiDAR Processor (OLP) on Ubuntu with GCC.
Tested on Ubuntu Bionic (18.04 LTS) and Ubuntu Focal (20.04 LTS).

Install the dependencies

All dependencies can be installed from the standard package repository.

sudo apt-get install build-essential cmake libboost-all-dev libpcl-dev libproj-dev

PCAP support on Ubuntu 18.04

In order to support reading PCAP files, PCL must be compiled with the WITH_PCAP flag. Unfortunately the official prebuilt libraries are built without it on Ubuntu 18.04. (There is no such issue on Ubuntu 20.04!)

If reading PCAP files is not a required functionality (you would like to work directly with the Velodyne sensor), the PCL library installed from the standard package repository will work fine.

Otherwise, you must compile PCL from source with PCAP support.

Compile PCL with PCAP support

Install the dependencies (except PCL) from package repository:

# Install build tools
sudo apt-get install build-essential cmake
# Install the Boost library
sudo apt-get install libboost-all-dev
# Install mandatory dependencies for PCL
sudo apt-get install libboost-all-dev libeigen3-dev libflann-dev libvtk6-dev libvtk6-qt-dev \
 libproj-dev libpcap-dev
# Install optional dependencies for PCL
sudo apt-get install libqhull-dev libopenni-dev

Download and compile PCL with PCAP support (version 1.8+ required for PCAP integration):

wget https://github.com/PointCloudLibrary/pcl/archive/pcl-1.9.1.tar.gz
tar -xvf pcl-1.9.1.tar.gz
cd pcl-pcl-1.9.1

mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_PCAP=YES ..
make -j4
sudo make install

Submodules

The project depends on some locally built tools:

Check out the repository, then initialize the submodules to download the locally built dependencies:

git submodule init
git submodule update

Compile the dependencies:

cd vendor
make

Note: rerun when tools change in the vendor directory.

Compile the program

mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=<install_path>
make
make install