28 lines
1.2 KiB
Docker
28 lines
1.2 KiB
Docker
FROM ros:melodic-perception
|
|
|
|
RUN apt-get update && apt-get install -y apt-transport-https ca-certificates gnupg software-properties-common wget libeigen3-dev ros-melodic-cv-bridge ros-melodic-pcl-conversions libgoogle-glog-dev libgflags-dev libatlas-base-dev libsuitesparse-dev libpcl-dev \
|
|
&& wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add - \
|
|
&& apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' \
|
|
&& apt-get update \
|
|
&& apt-get install -y cmake
|
|
|
|
# Install ceres
|
|
RUN git clone --depth 1 --branch 2.0.0 https://ceres-solver.googlesource.com/ceres-solver \
|
|
&& mkdir ceres-bin \
|
|
&& cd ceres-bin \
|
|
&& cmake ../ceres-solver \
|
|
&& make -j`nproc` \
|
|
&& make install
|
|
|
|
# install calibrator
|
|
RUN mv /usr/include/flann/ext/lz4.h /usr/include/flann/ext/lz4.h.bak \
|
|
&& mv /usr/include/flann/ext/lz4hc.h /usr/include/flann/ext/lz4.h.bak \
|
|
&& ln -s /usr/include/lz4.h /usr/include/flann/ext/lz4.h \
|
|
&& ln -s /usr/include/lz4hc.h /usr/include/flann/ext/lz4hc.h
|
|
|
|
WORKDIR /catkin_ws
|
|
ADD ./livox_camera_calib ./src/livox_camera_calib
|
|
RUN . /opt/ros/melodic/setup.sh \
|
|
&& catkin_make \
|
|
&& . /catkin_ws/devel/setup.sh
|