Skip to content

Installation: Plain CMake (No ROS)

Kevin George edited this page Aug 31, 2017 · 10 revisions

It is possible to build the svo library without ROS/CMake. Therefore, you will need to first install the following dependencies:

Boost - c++ Librairies (thread and system are needed)

sudo apt-get install libboost-all-dev

Eigen 3 - Linear algebra

apt-get install libeigen3-dev

OpenCV - Computer vision library for loading and displaying images

Follow the instructions at www.opencv.org

Sophus - Lie groups

Sophus by Hauke Strasdat implements Lie groups that we need to describe rigid body transformations. Checkout in your workspace for plain CMake projects.

cd workspace
git clone https://github.com/strasdat/Sophus.git
cd Sophus
git checkout a621ff
mkdir build
cd build
cmake ..
make

You don't need to install the library since cmake .. writes the package location to ~/.cmake/packages/ where CMake can later find it.

Note: if you encounter some lvalue errors for unit_complex_.imag() = 0.;, you may change that code to unit_complex_.imag(0.);

Fast - Corner Detector

The Fast detector by Edward Rosten is used to detect corners. To simplify installation we provide a CMake package that contains the fast detector from the libCVD library (http://www.edwardrosten.com/cvd/).

cd workspace
git clone https://github.com/uzh-rpg/fast.git
cd fast
mkdir build
cd build
cmake ..
make

g2o - General Graph Optimization OPTIONAL

Only required if you want to run bundle adjustment. It is not necessary for visual odometry. In fact, we don't run it on our MAVs. g2o requires the following system dependencies: cmake, libeigen3-dev, libsuitesparse-dev, qt5-qmake, libqglviewer-dev-qt5, install them with apt-get

I suggest an out-of-source build of g2o:

cd workspace
git clone https://github.com/RainerKuemmerle/g2o.git
cd g2o
mkdir build
cd build
cmake ..
make
sudo make install

If you don't want to make a system install, then you can replace the cmake command with cmake .. -DCMAKE_INSTALL_PREFIX:PATH=$HOME/installdir

vikit_common - Some useful tools that we need

vikit contains camera models, some math and interpolation functions that SVO needs.

cd workspace
git clone https://github.com/uzh-rpg/rpg_vikit.git

in rpg_vikit/vikit_common/CMakeLists.txt set the flag USE_ROS to FALSE.

cd rpg_vikit/vikit_common
mkdir build
cd build
cmake ..
make

If you are getting with such message By not providing "Findcatkin.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "catkin", but CMake did not find one. set the flag USE_ROS to FALSE in CMakeLists.txt.

SVO

Now we are ready to build SVO. Clone it into your workspace

cd workspace
git clone https://github.com/uzh-rpg/rpg_svo.git
cd rpg_svo/svo

In svo/CMakeLists.txt set the flag USE_ROS to FALSE.

mkdir build
cd build
cmake ..
make