-
Notifications
You must be signed in to change notification settings - Fork 13
/
dockerfile
55 lines (51 loc) · 1.74 KB
/
dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM osrf/ros:melodic-desktop-full
# Install GTSAM
RUN apt-get update \
&& apt install -y software-properties-common \
&& add-apt-repository -y ppa:borglab/gtsam-release-4.0 \
&& apt-get update \
&& apt install -y libgtsam-dev libgtsam-unstable-dev \
&& rm -rf /var/lib/apt/lists/*
# Install SLAM support library
RUN apt-get update \
&& apt-get install -y curl \
&& curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - \
&& apt-get install -y \
ros-melodic-navigation \
ros-melodic-robot-localization \
ros-melodic-robot-state-publisher \
ros-melodic-pcl-ros \
libopencv-dev \
libopencv-contrib-dev \
libpcap-dev \
python3-pip \
git \
unzip \
ros-melodic-roslint \
&& rm -rf /var/lib/apt/lists/*
# Install ceres
RUN apt-get update && apt-get install -y \
cmake \
git \
build-essential \
libgoogle-glog-dev \
libatlas-base-dev \
libeigen3-dev \
libsuitesparse-dev
RUN git clone -b 2.1.0 https://ceres-solver.googlesource.com/ceres-solver /ceres-solver
WORKDIR /ceres-solver/build
RUN cmake .. && make -j$(nproc) && make install
RUN apt install vim -y
# Add packages
WORKDIR /catkin_ws
ADD ./livox_ros_driver /catkin_ws/src/livox_ros_driver
RUN bash -c 'source /opt/ros/melodic/setup.bash && \
catkin_make -DCATKIN_WHITELIST_PACKAGES="livox_ros_driver"'
ADD ./union-cloud /catkin_ws/src/union-cloud
RUN bash -c 'source /opt/ros/melodic/setup.bash && \
catkin_make -DCATKIN_WHITELIST_PACKAGES="union_cloud"'
ADD ./mm-loam /catkin_ws/src/mm-loam
RUN bash -c 'source /opt/ros/melodic/setup.bash && \
catkin_make -DCATKIN_WHITELIST_PACKAGES="mm_loam"'
COPY "entrypoint.sh" "/entrypoint.sh"
ENTRYPOINT [ "/entrypoint.sh" ]