forked from thien94/orb_slam3_ros_wrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
101 lines (87 loc) · 1.92 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
cmake_minimum_required(VERSION 2.8)
project(orb_slam3_ros_wrapper)
# Change this to your installation of ORB-SLAM3. Default is ~/
set(ORB_SLAM3_DIR
$ENV{HOME}/ORB_SLAM3
)
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-std=c++11")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g")
find_package (catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
cv_bridge
image_transport
tf
sensor_msgs
message_generation
)
find_package(OpenCV REQUIRED)
MESSAGE("OPENCV VERSION:")
MESSAGE(${OpenCV_VERSION})
find_package(Eigen3)
MESSAGE("Eigen 3 VERSION:")
MESSAGE(${Eigen3_VERSION})
find_package(Pangolin REQUIRED)
catkin_package (
CATKIN_DEPENDS roscpp rospy std_msgs cv_bridge image_transport tf sensor_msgs message_runtime
LIBRARIES {PROJECT_NAME}
)
include_directories(
${ORB_SLAM3_DIR}
${ORB_SLAM3_DIR}/include
${ORB_SLAM3_DIR}/include/CameraModels
${PROJECT_SOURCE_DIR}/include
${EIGEN3_INCLUDE_DIR}
${catkin_INCLUDE_DIRS}
${Pangolin_INCLUDE_DIRS}
)
# Build ROS nodes
set(LIBS
${ORB_SLAM3_DIR}/lib/libORB_SLAM3.so
${EIGEN3_LIBS}
${catkin_LIBRARIES}
${Pangolin_LIBRARIES}
${OpenCV_LIBS}
)
# mono node
add_executable (${PROJECT_NAME}_mono
src/mono_node.cc
src/common.cc
)
target_link_libraries(${PROJECT_NAME}_mono
${LIBS}
)
# mono-inertial node
add_executable (${PROJECT_NAME}_mono_inertial
src/mono_inertial_node.cc
src/common.cc
)
target_link_libraries(${PROJECT_NAME}_mono_inertial
${LIBS}
)
# stereo node
add_executable (${PROJECT_NAME}_stereo
src/stereo_node.cc
src/common.cc
)
target_link_libraries(${PROJECT_NAME}_stereo
${LIBS}
)
# stereo-inertial node
add_executable (${PROJECT_NAME}_stereo_inertial
src/stereo_inertial_node.cc
src/common.cc
)
target_link_libraries(${PROJECT_NAME}_stereo_inertial
${LIBS}
)
# RGB-D node
add_executable (${PROJECT_NAME}_rgbd
src/rgbd_node.cc
src/common.cc
)
target_link_libraries(${PROJECT_NAME}_rgbd
${LIBS}
)