Skip to content

Instantly share code, notes, and snippets.

@gavanderhoorn
Created May 9, 2017 16:35
Show Gist options
  • Save gavanderhoorn/dc83f44b3023af8bc402f82445792a97 to your computer and use it in GitHub Desktop.
Save gavanderhoorn/dc83f44b3023af8bc402f82445792a97 to your computer and use it in GitHub Desktop.
# desktop includes everything, excluding the 'perception' variant, which would install PCL 1.7 related packages
FROM osrf/ros:indigo-desktop
# install PCL prerequisites
RUN echo "deb http://ppa.launchpad.net/v-launchpad-jochen-sprickerhof-de/pcl/ubuntu trusty main" >> /etc/apt/sources.list.d/jochen-pcl.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 19274DEF && \
apt-get update && \
apt-get install -y --no-install-recommends \
libeigen3-dev \
libflann-dev \
libboost-all-dev \
libopenni-dev \
libopenni2-dev \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# install other deps
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
cmake-gui \
doxygen \
freeglut3-dev \
g++ \
git-core \
graphviz \
less \
libboost-all-dev \
libeigen3-dev \
libflann-dev \
libflann1.8 \
libgtest-dev \
libqhull* \
libusb-1.0-0-dev \
libusb-dev \
libvtk5-dev \
libvtk5-qt4-dev \
libvtk5.8 \
libvtk5.8-qt4 \
libvtk-java \
libxi-dev \
libxmu-dev \
mono-complete \
mpi-default-dev \
nano \
openmpi-bin \
openmpi-common \
phonon-backend-gstreamer \
phonon-backend-vlc \
pkg-config \
python-catkin-tools \
python-vtk \
software-properties-common \
tcl-vtk \
wget \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
ENV PCL_ROOT=/tmp/pcl-1.8.0-build
WORKDIR $PCL_ROOT
RUN git clone https://github.com/PointCloudLibrary/pcl.git . && \
git checkout pcl-1.8.0
WORKDIR $PCL_ROOT/build
RUN cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBUILD_examples=OFF \
-DBUILD_global_tests=OFF \
-DBUILD_simulation=OFF \
-DBUILD_surface_on_nurbs=OFF \
.. \
&& \
make -j28 && \
make install && \
rm -rf $PCL_ROOT
# continue with ROS underlay workspace for perception_pcl
ENV UNDERLAY_ROOT=/opt/perception_pcl_ws
WORKDIR $UNDERLAY_ROOT/src
RUN git clone -b indigo-devel https://github.com/ros-perception/perception_pcl.git && \
git clone -b indigo-devel https://github.com/ros-perception/pcl_msgs.git && \
git clone -b indigo-devel https://github.com/ros-perception/pcl_conversions.git && \
cd $UNDERLAY_ROOT && \
rosdep update && \
apt-get update && \
rosdep install --from-paths src --ignore-src -y --skip-keys="libpcl-all-dev libpcl-all" --rosdistro=indigo && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
bash -c "source /opt/ros/indigo/setup.bash && \
catkin config --init --install && \
catkin build --summarize --no-status && \
catkin clean --logs --build --devel -y"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment