Home >System Tutorial >LINUX >SVO-SLAM environment setup guide

SVO-SLAM environment setup guide

PHPz
PHPzforward
2024-03-11 16:37:02436browse

SVO-SLAM environment setup guide

Installation: Plain CMake (No ROS)
First, create a working directory such as: workspace, and then perform the following needs in this directory.

(tip: Be sure not to use Chinese names, even though your system has the default Chinese name. Otherwise, the following dependencies will be very difficult, and cmake cannot find the configuration file.)

mkdir workspace
cd workspace

Boost - c Librairies (thread and system are needed)

sudo apt-<span style="color: #0000ff;">get</span> install libboost-all-dev

Eigen 3 - Linear algebra

apt-<span style="color: #0000ff;">get</span> install libeigen3-dev

OpenCV - Computer vision library for loading and displaying images (I downloaded OpenCV3.0)

<span style="color: #000000;">mkdir build
cd build
cmake ..
make</span>

Sophus - Lie groups

<span style="color: #000000;">cd workspace
git clone https:</span><span style="color: #008000;">//</span><span style="color: #008000;">github.com/strasdat/Sophus.git</span>
<span style="color: #000000;">cd Sophus
git checkout a621ff
mkdir build
cd build
cmake ..
make</span>

If you encounter the error "unit_complex_.imag() = 0." at this time, you need to change the code to: "unit_complex_.imag(0.)"
Fast - Corner Detector

<span style="color: #000000;">cd workspace
git clone https:</span><span style="color: #008000;">//</span><span style="color: #008000;">github.com/uzh-rpg/fast.git</span>
<span style="color: #000000;">cd fast
mkdir build
cd build
cmake ..
make</span>

g2o - General Graph Optimization OPTIONAL
Be patient and careful. The dependencies of each version of G2O are very complicated, so you need to be patient and look at the version number. Otherwise, there will be many mistakes and you will be confused. I read a lot of blogs on the Internet before, but they didn't really solve the problem of dependencies. Below I compile the process I did, complete and correct version.

First install g2o’s dependencies:

sudo apt-<span style="color: #0000ff;">get</span>  install cmake libeigen4-dev libsuitesparse-dev, qt4-qmake libqglviewer-dev libsuitesparse-dev libcxsparse3.<span style="color: #800080;">1.2</span>  libcholmod-dev

Then download, compile, etc.:

<span style="color: #000000;">cd workspace
git clone https:</span><span style="color: #008000;">//</span><span style="color: #008000;">github.com/RainerKuemmerle/g2o.git</span>
<span style="color: #000000;">cd g2o
mkdir build
cd build
cmake ..
make
sudo make install</span>

vikit_common - Some useful tools that we need
vikit contains the camera model, some mathematics and interpolation functions required by SVO.

<span style="color: #000000;">cd workspace
git clone https:</span><span style="color: #008000;">//</span><span style="color: #008000;">github.com/uzh-rpg/rpg_vikit.git</span>

Set USE_ROS to FALSE. in the pg_vikit/vikit_common/CMakeLists.txt

file
cd rpg_vikit/<span style="color: #000000;">vikit_common
mkdir build
cd build
cmake ..
make</span>

SVO

<span style="color: #000000;">cd workspace
git clone https:</span><span style="color: #008000;">//</span><span style="color: #008000;">github.com/uzh-rpg/rpg_svo.git</span>
cd rpg_svo/svo

In the file svo/CMakeLists.txt, set USE_ROS to FALSE.

<span style="color: #000000;">mkdir build
cd build
cmake ..
make</span>

Run SVO without ROS
First, create a folder to store your data:

mkdir Datasets

Then set an environment variable to store the path

export SVO_DATASET_DIR=${HOME}/Datasets

Execute the script .bashrc, and then go to the new folder to download the test data

source ~/<span style="color: #000000;">.bashrc
cd ${SVO_DATASET_DIR}
wget http:</span><span style="color: #008000;">//</span><span style="color: #008000;">rpg.ifi.uzh.ch/datasets/sin2_tex2_h1_v8_d.tar.gz -O - | tar -xz</span>

Then run SVO on the test data:

cd svo/<span style="color: #000000;">bin
.</span>/test_pipeline

The above is the detailed content of SVO-SLAM environment setup guide. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:linuxprobe.com. If there is any infringement, please contact admin@php.cn delete