To install opencv-2.4.13, follow instructions from here - https://gist.github.com/dynamicguy/3d1fce8dae65e765f7c4
To install ROS kinectic, make sure you follow the instructions at least till 1.7 from here - ROS kinectic
Follow the main instructions of ORB installation from here - official repo.
1.) You have to change ORB_SLAM/manifest.xml and remove the line containing <depend package=opencv..
2.) You have to change ORB_SLAM/src/ORBextracter.cc and include the line #include <opencv2/opencv.hpp>
in the beginning of file along which other includes.
2.) If you get error regarding QT5 while building DBoW2 - Add
find_package(Qt5Core)
find_package(Qt5Widgets)
find_package(Qt5Concurrent)
find_package(Qt5OpenGL)
find_package(Qt5Test)
After project(DBoW2)
line in CMakeLists.txt.
If you don't have qt5 install these using.
sudo apt-get install qt5-default
2.) If you face error regarding Eigen while making ORB -
change here SparseMatrix::Index
to int
.
Re-build g2o and then build ORB.
3.) _If you face error regarding boost while making ORB Undefined reference to symbol 'ZN5boost6system15system_categoryEv' - change the ORB_SLAM/CMakeLists.txt, add -
find_package(Boost COMPONENTS system filesystem REQUIRED)
below the line find_package(Eigen3 REQUIRED)
Then change target_link_libraries...
in the end to
target_link_libraries(${PROJECT_NAME}
${OpenCV_LIBS}
${EIGEN3_LIBS}
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${PROJECT_SOURCE_DIR}/Thirdparty/DBoW2/lib/libDBoW2.so
${PROJECT_SOURCE_DIR}/Thirdparty/g2o/lib/libg2o.so
)
Then re-build ORB-SLAM