-
Notifications
You must be signed in to change notification settings - Fork 16
/
CMakeLists.txt
79 lines (66 loc) · 1.9 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
cmake_minimum_required(VERSION 2.8.3)
project(direct_stereo_slam)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CXX_FLAGS "-march=native \
-Wno-deprecated-declarations \
-Wno-deprecated \
-Wno-ignored-qualifiers \
-Wno-reorder \
-Wno-missing-braces")
find_package(OpenCV REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(PCL 1.0 REQUIRED)
find_package(g2o REQUIRED )
find_package(catkin REQUIRED COMPONENTS
geometry_msgs
roscpp
rosbag
sensor_msgs
cv_bridge
image_transport
message_filters
)
catkin_package()
include_directories(
${PROJECT_SOURCE_DIR}
${Pangolin_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIR}
${PCL_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
if (NOT DSO_PATH)
set(DSO_PATH ~/Workspace/dso)
endif()
set(DSO_INCLUDE_DIRS "${DSO_PATH}/src" "${DSO_PATH}/thirdparty/Sophus")
set(DSO_LIBRARY_PATH "${DSO_PATH}/build/lib")
find_library(DSO_LIBRARY dso ${DSO_LIBRARY_PATH})
message("-- Found DSO library at \"${DSO_LIBRARY}\"")
find_package(Boost COMPONENTS system thread)
find_package(Pangolin 0.2 REQUIRED)
set(DSO_HELPERS_SOURCE_FILES
src/dso_helpers/FrontEndDebugStuff.cpp
src/dso_helpers/FrontEndMarginalize.cpp
src/dso_helpers/FrontEndOptimize.cpp
src/dso_helpers/FrontEndOptPoint.cpp
)
include_directories(${DSO_INCLUDE_DIRS} src)
add_executable(
slam_node
src/main.cpp
src/FrontEnd.cpp
${DSO_HELPERS_SOURCE_FILES}
src/scale_optimization/TrackerAndScaler.cpp
src/loop_closure/LoopHandler.cpp
src/loop_closure/pangolin_viewer/PangolinLoopViewer.cpp
src/loop_closure/pangolin_viewer/KeyFrameDisplay.cpp
src/loop_closure/loop_detection/ScanContext.cpp
src/loop_closure/pose_estimation/PoseEstimator.cpp)
target_link_libraries(slam_node
${DSO_LIBRARY}
${Pangolin_LIBRARIES}
${OpenCV_LIBS}
${PCL_LIBRARIES}
${catkin_LIBRARIES}
g2o_core g2o_types_slam3d g2o_solver_eigen g2o_stuff)