Getting Started » Installation Guide (ROS Free)

We do support ROS-free builds, but don't recommend using this interface as we have limited support for it. You will need to ensure you have installed OpenCV 3 or 4, Eigen3, and Ceres which are the only dependencies. Each of the submodules can be build and installed as a library onto a linux-based system. For Ubuntu linux-based system the system dependencies are:

sudo apt-get install libeigen3-dev libboost-all-dev libceres-dev

Refer to OpenCV Dependency (from source) and Ceres Solver (from source) if a custom version of these are desired. We have tested building with OpenCV 3.2, 3.3, 3.4, 4.2, and 4.5.

If ROS is found on the system, one can use command line options to ensure the ROS free version is compiled with: cmake -DENABLE_ROS=OFF ... There are additional cmake options that users might be interested in. Configure these with cmake -D<option_name>=ON .. options.

  • ENABLE_ROS - (default ON) - Enable or disable building with ROS (ensure to disable this)
  • ENABLE_ARUCO_TAGS - (default ON) - Enable or disable aruco tag (disable if no contrib modules)
  • BUILD_OV_EVAL - (default ON) - Enable or disable building of ov_eval (needs to be built separately)
  • DISABLE_MATPLOTLIB - (default OFF) - Disable or enable matplotlib plot scripts in ov_eval

We can build and install the ov_msckf library and binary files as follows:

cd ~/github/
git clone https://github.com/rpng/open_vins/
cd open_vins/ov_msckf/
mkdir build && cd build
cmake -DENABLE_ROS=OFF ..
make -j4
sudo make install

If you are using the ROS-free interface, you will need to properly construct the ov_msckf::VioManagerOptions struct with proper information and feed inertial and image data into the correct functions with proper buffers. The simulator binary run_simulation can give you and example on how to do this without the buffering logic.

To now link to the built project from a different project, one can configure the following in their CMakeLists.txt:

# headers: /usr/local/include/open_vins/
# library: /usr/local/lib/libov_msckf_lib.so
set(OPENVINS_INCLUDE_DIR /usr/local/include/open_vins/)
set(OPENVINS_LIBRARIES ov_msckf_lib)

Note that it is important to also link to the Eigen3, OpenCV, and Ceres dependencies of OpenVINS. Finally it can all come together and then be directly used as:

target_include_directories(your_binary PUBLIC
    ${CMAKE_CURRENT_SOURCE_DIR}
    ${EIGEN3_INCLUDE_DIR}
    ${BOOST_INCLUDE_DIR}
    ${OPENVINS_INCLUDE_DIR}
)
target_link_libraries(your_binary PRIVATE
    ${CERES_LIBRARIES}
    ${OPENVINS_LIBRARIES}
)