Our codebase is built on top of the Robot Operating System (ROS) and has been tested building on Ubuntu 16.04 systems with ROS Kinetic Kame. We also recommend installing the catkin_
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 sudo apt-get update sudo apt-get install ros-kinetic-desktop-full sudo apt-get install python-catkin-tools echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc source ~/.bashrc
We leverage OpenCV 3.4.6 for this project and recommend you compile it from source. You can try linking to the one included with ROS but we have always had success with building from source to ensure we have all contributed OpenCV libraries. One should make sure you can see some of the "contrib" (e.g. xfeature2d) to ensure you have linked to the contrib modules.
git clone --branch 3.4.6 https://github.com/opencv/opencv/ git clone --branch 3.4.6 https://github.com/opencv/opencv_contrib/ mkdir opencv/build/ cd opencv/build/ cmake -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules .. make -j8 sudo make install
Now that we have ROS and OpenCV install we can setup a catkin workspace and build the project! If you did not install the catkin_tools build system, you should be able to build using the standard
catkin_make command that is included with ROS. If you run into any problems please google search the issue first and if you are unable to find a solution please open an issue on our github page. After the build is successful please following the Simple Tutorial guide on getting a dataset and running the system.
mkdir -p ~/workspace/catkin_ws_ov/src/ cd ~/workspace/catkin_ws_ov/src/ git clone https://github.com/rpng/open_vins/ cd .. catkin build
If you want to use the plotting utility wrapper of matplotlib-cpp to generate plots directly from running the cpp code in ov_
sudo apt-get install python-matplotlib python-numpy python2.7-dev python-psutil catkin build -DDISABLE_MATPLOTLIB=OFF # build with viz (default) catkin build -DDISABLE_MATPLOTLIB=ON # build without viz