-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathInstallThirdParty.sh
130 lines (106 loc) · 3.21 KB
/
InstallThirdParty.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
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
#!/bin/bash
# set -x
# >>> algorithm library >>>
InstallCeres() {
# install requirement
sudo apt install -y cmake
sudo apt install -y libgoogle-glog-dev libgflags-dev
sudo apt install -y libatlas-base-dev
sudo apt install -y libeigen3-dev
sudo apt install -y libsuitesparse-dev
# download source code
package_path=ceres
package_path=/tmp/${package_path}
wget -c "http://ceres-solver.org/ceres-solver-2.1.0.tar.gz" -O ${package_path}.tar.gz
if [ ! -d ${package_path} ]; then
mkdir ${package_path}
fi
tar -zxf ${package_path}.tar.gz -C ${package_path}
cd ${package_path}/*
# compile
InstallPackege ${package_path}
}
InstallDbow2() {
# download source code
package_path=dbow2
package_path=/tmp/${package_path}
git clone https://github.com/dorian3d/DBoW2.git --depth=1 ${package_path}
cd ${package_path}
# compile
InstallPackege ${package_path}
}
InstallG20() {
# install requirement
sudo apt install -y libsuitesparse-dev qtdeclarative5-dev qt5-qmake libqglviewer-dev-qt5-dev
# download source code
package_path=g2o
package_path=/tmp/${package_path}
git clone https://github.com/RainerKuemmerle/g2o.git --depth=1 ${package_path}
cd ${package_path}
# compile
InstallPackege ${package_path}
}
InstallGtsam() {
# add PPA
sudo add-apt-repository ppa:borglab/gtsam-release-4.0 -y
sudo apt update # not necessary since Bionic
# install
sudo apt install -y libgtsam-dev libgtsam-unstable-dev
}
InstallOsqp() {
# download source code
package_path=osqp
package_path=/tmp/${package_path}
git clone https://github.com/oxfordcontrol/osqp --recursive --depth=1 ${package_path}
cd ${package_path}
# compile
InstallPackege ${package_path}
}
InstallSophus() {
# install requirement
sudo apt install -y libfmt-dev
# download source code
package_path=Sophus
package_path=/tmp/${package_path}
git clone https://github.com/strasdat/Sophus.git --depth=1 ${package_path}
cd ${package_path}
# compile
InstallPackege ${package_path}
}
InstallPangolin() {
# download source code
package_path=Pangolin
package_path=/tmp/${package_path}
git clone https://github.com/stevenlovegrove/Pangolin.git --recursive --depth=1 --branch=v0.6 ${package_path}
cd ${package_path}
bash ./scripts/install_prerequisites.sh
# compile
InstallPackege ${package_path}
}
InstallPackege() {
if [ ! -d build ]; then
mkdir build
fi
cd build
cmake ..
make -j4
sudo make install
}
# >>> effective tool >>>
InstallHstr() {
sudo add-apt-repository ppa:ultradvorka/ppa
sudo apt update &&
sudo apt install hstr
hstr --show-configuration >> ~/.bashrc
bash . ~/.bashrc
}
InstallV2ray() {
curl -Ls https://mirrors.v2raya.org/go.sh | sudo bash
sudo systemctl disable v2ray --now
wget -qO - https://apt.v2raya.org/key/public-key.asc | sudo tee /etc/apt/trusted.gpg.d/v2raya.asc
echo "deb https://apt.v2raya.org/ v2raya main" | sudo tee /etc/apt/sources.list.d/v2raya.list
sudo apt update
sudo apt install v2raya -y
sudo systemctl start v2raya.service
sudo systemctl enable v2raya.service
}