forked from crigroup/openrave-installation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-dependencies.sh
executable file
·71 lines (67 loc) · 2.89 KB
/
install-dependencies.sh
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
#!/bin/bash
#
# Authors:
# Francisco Suarez <fsuarez6.github.io>
#
# Description:
# OpenRAVE Installation Script: Dependencies
# Check ubuntu version
UBUNTU_VER=$(lsb_release -sr)
if [ ${UBUNTU_VER} != '14.04' ] && [ ${UBUNTU_VER} != '16.04' ] && [ ${UBUNTU_VER} != '18.04' ]; then
echo "ERROR: Unsupported Ubuntu version: ${UBUNTU_VER}"
echo " Supported versions are: 14.04, 16.04 and 18.04"
exit 1
fi
# Install dependencies
echo ""
echo "Installing OpenRAVE dependencies..."
echo ""
echo "Requires root privileges:"
# Update
if [ ${UBUNTU_VER} = '14.04' ]; then
# ROS Indigo repository
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
# Additional PPAs
sudo apt-add-repository -y ppa:imnmfotmal/libccd
fi
sudo apt-get update
# Programs
sudo apt-get install -y --no-install-recommends build-essential cmake doxygen \
g++ git ipython octave python-dev python-h5py python-numpy python-pip \
python-scipy python-setuptools python-wheel
if [ ${UBUNTU_VER} = '14.04' ]; then
sudo apt-get install -y --no-install-recommends qt4-dev-tools zlib-bin
elif [ ${UBUNTU_VER} = '16.04' ] || [ ${UBUNTU_VER} = '18.04' ]; then
sudo apt-get install -y --no-install-recommends qt5-default minizip
fi
# Libraries
sudo apt-get install -y --no-install-recommends ann-tools libann-dev \
libassimp-dev libavcodec-dev libavformat-dev libeigen3-dev libfaac-dev \
libflann-dev libfreetype6-dev liblapack-dev libglew-dev libgsm1-dev \
libmpfi-dev libmpfr-dev liboctave-dev libode-dev libogg-dev libpcre3-dev \
libqhull-dev libsoqt-dev-common libsoqt4-dev libswscale-dev libtinyxml-dev \
libvorbis-dev libx264-dev libxml2-dev libxvidcore-dev libbz2-dev
if [ ${UBUNTU_VER} = '14.04' ]; then
sudo apt-get install -y --no-install-recommends collada-dom-dev libccd \
libpcrecpp0 liblog4cxx10-dev libqt4-dev
elif [ ${UBUNTU_VER} = '16.04' ] || [ ${UBUNTU_VER} = '18.04' ]; then
sudo apt-get install -y --no-install-recommends libccd-dev \
libcollada-dom2.4-dp-dev liblog4cxx-dev libminizip-dev octomap-tools
fi
# Install boost
if [ ${UBUNTU_VER} = '14.04' ] || [ ${UBUNTU_VER} = '16.04' ]; then
sudo apt-get install -y --no-install-recommends libboost-all-dev libboost-python-dev
elif [ ${UBUNTU_VER} = '18.04' ]; then
# Install boost 1.58 from source
BOOST_SRC_DIR=~/8_git/boost_1_58_0
mkdir -p ~/8_git; cd ~/8_git
wget https://vorboss.dl.sourceforge.net/project/boost/boost/1.58.0/boost_1_58_0.tar.gz -O ${BOOST_SRC_DIR}.tar.gz
tar -xzf ${BOOST_SRC_DIR}.tar.gz
cd ${BOOST_SRC_DIR}
./bootstrap.sh --exec-prefix=/usr/local
./b2 -j `nproc`
sudo ./b2 -j `nproc` install threading=multi
fi
# updatedb for debugging purposes
sudo updatedb