install_dependencies.sh 2.55 KB
Newer Older
Clément Pinard's avatar
Clément Pinard committed
1
2
#!/bin/bash

3
4
5
6
7
8
9
10
11
12
13
14
# This script helps you install the necessary tools to construct a depth enabled dataset with Anafi videos
# Note that CUDA and Anaconda need to be already installed
# Also note that for repo to work, git needs to be parametrized with email and name.


# This command makes sure that the .so files pointed by the cmake commands are the right ones
# Alternatively, you can add conda to the cmake folders with the following command :
# CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
# Note that the alternative will trigger erros if you move or delete the anaconda folder.

eval "$(conda shell.bash hook)"
conda deactivate
nicolas's avatar
nicolas committed
15

Clément Pinard's avatar
Clément Pinard committed
16
17
sudo apt update
sudo apt install -y git \
18
    curl \
Clément Pinard's avatar
Clément Pinard committed
19
    cmake \
Clément Pinard's avatar
Clément Pinard committed
20
    ffmpeg \
Clément Pinard's avatar
Clément Pinard committed
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
    build-essential \
    pkg-config \
    libboost-all-dev \
    libeigen3-dev \
    libsuitesparse-dev \
    libfreeimage-dev \
    libgoogle-glog-dev \
    libgflags-dev \
    libglew-dev \
    qtbase5-dev \
    libqt5opengl5-dev \
    libcgal-dev \
    libflann-dev \
    cmake libgmp-dev \
    libgoogle-glog-dev \
    libqwt-qt5-dev \
    libpcl-dev \
    libproj-dev \
    libcgal-qt5-dev \
    libatlas-base-dev \
    libsuitesparse-dev \
    zlib1g-dev \
    libglfw3-dev \
nicolas's avatar
nicolas committed
44
    libsdl2-dev rsync
Clément Pinard's avatar
Clément Pinard committed
45
46
47

git clone https://github.com/laurentkneip/opengv.git
cd opengv \
48
  && mkdir -p build \
Clément Pinard's avatar
Clément Pinard committed
49
  && cd build \
50
  && cmake .. \
Clément Pinard's avatar
Clément Pinard committed
51
52
53
54
55
56
57
  && make -j8
sudo make install
cd ../../

git clone https://github.com/opencv/opencv.git
cd opencv \
  && git checkout 4.1.2 \
58
  && mkdir -p build \
Clément Pinard's avatar
Clément Pinard committed
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
  && cd build \
  && cmake -D WITH_CUDA=OFF .. \
  && make -j8
sudo make install
cd ../../

git clone https://github.com/ETH3D/dataset-pipeline
cd dataset-pipeline \
  && mkdir -p build \
  && cd build \
  && cmake .. \
  && make -j8 \
  && cd ../../

git clone https://ceres-solver.googlesource.com/ceres-solver
cd ceres-solver \
  && git checkout $(git describe --tags) \
76
77
78
  && mkdir -p build \
  && cd build \
  && cmake .. -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF \
Clément Pinard's avatar
Clément Pinard committed
79
80
81
82
83
84
85
  && make -j8
sudo make install
cd ../../

git clone https://github.com/colmap/colmap.git
cd colmap \
  && git checkout dev \
86
  && mkdir -p build \
Clément Pinard's avatar
Clément Pinard committed
87
88
89
90
  && cd build \
  && cmake .. \
  && make -j8
sudo make install
nicolas's avatar
nicolas committed
91
cd ../../
Clément Pinard's avatar
Clément Pinard committed
92

93
94
95
96
97
98
mkdir -p ~/.bin
PATH="${HOME}/.bin:${PATH}"
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo
chmod a+rx ~/.bin/repo

conda activate
Clément Pinard's avatar
Clément Pinard committed
99
100
101
102
mkdir -p groundsdk \
  && cd groundsdk \
  && repo init -u https://github.com/Parrot-Developers/groundsdk-manifest -m release.xml \
  && repo sync \
nicolas's avatar
nicolas committed
103
104
105
106
107
  && ./build.sh -p pdraw-linux -t build -j8
cd ../

pip install -r requirements.txt

108
./build_pcl_util.sh