Skip to content

Instantly share code, notes, and snippets.

@1995YogeshSharma
Last active May 10, 2018 13:34
Show Gist options
  • Save 1995YogeshSharma/aae600112f30771fa17cef4e5b34438b to your computer and use it in GitHub Desktop.
Save 1995YogeshSharma/aae600112f30771fa17cef4e5b34438b to your computer and use it in GitHub Desktop.
Some tips to build ORB SLAM on ubuntu 16.04 with ROS kinetic and opencv 2.4.13

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.

Here are few pointers to take into consideration if you get stuck -

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment