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:
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_evalWe can build and install the ov_msckf library and binary files as follows:
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:
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: