forked from facebookresearch/pyrobot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
280 lines (248 loc) · 10.8 KB
/
config.yml
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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
version: 2.1
jobs:
kinetic_ubuntu_16_habitat:
resource_class: gpu.small
machine:
image: ubuntu-1604:201903-01
#docker_layer_caching: true # default - false
steps:
- checkout
- run:
name: Installer Python3
command: |
cd ~/project
git submodule update --init
mkdir -p ~/low_cost_ws/src
mv ~/project ~/low_cost_ws/src/pyrobot
sudo apt-get update
pip install catkin_pkg
source ~/.bashrc
cd ~/low_cost_ws/src/pyrobot/robots/LoCoBot/install
chmod +x locobot_install_all.sh
./locobot_install_all.sh -t sim_only -p 3 -l interbotix
- run:
name: Install cuda
command: |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.44-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604_8.0.44-1_amd64.deb
sudo apt-get update || true
sudo apt-get --yes --force-yes install cuda
touch ./cuda_installed
nvidia-smi
- run:
name: Install Habitat headless with cuda
command: |
cd ~/
source ~/.bashrc
source /opt/ros/kinetic/setup.bash
source ~/low_cost_ws/devel/setup.bash
source ~/pyenv_pyrobot_python3/bin/activate
source ~/pyrobot_catkin_ws/devel/setup.bash
pip install cmake # Inside PyRobot Virtual Environment
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt update || true
sudo apt install g++-7 -y
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 \
--slave /usr/bin/g++ g++ /usr/bin/g++-7
sudo update-alternatives --config gcc
git clone --branch stable https://github.com/facebookresearch/habitat-sim.git
cd habitat-sim
pip install -r requirements.txt
sudo apt-get install -y --no-install-recommends \
libjpeg-dev libglm-dev libgl1-mesa-glx libegl1-mesa-dev mesa-utils xorg-dev freeglut3-dev
sudo apt-get install -y libbullet-dev
export PATH=/usr/local/cuda/bin:$PATH
python setup.py install --headless --with-cuda --bullet
- run:
name: Run roscore in background
command: |
#sudo apt-get install -y xvfb
#Xvfb :1 -screen 0 1600x1200x16 &
#export DISPLAY=:1.0
source ~/.bashrc
source /opt/ros/$ROS_DISTRO/setup.bash
source ~/low_cost_ws/devel/setup.bash
#export PYTHONPATH=$PYTHONPATH:/usr/local/cython #Put GPMP on path
roscore
no_output_timeout: 1.00h
background: true
- run:
name: Run tests
command: |
sleep 150 # Wait for Gazebo to properly spin up
source ~/.bashrc
source /opt/ros/$ROS_DISTRO/setup.bash
source ~/low_cost_ws/devel/setup.bash
source ~/pyenv_pyrobot_python3/bin/activate
source ~/pyrobot_catkin_ws/devel/setup.bash
export PATH=/usr/local/cuda/bin:$PATH
cd ~/low_cost_ws/src/pyrobot/tests/
pytest test_habitat_locobot.py -v
kinetic_install_ubuntu_16:
resource_class: xlarge
docker:
- image: ros:kinetic-robot-xenial
steps:
- checkout
- run:
name: Installer Python2
command: |
cd ~/project
git submodule update --init
mkdir -p ~/low_cost_ws/src
mv ~/project ~/low_cost_ws/src/pyrobot
# This step is needed as we copy the repo instead of clone using install script
cd ~/low_cost_ws/src/pyrobot/robots/LoCoBot/locobot_description/urdf
ln interbotix_locobot_description.urdf locobot_description.urdf
cd ~/low_cost_ws/src/pyrobot/robots/LoCoBot/locobot_moveit_config/config
ln interbotix_locobot.srdf locobot.srdf
cd ~/low_cost_ws/src/pyrobot/robots/LoCoBot/locobot_control/src
sed -i 's/\(float restJnts\[5\] = \)\(.*\)/\1{0, -1.30, 1.617, 0.5, 0};/' locobot_controller.cpp
sudo apt-get install -y python-rosdep
sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade
# sudo rm -rf /etc/apt/sources.list.d/ros1-latest.list*
# https://answers.ros.org/question/325039/apt-update-fails-cannot-install-pkgs-key-not-working/
# sudo apt-key del 421C365BD9FF1F717815A3895523BAEEB01FA116
cd ~/low_cost_ws/src/pyrobot/robots/LoCoBot/install
chmod +x locobot_install_all.sh
./locobot_install_all.sh -t sim_only -p 2 -l cmu
- run:
name: Installer Python3
command: |
sudo apt-get install -y software-properties-common
source ~/.bashrc
source /opt/ros/$ROS_DISTRO/setup.bash
source ~/low_cost_ws/devel/setup.bash
cd ~/low_cost_ws/src/pyrobot
chmod +x install_pyrobot.sh
./install_pyrobot.sh -p 3
cd ~/low_cost_ws/src/pyrobot/robots/LoCoBot
source ~/pyenv_pyrobot_python3/bin/activate
pip3 install --ignore-installed -r requirements_python3.txt
deactivate
- run:
name: Gazebo 7 VM bug fix
command: |
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install gazebo7 -y
- run:
name: Run Gazebo in the background
command: |
sudo apt-get install -y xvfb
Xvfb :1 -screen 0 1600x1200x16 &
export DISPLAY=:1.0
source ~/.bashrc
source /opt/ros/$ROS_DISTRO/setup.bash
source ~/low_cost_ws/devel/setup.bash
export PYTHONPATH=$PYTHONPATH:/usr/local/cython #Put GPMP on path
roslaunch locobot_control main.launch use_sim:=true use_rviz:=false
no_output_timeout: 1.00h
background: true
- run:
name: Run tests in Python2
command: |
sleep 150 # Wait for Gazebo to properly spin up
source ~/.bashrc
source /opt/ros/$ROS_DISTRO/setup.bash
source ~/low_cost_ws/devel/setup.bash
source ~/pyenv_pyrobot_python2/bin/activate
cd ~/low_cost_ws/src/pyrobot/tests/
chmod +x circleci_tests.sh
./circleci_tests.sh
- run:
name: Run tests in Python3
command: |
sleep 150 # Wait for Gazebo to properly spin up
source ~/.bashrc
source /opt/ros/$ROS_DISTRO/setup.bash
source ~/low_cost_ws/devel/setup.bash
source ~/pyenv_pyrobot_python3/bin/activate
source ~/pyrobot_catkin_ws/devel/setup.bash
cd ~/low_cost_ws/src/pyrobot/tests/
chmod +x circleci_tests.sh
./circleci_tests.sh
melodic_install_ubuntu_18:
resource_class: xlarge
docker:
- image: ros:melodic-robot-bionic
steps:
- checkout
- run:
name: Installer Python2
command: |
cd ~/project
git submodule update --init
mkdir -p ~/low_cost_ws/src
mv ~/project ~/low_cost_ws/src/pyrobot
# This step is needed as we copy the repo instead of clone using install script
cd ~/low_cost_ws/src/pyrobot/robots/LoCoBot/locobot_description/urdf
ln interbotix_locobot_description.urdf locobot_description.urdf
cd ~/low_cost_ws/src/pyrobot/robots/LoCoBot/locobot_moveit_config/config
ln interbotix_locobot.srdf locobot.srdf
cd ~/low_cost_ws/src/pyrobot/robots/LoCoBot/locobot_control/src
sed -i 's/\(float restJnts\[5\] = \)\(.*\)/\1{0, -1.30, 1.617, 0.5, 0};/' locobot_controller.cpp
sudo apt-get install -y python-rosdep
sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade
cd ~/low_cost_ws/src/pyrobot/robots/LoCoBot/install
chmod +x locobot_install_all.sh
./locobot_install_all.sh -t sim_only -p 2 -l interbotix
- run:
name: Installer Python3
command: |
sudo apt-get install -y software-properties-common
source ~/.bashrc
source /opt/ros/$ROS_DISTRO/setup.bash
source ~/low_cost_ws/devel/setup.bash
cd ~/low_cost_ws/src/pyrobot
chmod +x install_pyrobot.sh
./install_pyrobot.sh -p 3
cd ~/low_cost_ws/src/pyrobot/robots/LoCoBot
source ~/pyenv_pyrobot_python3/bin/activate
pip3 install --ignore-installed -r requirements_python3.txt
deactivate
- run:
name: Run Gazebo in the background
command: |
sudo apt-get install -y xvfb
Xvfb :1 -screen 0 1600x1200x16 &
export DISPLAY=:1.0
source ~/.bashrc
source /opt/ros/$ROS_DISTRO/setup.bash
source ~/low_cost_ws/devel/setup.bash
export PYTHONPATH=$PYTHONPATH:/usr/local/cython #Put GPMP on path
roslaunch locobot_control main.launch use_sim:=true use_rviz:=false
no_output_timeout: 1.00h
background: true
- run:
name: Run tests in Python2
command: |
sleep 150 # Wait for Gazebo to properly spin up
source ~/.bashrc
source /opt/ros/$ROS_DISTRO/setup.bash
source ~/low_cost_ws/devel/setup.bash
source ~/pyenv_pyrobot_python2/bin/activate
cd ~/low_cost_ws/src/pyrobot/tests/
chmod +x circleci_tests.sh
./circleci_tests.sh
- run:
name: Run tests in Python3
command: |
sleep 150 # Wait for Gazebo to properly spin up
source ~/.bashrc
source /opt/ros/$ROS_DISTRO/setup.bash
source ~/low_cost_ws/devel/setup.bash
source ~/pyenv_pyrobot_python3/bin/activate
source ~/pyrobot_catkin_ws/devel/setup.bash
cd ~/low_cost_ws/src/pyrobot/tests/
chmod +x circleci_tests.sh
./circleci_tests.sh
workflows:
version: 2
kinetic_and_melodic:
jobs:
- kinetic_install_ubuntu_16
- melodic_install_ubuntu_18
- kinetic_ubuntu_16_habitat