-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathproject_setup.sh
More file actions
executable file
·60 lines (53 loc) · 1.33 KB
/
Copy pathproject_setup.sh
File metadata and controls
executable file
·60 lines (53 loc) · 1.33 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
#!/usr/bin/env bash
# install all required dependencies
sudo apt-get update
grep -v '^\s*#' dependencies.txt | grep -v '^\s*$' | cut -d'#' -f1 | xargs sudo apt-get install -y
# setup libtorch
cd thirdparty
git clone https://github.com/pytorch/pytorch
cd pytorch
git submodule update --init --recursive
git submodule sync
# change MAX_JOBS to change number of threads
MAX_JOBS=6 python tools/build_libtorch.py
cd ../..
# setup g2o
cd thirdparty/g2o
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j8
cd ../../..
# setup DBoW2
cd thirdparty/DBoW2
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j8
cd ../../..
# setup Sophus
cd thirdparty/Sophus
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j8
cd ../../..
# setup Pangolin
cd thirdparty
git clone https://github.com/stevenlovegrove/Pangolin
cd Pangolin
./scripts/install_prerequisites.sh recommended
mkdir -p build
cd build
cmake ..
make -j8
# prompt user for 'sudo make install'
read -p "Do you want to proceed with 'sudo make install' for Pangolin? [Y/n]: " choice
if [[ "$choice" == "Y" || "$choice" == "y" ]]; then
sudo make install
elif [[ "$choice" == "N" || "$choice" == "n" ]]; then
echo "Project CMake configuration might not work without 'sudo make install'."
else
echo "Choose either of these: [Y, y, N, n]"
fi
cd ../../..