-
Notifications
You must be signed in to change notification settings - Fork 8
/
CMakeLists.txt
105 lines (78 loc) · 2.75 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
cmake_minimum_required(VERSION 3.1.3)
project(loam_velodyne)
find_package(catkin REQUIRED COMPONENTS
geometry_msgs
nav_msgs
sensor_msgs
roscpp
rospy
std_msgs
tf
pcl_conversions)
find_package(Eigen3 REQUIRED)
find_package(PCL REQUIRED)
find_package(Ceres REQUIRED)
# add for gps noise
find_package(OpenCV REQUIRED)
include_directories(
include
${catkin_INCLUDE_DIRS}
#${EIGEN3_INCLUDE_DIR}
${PCL_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
catkin_package(
CATKIN_DEPENDS geometry_msgs nav_msgs roscpp rospy std_msgs tf pcl_conversions
DEPENDS EIGEN3 PCL
INCLUDE_DIRS include
LIBRARIES loam
)
## Compile as C++14, supported in ROS Kinetic and newer
# set_property(TARGET invz_player PROPERTY CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_definitions( -march=native )
add_subdirectory(src/lib)
########################
add_subdirectory(src/ThirdParty/GeographicLib/)
include_directories(
${catkin_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
src/ThirdParty/GeographicLib/include/
)
add_executable(backend_fusion_node
src/backendOptNode.cpp
src/backendOpt.cpp)
target_link_libraries(backend_fusion_node ${catkin_LIBRARIES} ${CERES_LIBRARIES} ${OpenCV_LIBS} libGeographiccc)
add_executable(backend_fusion_node2
src/backendOptNode_.cpp
src/backendOpt.cpp)
target_link_libraries(backend_fusion_node2 ${catkin_LIBRARIES} ${CERES_LIBRARIES} ${OpenCV_LIBS} libGeographiccc)
#########################
add_executable(multiScanRegistration src/multi_scan_registration_node.cpp)
target_link_libraries(multiScanRegistration ${catkin_LIBRARIES} ${PCL_LIBRARIES} loam )
add_executable(laserOdometry src/laser_odometry_node.cpp)
target_link_libraries(laserOdometry ${catkin_LIBRARIES} ${PCL_LIBRARIES} loam )
add_executable(laserMapping src/laser_mapping_node.cpp)
target_link_libraries(laserMapping ${catkin_LIBRARIES} ${PCL_LIBRARIES} loam )
add_executable(transformMaintenance src/transform_maintenance_node.cpp)
target_link_libraries(transformMaintenance ${catkin_LIBRARIES} ${PCL_LIBRARIES} loam )
if (CATKIN_ENABLE_TESTING)
find_package(rostest REQUIRED)
# TODO: Download test data
catkin_download_test_data(${PROJECT_NAME}_test_data.tar.gz
https://dl.dropboxusercontent.com/s/y4hn486461tfmpm/velodyne_loam_test_data.tar.gz
MD5 3d5194e6981975588b7a93caebf79ba4)
add_custom_target(${PROJECT_NAME}_test_data
COMMAND ${CMAKE_COMMAND} -E tar -xzf velodyne_loam_test_data.tar.gz
DEPENDS ${PROJECT_NAME}_test_data.tar.gz)
configure_file(tests/loam.test.in
${PROJECT_BINARY_DIR}/test/loam.test)
add_rostest(${PROJECT_BINARY_DIR}/test/loam.test
DEPENDENCIES
${PROJECT_NAME}_test_data
multiScanRegistration
laserOdometry
laserMapping
transformMaintenance)
endif()