Skip to content

Instantly share code, notes, and snippets.

@nicoulaj
Last active December 3, 2016 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicoulaj/497b704de7c0f91631a30dcb08b36e24 to your computer and use it in GitHub Desktop.
Save nicoulaj/497b704de7c0f91631a30dcb08b36e24 to your computer and use it in GitHub Desktop.
PointsCloud VM environment

PCL VM env

This environment builds and install PCL 1.8.0 (http://pointclouds.org) in a Centos 6 virtual machine.

Prerequisites

  • VirtualBox
  • Vagrant

Usage

  • Download this gist zip

  • Extract it

  • Go into directory

  • Launch VM:

      $ vagrant up
    
  • This will start a CentOS 6 VM, checkout PCL master branch and build it

#!/bin/bash
# Enable EPEL
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
# Install dependencies
sudo yum install -y --nogpgcheck \
git \
gcc \
gcc-c++ \
cmake \
boost148 \
boost148-devel \
flann \
flann-devel \
eigen3-devel \
metslib-devel \
zlib \
zlib-devel \
libpng \
libpng-devel \
qhull \
qhull-devel \
vtk \
vtk-devel \
libpcap \
libpcap-devel \
libusb1 \
libusb1-devel\
openni \
openni-devel
# Get sources
git clone --depth 1 https://github.com/PointCloudLibrary/pcl.git
# Prepare build directory
cd pcl
mkdir build
cd build
# Configure
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX:PATH=/usr/local \
-DBoost_INCLUDE_DIR=/usr/include/boost148 \
-DBoost_LIBRARY_DIRS=/usr/lib64/boost148 \
-DBUILD_surface_on_nurbs=ON \
..
# Build
make -j2
# Install
sudo make -j2 install
Vagrant.configure("2") do |config|
config.vm.box = "centos/6"
config.package.name = "pcl-env"
config.vm.host_name = "pcl-env"
config.vm.provider "virtualbox" do |v|
v.memory = 8192
v.cpus = 4
end
config.vm.provision "shell", path: "setup.sh"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment