forked from wh200720041/ssl_slam2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·137 lines (116 loc) · 3.11 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
cmake_minimum_required(VERSION 3.5)
project(ssl_slam2)
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-std=c++17")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wall -g")
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(nav_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(rclpy REQUIRED)
find_package(std_msgs REQUIRED)
find_package(std_srvs REQUIRED)
find_package(tf2 REQUIRED)
find_package(tf2_ros REQUIRED)
find_package(tf2_sensor_msgs REQUIRED)
find_package(tf2_geometry_msgs REQUIRED)
find_package(tf2_eigen REQUIRED)
find_package(eigen3_cmake_module REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(PCL REQUIRED)
find_package(pcl_conversions REQUIRED)
find_package(Ceres REQUIRED)
find_package(GTSAM REQUIRED)
find_package(Boost REQUIRED COMPONENTS timer thread)
include_directories(
include
${EIGEN3_INCLUDE_DIR}
${PCL_INCLUDE_DIRS}
)
link_directories(
${PCL_LIBRARY_DIRS}
)
include_directories(include)
ament_export_include_directories(include)
set(SSL_SLAM2_DEPS
rclcpp
rclcpp_components
rclpy
tf2
tf2_ros
tf2_geometry_msgs
tf2_sensor_msgs
tf2_eigen
eigen3_cmake_module
geometry_msgs
sensor_msgs
nav_msgs
std_srvs
std_msgs
pcl_msgs
pcl_conversions
)
add_executable(ssl_slam2_laser_processing_node src/laserProcessingNode.cpp src/laserProcessingClass.cpp src/lidar.cpp)
target_link_libraries(
ssl_slam2_laser_processing_node
${EIGEN3_LIBRARIES}
${PCL_LIBRARIES}
${CERES_LIBRARIES})
ament_target_dependencies(
ssl_slam2_laser_processing_node
${SSL_SLAM2_DEPS}
)
add_executable(ssl_slam2_odom_estimation_localization_node src/odomEstimationLocalizationNode.cpp src/lidarOptimization.cpp src/lidar.cpp src/odomEstimationLocalizationClass.cpp)
target_link_libraries(
ssl_slam2_odom_estimation_localization_node
${EIGEN3_LIBRARIES}
${PCL_LIBRARIES}
${CERES_LIBRARIES})
ament_target_dependencies(
ssl_slam2_odom_estimation_localization_node
${SSL_SLAM2_DEPS}
)
add_executable(ssl_slam2_odom_estimation_mapping_node src/odomEstimationMappingNode.cpp src/lidarOptimization.cpp src/lidar.cpp src/odomEstimationMappingClass.cpp)
target_link_libraries(
ssl_slam2_odom_estimation_mapping_node
${EIGEN3_LIBRARIES}
${PCL_LIBRARIES}
${CERES_LIBRARIES})
ament_target_dependencies(
ssl_slam2_odom_estimation_mapping_node
${SSL_SLAM2_DEPS}
)
add_executable(ssl_slam2_map_optimization_node src/mapOptimizationNode.cpp src/mapOptimizationClass.cpp src/lidar.cpp src/lidarOptimization.cpp)
target_link_libraries(
ssl_slam2_map_optimization_node
${EIGEN3_LIBRARIES}
${PCL_LIBRARIES}
${CERES_LIBRARIES}
gtsam)
ament_target_dependencies(
ssl_slam2_map_optimization_node
${SSL_SLAM2_DEPS}
)
install(TARGETS
ssl_slam2_laser_processing_node
DESTINATION lib/${PROJECT_NAME}
)
install(TARGETS
ssl_slam2_odom_estimation_localization_node
DESTINATION lib/${PROJECT_NAME}
)
install(TARGETS
ssl_slam2_odom_estimation_mapping_node
DESTINATION lib/${PROJECT_NAME}
)
install(TARGETS
ssl_slam2_map_optimization_node
DESTINATION lib/${PROJECT_NAME}
)
install(DIRECTORY
launch
rviz
DESTINATION share/${PROJECT_NAME}
)
ament_package()