-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
234 lines (194 loc) · 9.73 KB
/
Copy pathDockerfile
File metadata and controls
234 lines (194 loc) · 9.73 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
FROM osrf/ros:humble-desktop
SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND="noninteractive"
ENV TZ="Europe/Paris"
WORKDIR /deps
RUN apt-get update && apt-get upgrade -y && apt-get clean && apt-get install -y terminator gedit locate cmake-curses-gui python3-pip python3-venv liburdfdom-dev ros-humble-moveit-core
WORKDIR /home
RUN echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
# create forest ws and use it to clone and install CONCERT's simulation package
WORKDIR /home/forest_ws
ENV HHCM_FOREST_CLONE_DEFAULT_PROTO=https
ENV PYTHONUNBUFFERED=1
# create python virtual env
RUN python3 -m venv /home/.base
RUN echo "source /home/.base/bin/activate" >> ~/.bashrc
SHELL ["bash", "-ic"]
RUN pip3 install --upgrade jinja2 typeguard ttictoc "setuptools<81" hhcm-forest && forest init
RUN echo "source $PWD/setup.bash" >> ~/.bashrc
SHELL ["bash", "-ic"]
RUN forest add-recipes git@github.com:advrhumanoids/multidof_recipes.git --tag ros2
# pre-install pybind11 and custom matlogger2
#RUN forest grow pybind11 --verbose --jobs 4 --pwd user && \
RUN forest grow matlogger2 --verbose --jobs 4 --pwd user
# HPP-FCL
#WORKDIR /home/forest_ws/src
#RUN git clone https://github.com/humanoid-path-planner/hpp-fcl.git && \
# ls -a && \
# cd /home/forest_ws/src/hpp-fcl && \
# git checkout 45e60ca7ba81e5394605f8c1097c016245d221c2 && \
# git submodule init && \
# git submodule update && \
# mkdir -p /home/forest_ws/build/hpp-fcl && \
# cd /home/forest_ws/build/hpp-fcl && \
# source /opt/ros/humble/setup.bash && \
# source /home/forest_ws/setup.bash && \
# cmake -DCMAKE_INSTALL_PREFIX:STRING=/home/forest_ws/install -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_PYTHON_INTERFACE=OFF ../../src/hpp-fcl && \
# make -j8 && \
# make install
# COAL
WORKDIR /home/forest_ws/src
RUN git clone -b devel https://github.com/coal-library/coal.git && \
ls -a && \
cd /home/forest_ws/src/coal && \
git submodule init && \
git submodule update && \
mkdir -p /home/forest_ws/build/coal && \
cd /home/forest_ws/build/coal && \
source /opt/ros/humble/setup.bash && \
source /home/forest_ws/setup.bash && \
cmake -DCMAKE_INSTALL_PREFIX:STRING=/home/forest_ws/install -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_PYTHON_INTERFACE=OFF ../../src/coal && \
make -j8 && \
make install
## PINOCCHIO
WORKDIR /home/forest_ws/src
RUN git clone -b devel https://github.com/stack-of-tasks/pinocchio.git && \
cd /home/forest_ws/src/pinocchio && \
git submodule init && \
git submodule update && \
mkdir -p /home/forest_ws/build/pinocchio && \
cd /home/forest_ws/build/pinocchio && \
source /opt/ros/humble/setup.bash && \
source /home/forest_ws/setup.bash && \
cmake -DCMAKE_INSTALL_PREFIX:STRING=/home/forest_ws/install -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_WITH_URDF_SUPPORT=ON -DBUILD_WITH_COLLISION_SUPPORT=OFF -DBUILD_TESTING=FALSE -DBUILD_PYTHON_INTERFACE=OFF ../../src/pinocchio && \
make -j8 && \
make install
# xbot2_interface
WORKDIR /home/forest_ws/src
RUN git clone -b devel https://github.com/hucebot/xbot2_interface.git && \
mkdir -p /home/forest_ws/build/xbot2_interface && \
cd /home/forest_ws/build/xbot2_interface && \
source /opt/ros/humble/setup.bash && \
source /home/forest_ws/setup.bash && \
cmake -DXBOT2_IFC_BUILD_TESTS=ON -DXBOT2_IFC_BUILD_ROS=OFF -DXBOT2_IFC_BUILD_ROS2=OFF -DCMAKE_INSTALL_PREFIX:STRING=/home/forest_ws/install -DCMAKE_BUILD_TYPE:STRING=Release ../../src/xbot2_interface && \
make -j8 && \
make install
# osqp
RUN git clone https://github.com/oxfordcontrol/osqp.git && \
cd /home/forest_ws/src/osqp && \
git checkout 0b34f2ef5c5eec314e7945762e1c8167e937afbd && \
git submodule init && \
git submodule update && \
mkdir -p /home/forest_ws/build/osqp && \
cd /home/forest_ws/build/osqp && \
source /opt/ros/humble/setup.bash && \
source /home/forest_ws/setup.bash && \
cmake -DDLONG=OFF -DCMAKE_INSTALL_PREFIX:STRING=/home/forest_ws/install -DCMAKE_BUILD_TYPE:STRING=Release ../../src/osqp && \
make -j8 && \
make install
# proxQP
RUN git clone https://github.com/Simple-Robotics/proxsuite.git && \
cd /home/forest_ws/src/proxsuite && \
git checkout 9f58ebd7bf42fb364de995d25679dc3f675dee7f && \
git submodule init && \
git submodule update && \
mkdir -p /home/forest_ws/build/proxsuite && \
cd /home/forest_ws/build/proxsuite && \
source /opt/ros/humble/setup.bash && \
source /home/forest_ws/setup.bash && \
cmake -DBUILD_WITH_VECTORIZATION_SUPPORT=OFF -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX:STRING=/home/forest_ws/install -DCMAKE_BUILD_TYPE:STRING=Release ../../src/proxsuite && \
make -j8 && \
make install
RUN apt-get update && apt-get upgrade -y && apt-get clean && apt-get install -y libxcb-cursor0 gdb
# qpSWIFT
RUN git clone https://github.com/qpSWIFT/qpSWIFT.git && \
mkdir -p /home/forest_ws/build/qpSWIFT && \
cd /home/forest_ws/build/qpSWIFT && \
source /opt/ros/humble/setup.bash && \
source /home/forest_ws/setup.bash && \
cmake -DCMAKE_INSTALL_PREFIX:STRING=/home/forest_ws/install -DCMAKE_BUILD_TYPE:STRING=Release ../../src/qpSWIFT && \
make -j8 && \
make install
RUN apt-get update && apt-get upgrade -y && apt-get clean && apt-get install -y nlohmann-json3-dev
# roboptim
RUN git clone https://github.com/hucebot/roboptim-core.git && \
cd roboptim-core && \
git submodule init && \
git submodule update && \
mkdir -p /home/forest_ws/build/roboptim-core && \
cd /home/forest_ws/build/roboptim-core && \
source /opt/ros/humble/setup.bash && \
source /home/forest_ws/setup.bash && \
cmake -DCMAKE_INSTALL_PREFIX:STRING=/home/forest_ws/install ../../src/roboptim-core && \
make -j8 && \
make install
RUN apt-get install -y coinor-libipopt-dev
RUN git clone https://github.com/hucebot/roboptim-core-plugin-ipopt.git && \
cd roboptim-core-plugin-ipopt && \
git submodule init && \
git submodule update && \
mkdir -p /home/forest_ws/build/roboptim-core-plugin-ipopt && \
cd /home/forest_ws/build/roboptim-core-plugin-ipopt && \
source /opt/ros/humble/setup.bash && \
source /home/forest_ws/setup.bash && \
cmake -DCMAKE_INSTALL_PREFIX:STRING=/home/forest_ws/install -DDISABLE_TESTS=ON ../../src/roboptim-core-plugin-ipopt && \
make -j8 && \
make install
RUN git clone https://github.com/hucebot/roboptim-capsule.git && \
cd roboptim-capsule && \
git submodule init && \
git submodule update && \
mkdir -p /home/forest_ws/build/roboptim-capsule && \
cd /home/forest_ws/build/roboptim-capsule && \
source /opt/ros/humble/setup.bash && \
source /home/forest_ws/setup.bash && \
cmake -DCMAKE_INSTALL_PREFIX:STRING=/home/forest_ws/install ../../src/roboptim-capsule && \
make -j8 && \
make install
RUN git clone https://github.com/hucebot/robot_capsule_generator.git && \
mkdir -p /home/forest_ws/build/robot_capsule_generator && \
cd /home/forest_ws/build/robot_capsule_generator && \
source /opt/ros/humble/setup.bash && \
source /home/forest_ws/setup.bash && \
cmake -DCMAKE_INSTALL_PREFIX:STRING=/home/forest_ws/install ../../src/robot_capsule_generator && \
make -j8 && \
make install
RUN echo "export LD_LIBRARY_PATH=/home/forest_ws/install/lib/roboptim-core/:$LD_LIBRARY_PATH" >> ~/.bashrc
# mujoco
RUN git clone https://github.com/deepmind/mujoco.git && \
mkdir -p /home/forest_ws/build/mujoco && \
cd /home/forest_ws/build/mujoco && \
source /opt/ros/humble/setup.bash && \
source /home/forest_ws/setup.bash && \
#cmake -DCMAKE_INSTALL_PREFIX:STRING=/home/forest_ws/install -DMUJOCO_BUILD_EXAMPLES=OFF -DMUJOCO_BUILD_TESTS=OFF ../../src/mujoco && \
cmake -DMUJOCO_BUILD_EXAMPLES=OFF -DMUJOCO_BUILD_TESTS=OFF ../../src/mujoco && \
make -j8 && \
make install
WORKDIR /home
RUN apt-get update && apt-get upgrade -y && apt-get clean && apt-get install -y ros-humble-xacro ros-humble-joint-state-publisher-gui libglpk-dev libopenblas-dev ros-humble-rosidl-generator-dds-idl
RUN echo "export PYTHONPATH=${PYTHONPATH}:/root/.local/lib/python3.12/site-packages:/usr/lib/python3/dist-packages/" >> ~/.bashrc
RUN pip3 install h5py viser
RUN mkdir -p /ros2_ws/src
WORKDIR /home/ros2_ws/src
RUN git clone -b ros2 https://github.com/EnricoMingo/iit-coman-ros-pkg.git
RUN git clone https://github.com/frankarobotics/franka_description.git
RUN git clone -b ros2 https://github.com/EnricoMingo/franka_cartesio_config.git
RUN git clone -b ros2 https://github.com/EnricoMingo/LittleDog.git
RUN git clone -b humble-devel https://github.com/pal-robotics/pmb2_robot.git
RUN git clone -b humble-devel https://github.com/pal-robotics/tiago_robot.git
RUN git clone -b humble-devel https://github.com/pal-robotics/tiago_dual_robot.git
RUN git clone -b humble-devel https://github.com/pal-robotics/omni_base_robot.git
RUN git clone -b humble-devel https://github.com/pal-robotics/pal_gripper.git
RUN git clone -b ros2 https://github.com/hucebot/tiago_dual_cartesio_config.git
RUN git clone -b humble-devel https://github.com/pal-robotics/tiago_pro_robot.git
RUN git clone -b humble-devel https://github.com/pal-robotics/pal_urdf_utils.git
RUN git clone -b humble-devel https://github.com/pal-robotics/pal_pro_gripper.git
RUN git clone -b humble-devel https://github.com/pal-robotics/pal_sea_arm.git
RUN git clone -b humble-devel https://github.com/pal-robotics/tiago_pro_head_robot.git
RUN apt install -y ros-$ROS_DISTRO-realsense2-camera ros-$ROS_DISTRO-realsense2-description
RUN git clone https://github.com/unitreerobotics/unitree_ros2.git
RUN git clone -b sami https://github.com/itsikelis/huro.git
WORKDIR /home/ros2_ws
RUN colcon build
RUN echo "source /home/ros2_ws/install/local_setup.bash" >> ~/.bashrc
WORKDIR /home