-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
129 lines (103 loc) · 3.64 KB
/
Dockerfile
File metadata and controls
129 lines (103 loc) · 3.64 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
FROM ros:kinetic
LABEL maintainer="Nicolai Anton Lynnerup nily@dti.dk & Kim Lykke Nørregaard kimn@dti.dk & Lærke Fabricius llfa@dti.dk"
SHELL ["/bin/bash", "-c"]
# Setup .bashrc
RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> ~/.bashrc \
&& /bin/bash -c "source ~/.bashrc"
################
# Dependencies #
################
RUN apt-get update && apt-get install -y --no-install-recommends \
iproute2 \
iputils-ping \
mlocate \
nano \
gedit \
net-tools \
python3-dev \
python3-pip \
python3-yaml \
python3-empy \
python3-setuptools \
wget \
build-essential \
libpoco-dev \
libeigen3-dev \
&& updatedb \
&& apt-get remove "*libfranka*"
RUN pip3 install "pybind11[global]"
RUN pip3 install wheel
################
# CMake 3.18.4 #
################
RUN apt-get update \
&& apt-get install -y apt-transport-https ca-certificates gnupg software-properties-common \
&& wget --no-check-certificate -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null \
&& apt-add-repository 'deb https://apt.kitware.com/ubuntu/ xenial main' \
&& apt-get update \
&& apt-get install kitware-archive-keyring \
&& rm /etc/apt/trusted.gpg.d/kitware.gpg \
&& apt-get install -y cmake
################
# ROS Packages #
################
RUN apt-get update && apt-get install -y --no-install-recommends \
ros-${ROS_DISTRO}-moveit \
ros-${ROS_DISTRO}-joint-state-controller \
ros-${ROS_DISTRO}-joint-trajectory-controller \
ros-${ROS_DISTRO}-effort-controllers \
ros-${ROS_DISTRO}-position-controllers
RUN pip3 install rospkg catkin_pkg
###############
# Eigen 3.3.7 #
###############
RUN cd /tmp/ \
&& wget -q --show-progress --progress=bar:force https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.tar.gz \
&& tar -xzf eigen-3.3.7.tar.gz \
&& cd eigen-3.3.7 \
&& mkdir build && cd build \
&& cmake .. && make install \
&& cd /tmp/ && rm eigen-3.3.7.tar.gz
#############
# Workspace #
#############
RUN mkdir -p /home/workspace/
WORKDIR /home/workspace
# Create Catkin WS
RUN mkdir -p catkin_ws/src/
# Set environment variables
ENV PYTHONPATH=$PYTHONPATH:/home/workspace/catkin_ws/devel/lib
#############
# libfranka #
#############
RUN git clone --recursive --branch 0.8.0 https://github.com/frankaemika/libfranka.git \
&& cd libfranka \
&& git submodule update \
&& mkdir build && cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release .. \
&& cmake --build .
##############
# Franka ROS #
##############
RUN cd catkin_ws \
&& /bin/bash -c "source ~/.bashrc" \
&& /bin/bash -c ". /opt/ros/${ROS_DISTRO}/setup.sh; catkin_init_workspace src" \
&& git clone --recursive https://github.com/frankaemika/franka_ros src/franka_ros \
&& apt-get update \
&& rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y \
&& /bin/bash -c ". /opt/ros/${ROS_DISTRO}/setup.bash; catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCMAKE_BUILD_TYPE=Release -DFranka_DIR:PATH=/home/workspace/libfranka/build" \
&& /bin/bash -c "source ~/.bashrc"
##########
# MoveIt #
##########
RUN wget -q --show-progress --progress=bar:force https://raw.githubusercontent.com/dti-research/panda_moveit_config/kinetic-devel/config/panda_arm.xacro \
&& cp panda_arm.xacro /opt/ros/${ROS_DISTRO}/share/panda_moveit_config/config/
##########
# Frankr #
##########
RUN cd catkin_ws/src/ \
&& git clone https://github.com/dti-research/frankr.git \
&& cd .. \
&& /bin/bash -c ". /opt/ros/${ROS_DISTRO}/setup.bash; catkin_make" \
&& echo "source /home/workspace/catkin_ws/devel/setup.bash" >> ~/.bashrc \
&& /bin/bash -c "source ~/.bashrc"