forked from VIS4ROB-lab/covins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_file.sh
executable file
·96 lines (84 loc) · 1.61 KB
/
install_file.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
#!/bin/bash
if [ $# -eq 0 ]
then
NR_JOBS=""
CATKIN_JOBS=""
else
NR_JOBS=${1:-}
CATKIN_JOBS="-j${NR_JOBS}"
fi
FILEDIR=$(readlink -f ${BASH_SOURCE})
BASEDIR=$(dirname ${FILEDIR})
# BASEDIR is ??/<ws_name>/src/covins
echo "File directory: ${BASEDIR}"
cd ${BASEDIR}/..
wstool init
wstool merge covins/dependencies.rosinstall
wstool up
chmod +x covins/fix_eigen_deps.sh
./covins/fix_eigen_deps.sh
set -e
cd ${BASEDIR}/../..
catkin build ${CATKIN_JOBS} eigen_catkin opencv3_catkin
cd ${BASEDIR}/../..
source devel/setup.bash
cd ${BASEDIR}/covins_backend/
#DBoW2
cd thirdparty/DBoW2
if [ ! -d "build" ]
then
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j${NR_JOBS}
fi
cd ${BASEDIR}/../..
catkin build ${CATKIN_JOBS} covins_backend
#Extract vocabulary
cd ${BASEDIR}/covins_backend/
cd config
if [ ! -f "ORBvoc.txt" ]
then
unzip ORBvoc.txt.zip
fi
cd ${BASEDIR}/../..
source devel/setup.bash
cd ${BASEDIR}/../pangolin
if [ ! -d "build" ]
then
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j${NR_JOBS}
fi
cd ${BASEDIR}/orb_slam3/Thirdparty/DBoW2
if [ ! -d "build" ]
then
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j${NR_JOBS}
fi
cd ${BASEDIR}/orb_slam3/Thirdparty/g2o
if [ ! -d "build" ]
then
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j${NR_JOBS}
fi
cd ${BASEDIR}/orb_slam3/Vocabulary
if [ ! -f "ORBvoc.txt" ]
then
tar -xf ORBvoc.txt.tar.gz
fi
cd ${BASEDIR}/orb_slam3
if [ ! -d "build" ]
then
mkdir build
fi
cd build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j${NR_JOBS}
#finish
exit 0