kopia lustrzana https://github.com/OpenDroneMap/ODM
Install ORB_SLAM2
rodzic
d985e94ad5
commit
ae589c1dc9
|
@ -102,7 +102,9 @@ set(custom_libs OpenGV
|
|||
CMVS
|
||||
Catkin
|
||||
Ecto
|
||||
LAStools)
|
||||
LAStools
|
||||
Pangolin
|
||||
ORB_SLAM2)
|
||||
|
||||
foreach(lib ${custom_libs})
|
||||
SETUP_EXTERNAL_PROJECT_CUSTOM(${lib})
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
set(_proj_name orb_slam2)
|
||||
set(_SB_BINARY_DIR "${SB_BINARY_DIR}/${_proj_name}")
|
||||
|
||||
ExternalProject_Add(${_proj_name}
|
||||
DEPENDS opencv pangolin
|
||||
PREFIX ${_SB_BINARY_DIR}
|
||||
TMP_DIR ${_SB_BINARY_DIR}/tmp
|
||||
STAMP_DIR ${_SB_BINARY_DIR}/stamp
|
||||
#--Download step--------------
|
||||
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
|
||||
URL https://github.com/raulmur/ORB_SLAM2/archive/2fc9730d9716c36b25ea1b0eba3bbd094e20f0d5.zip
|
||||
URL_MD5 629f19b6d424e676ce82fa1c3a0ba43b
|
||||
#--Update/Patch step----------
|
||||
UPDATE_COMMAND ""
|
||||
#--Configure step-------------
|
||||
SOURCE_DIR ${SB_SOURCE_DIR}/${_proj_name}
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=${SB_INSTALL_DIR}
|
||||
#--Build step-----------------
|
||||
BINARY_DIR ${_SB_BINARY_DIR}
|
||||
#--Install step---------------
|
||||
INSTALL_COMMAND ""
|
||||
#--Output logging-------------
|
||||
LOG_DOWNLOAD OFF
|
||||
LOG_CONFIGURE OFF
|
||||
LOG_BUILD OFF
|
||||
)
|
||||
|
||||
# DBoW2
|
||||
set(DBoW2_BINARY_DIR "${SB_BINARY_DIR}/DBoW2")
|
||||
file(MAKE_DIRECTORY "${DBoW2_BINARY_DIR}")
|
||||
|
||||
ExternalProject_Add_Step(${_proj_name} build_DBoW2
|
||||
COMMAND make -j2
|
||||
DEPENDEES configure_DBoW2
|
||||
DEPENDERS configure
|
||||
WORKING_DIRECTORY ${DBoW2_BINARY_DIR}
|
||||
ALWAYS 1
|
||||
)
|
||||
|
||||
ExternalProject_Add_Step(${_proj_name} configure_DBoW2
|
||||
COMMAND ${CMAKE_COMMAND} <SOURCE_DIR>/Thirdparty/DBoW2
|
||||
-DOpenCV_DIR=${SB_INSTALL_DIR}/share/OpenCV
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
DEPENDEES download
|
||||
DEPENDERS build_DBoW2
|
||||
WORKING_DIRECTORY ${DBoW2_BINARY_DIR}
|
||||
ALWAYS 1
|
||||
)
|
||||
|
||||
# g2o
|
||||
set(g2o_BINARY_DIR "${SB_BINARY_DIR}/g2o")
|
||||
file(MAKE_DIRECTORY "${g2o_BINARY_DIR}")
|
||||
|
||||
ExternalProject_Add_Step(${_proj_name} build_g2o
|
||||
COMMAND make -j2
|
||||
DEPENDEES configure_g2o
|
||||
DEPENDERS configure
|
||||
WORKING_DIRECTORY ${g2o_BINARY_DIR}
|
||||
ALWAYS 1
|
||||
)
|
||||
|
||||
ExternalProject_Add_Step(${_proj_name} configure_g2o
|
||||
COMMAND ${CMAKE_COMMAND} <SOURCE_DIR>/Thirdparty/g2o
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
DEPENDEES download
|
||||
DEPENDERS build_g2o
|
||||
WORKING_DIRECTORY ${g2o_BINARY_DIR}
|
||||
ALWAYS 1
|
||||
)
|
||||
|
|
@ -27,7 +27,7 @@ ExternalProject_Add(${_proj_name}
|
|||
-DBUILD_opencv_photo=ON
|
||||
-DBUILD_opencv_legacy=ON
|
||||
-DBUILD_opencv_python=ON
|
||||
-DWITH_FFMPEG=OFF
|
||||
-DWITH_FFMPEG=ON
|
||||
-DWITH_CUDA=OFF
|
||||
-DWITH_GTK=OFF
|
||||
-DWITH_VTK=OFF
|
||||
|
@ -57,4 +57,4 @@ ExternalProject_Add(${_proj_name}
|
|||
LOG_DOWNLOAD OFF
|
||||
LOG_CONFIGURE OFF
|
||||
LOG_BUILD OFF
|
||||
)
|
||||
)
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
set(_proj_name pangolin)
|
||||
set(_SB_BINARY_DIR "${SB_BINARY_DIR}/${_proj_name}")
|
||||
|
||||
ExternalProject_Add(${_proj_name}
|
||||
PREFIX ${_SB_BINARY_DIR}
|
||||
TMP_DIR ${_SB_BINARY_DIR}/tmp
|
||||
STAMP_DIR ${_SB_BINARY_DIR}/stamp
|
||||
#--Download step--------------
|
||||
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
|
||||
URL https://github.com/paulinus/Pangolin/archive/952c62bd6adbbc8bf58c5941fbb353ce7ff9e022.zip
|
||||
URL_MD5 1b8a3713a1b9da699187cf1e8dc60eab
|
||||
#--Update/Patch step----------
|
||||
UPDATE_COMMAND ""
|
||||
#--Configure step-------------
|
||||
SOURCE_DIR ${SB_SOURCE_DIR}/${_proj_name}
|
||||
CMAKE_ARGS
|
||||
-DCPP11_NO_BOOST=1
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=${SB_INSTALL_DIR}
|
||||
|
||||
#--Build step-----------------
|
||||
BINARY_DIR ${_SB_BINARY_DIR}
|
||||
#--Install step---------------
|
||||
INSTALL_DIR ${SB_INSTALL_DIR}
|
||||
#--Output logging-------------
|
||||
LOG_DOWNLOAD OFF
|
||||
LOG_CONFIGURE OFF
|
||||
LOG_BUILD OFF
|
||||
)
|
||||
|
|
@ -111,6 +111,9 @@ fi
|
|||
## Get sys vars
|
||||
NUM_CORES=`grep -c processor /proc/cpuinfo`
|
||||
|
||||
## Add SuperBuild path to the library path
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/SuperBuild/install/lib
|
||||
|
||||
## Add SuperBuild path to the python path
|
||||
export PYTHONPATH=$PYTHONPATH:`pwd`/SuperBuild/install/lib/python2.7/dist-packages
|
||||
|
||||
|
@ -119,4 +122,4 @@ cd SuperBuild
|
|||
mkdir -p build && cd build
|
||||
cmake .. && make -j ${NUM_CORES}
|
||||
|
||||
echo -e "\e[1;34mScript finished\e[0;39m"
|
||||
echo -e "\e[1;34mScript finished\e[0;39m"
|
||||
|
|
Ładowanie…
Reference in New Issue