-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
52 lines (46 loc) · 1.5 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
FROM ripl/libbot2-ros:latest
# set the version of the realsense library
ENV LIBREALSENSE_VERSION 2.16.1
ENV LIBREALSENSE_ROS_VERSION 2.1.0
# set working directory
RUN mkdir -p /code
WORKDIR /code
# install dependencies
RUN apt update && \
DEBIAN_FRONTEND=noninteractive apt install -y \
wget \
python-rosinstall \
python-catkin-tools \
ros-${ROS_DISTRO}-jsk-tools \
ros-${ROS_DISTRO}-rgbd-launch \
ros-${ROS_DISTRO}-image-transport-plugins \
ros-${ROS_DISTRO}-image-transport \
libusb-1.0-0 \
libusb-1.0-0-dev \
freeglut3-dev \
libgtk-3-dev \
libglfw3-dev && \
# clear cache
rm -rf /var/lib/apt/lists/*
# install librealsense
RUN cd /tmp && \
wget https://github.com/IntelRealSense/librealsense/archive/v${LIBREALSENSE_VERSION}.tar.gz && \
tar -xvzf v${LIBREALSENSE_VERSION}.tar.gz && \
rm v${LIBREALSENSE_VERSION}.tar.gz && \
mkdir -p librealsense-${LIBREALSENSE_VERSION}/build && \
cd librealsense-${LIBREALSENSE_VERSION}/build && \
cmake .. && \
make && \
make install && \
rm -rf librealsense-${LIBREALSENSE_VERSION}
# install ROS package
RUN mkdir -p /code/src && \
cd /code/src/ && \
wget https://github.com/intel-ros/realsense/archive/${LIBREALSENSE_ROS_VERSION}.tar.gz && \
tar -xvzf ${LIBREALSENSE_ROS_VERSION}.tar.gz && \
rm ${LIBREALSENSE_ROS_VERSION}.tar.gz && \
mv realsense-${LIBREALSENSE_ROS_VERSION}/realsense2_camera ./ && \
rm -rf realsense-${LIBREALSENSE_ROS_VERSION}
# build ROS package
RUN . /opt/ros/${ROS_DISTRO}/setup.sh && \
catkin build