<aside> 💡
Using Ubuntu 22LTS
</aside>
Copy and paste the following into a bash (.sh) file and run it.
<aside> 💡
change the 12 in make -j12
to the no. of process on your machine (can find out using nproc
)
</aside>
sudo apt update -y
sudo apt upgrade -y
sudo apt install -y gcc g++ libssl-dev
sudo add-apt-repository -y ppa:git-core/ppa
# OpenCV's (& other general) dependecies
sudo apt install build-essential cmake git libgtk-3-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libxvidcore-dev libx264-dev openexr libatlas-base-dev libopenexr-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev python3-dev python3-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-dev gfortran -y
#-------------------installing OpenCV 4.6 -------------------
git clone --filter=blob:none <https://github.com/opencv/opencv.git>
git clone --filter=blob:none <https://github.com/opencv/opencv_contrib.git>
cd opencv/ && git checkout tags/4.6.0 && cd ..
cd opencv_contrib/ && git checkout tags/4.6.0 && cd ..
cd opencv/ && mkdir build && cd build && \\
cmake -D CMAKE_BUILD_TYPE=RELEASE \\
-D INSTALL_C_EXAMPLES=OFF \\
-D INSTALL_PYTHON_EXAMPLES=OFF \\
-D ENABLE_FAST_MATH=ON \\
-D BUILD_opencv_java=OFF \\
-D BUILD_ZLIB=ON \\
-D BUILD_TIFF=ON \\
-D WITH_GTK=ON \\
-D WITH_FFMPEG=ON \\
-D WITH_1394=ON \\
-D OPENCV_GENERATE_PKGCONFIG=ON \\
-D OPENCV_PC_FILE_NAME=opencv4.pc \\
-D OPENCV_ENABLE_NONFREE=ON \\
-D WITH_GSTREAMER=ON \\
-D WITH_V4L=ON \\
-D WITH_QT=ON \\
-D WITH_OPENGL=ON \\
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules/ \\
-D BUILD_EXAMPLES=ON ..
sudo make -j $(nproc) install
#-------------------installing GTSAM 4.1.1 -------------------
cd ~
sudo apt install -y libboost-all-dev # dependency for GTSAM
git clone --filter=blob:none <https://github.com/borglab/gtsam.git>
cd gtsam/
git checkout tags/4.1.1
mkdir build && cd build/
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
sudo make -j $(nproc) install
Clone this repo: https://github.com/ZHosein/vio-on-arm.git
Checkout the dev
branch.