-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.integration_melodic
146 lines (119 loc) · 4.02 KB
/
Dockerfile.integration_melodic
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# Use official ROS Melodic image as the base
FROM osrf/ros:melodic-desktop-full
ENV DEBIAN_FRONTEND=noninteractive
ENV ROS_DISTRO melodic
# Install ROS packages
RUN apt-get update && apt-get install -y --no-install-recommends \
ros-melodic-desktop-full \
&& rm -rf /var/lib/apt/lists/*
# Install universal robot ros packages
RUN apt-get update && apt-get install -y \
ros-$ROS_DISTRO-gazebo-ros-pkgs \
ros-$ROS_DISTRO-spacenav-node \
ros-$ROS_DISTRO-rqt-common-plugins \
# Install catkin
ros-$ROS_DISTRO-catkin \
python-catkin-tools \
# Install Numpy Boost
libboost-dev \
libboost-python-dev \
libboost-system-dev \
libboost-all-dev \
libatlas-base-dev \
libprotobuf-dev \
protobuf-compiler \
# Python dependencies
python-setuptools \
python-tk \
python-numpy \
# Utils
locate \
aptitude \
vim htop tmux \
curl wget \
tk \
spacenavd \
&& rm -rf /var/lib/apt/lists/*
# Install packages
RUN apt-get update && apt-get install -q -y --no-install-recommends \
dirmngr \
gnupg2 \
lsb-release \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt install -y python-catkin-lint python-pip git \
&& rm -rf /var/lib/apt/lists/*
RUN pip install osrf-pycommon
### Ros Workspace ###
# Set up the workspace
RUN /bin/bash -c "source /opt/ros/$ROS_DISTRO/setup.bash \
&& catkin config -init --blacklist python_orocos_kdl orocos_kinematics_dynamics orocos_kdl"
# Installing repo required for homework
RUN /bin/bash -c "cd ~/ \
&& git clone https://github.com/susi1603/ur3_ws.git"
# Updating ROSDEP and installing dependencies
RUN cd ~/ur3_ws \
&& apt-get update \
&& rosdep fix-permissions \
&& rosdep update \
&& rosdep install --from-paths src --ignore-src --rosdistro=$ROS_DISTRO -y \
&& rm -rf /var/lib/apt/lists/
# Clone catkin repository to the workspace
RUN cd ~/ur3_ws/src \
&& git clone https://github.com/ros/catkin.git
RUN apt-get install -y ros-melodic-roscpp
ENV PYTHONIOENCODING UTF-8
## Python libraries ##
RUN pip install --upgrade pip && \
pip install matplotlib==2.2.3 scipy protobuf pyyaml pyquaternion rospkg \
lxml tqdm catkin-pkg empy PyVirtualDisplay defusedxml gym psutil pyprind
# # Compiling ros workspace
RUN /bin/bash -c "source /opt/ros/$ROS_DISTRO/setup.bash \
&& cd ~/ur3_ws \
&& ls \
&& rm -rf build \
&& rm -rf devel \
&& catkin_make"
################################################
# Custom python3 libs
################################################
# ur_ikfast
RUN /bin/bash -c "cd ~/ \
&& mkdir pylibs && cd pylibs \
&& git clone https://github.com/cambel/ur_ikfast.git \
&& cd ur_ikfast && pip install -e ."
RUN apt-get update && apt-get install -y \
ros-$ROS_DISTRO-rqt-joint-trajectory-controller \
ros-$ROS_DISTRO-rqt-tf-tree \
ros-$ROS_DISTRO-rqt-multiplot \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y \
ros-$ROS_DISTRO-moveit \
ros-$ROS_DISTRO-moveit-runtime \
ros-$ROS_DISTRO-moveit-resources \
&& rm -rf /var/lib/apt/lists/*
# Download gazebo models only once
RUN mkdir -p ~/.gazebo
RUN git clone https://github.com/osrf/gazebo_models ~/.gazebo/models
# Installing repo required for homework
RUN /bin/bash -c "cd ~/ \
&& git clone https://github.com/susi1603/cam_ws.git"
RUN /bin/bash -c "source /opt/ros/$ROS_DISTRO/setup.bash \
&& cd ~/cam_ws/ \
&& rm -rf build \
&& rm -rf devel \
&& catkin_make"
RUN cd ~/cam_ws/src \
&& git clone https://github.com/pal-robotics/ddynamic_reconfigure.git \
&& git clone -b ros1-legacy https://github.com/IntelRealSense/realsense-ros.git \
&& cd realsense-ros
RUN cd ~/cam_ws \
&& apt-get update \
&& rosdep fix-permissions \
&& rosdep update \
&& rosdep install --from-paths src --ignore-src --rosdistro=$ROS_DISTRO -y \
&& rm -rf /var/lib/apt/lists/
RUN /bin/bash -c "source /opt/ros/$ROS_DISTRO/setup.bash \
&& cd ~/cam_ws/ \
&& rm -rf build \
&& rm -rf devel \
&& catkin_make"