-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
132 lines (113 loc) · 2.64 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
cmake_minimum_required(VERSION 2.8.3)
project(multiple_kinect_baxter_calibration)
## Find catkin macros and libraries
find_package(catkin REQUIRED COMPONENTS
geometry_msgs
roscpp
rospy
pcl_ros
pcl_conversions
tf2
tf2_ros
tf2_geometry_msgs
sensor_msgs
std_msgs
cv_bridge
cmake_modules
genmsg
)
## System dependencies are found with CMake's conventions
find_package(PCL REQUIRED)
find_package(OpenCV REQUIRED)
## fallback for Eigen3
## https://github.com/ros-perception/perception_pcl/issues/106#issuecomment-134948296
find_package(Eigen 3 QUIET)
if(NOT Eigen_FOUND)
find_package(PkgConfig)
pkg_search_module(Eigen3 REQUIRED eigen3)
endif()
## Declare ROS service
add_service_files(
FILES
GetEEPosition.srv
)
## Generate added service
generate_messages(DEPENDENCIES geometry_msgs)
## Declare a catkin package
catkin_package()
## Build
include_directories(
include/${PROJECT_NAME}
${PCL_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${Eigen_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
## Print PCL Version (for debugging only) PCL_VERSION: 1.7.1
MESSAGE(STATUS "PCL_VERSION: " ${PCL_VERSION})
## Declare sphere_detector as a library
add_library(${PROJECT_NAME}_sphere_detector
src/sphere_detector.cpp
)
## Link sphere_detector library against PCL and catkin
target_link_libraries(${PROJECT_NAME}_sphere_detector
${PCL_LIBRARIES}
${catkin_LIBRARIES}
)
## Build executables and link against libraries
add_executable(test_sphere_detector
src/test_sphere_detector.cpp)
target_link_libraries(test_sphere_detector
${PROJECT_NAME}_sphere_detector
${PCL_LIBRARIES}
${catkin_LIBRARIES}
)
add_executable(data_collector_pc
src/data_collector_pc.cpp)
target_link_libraries(data_collector_pc
${PROJECT_NAME}_sphere_detector
${PCL_LIBRARIES}
${catkin_LIBRARIES}
)
add_executable(save_pcd
src/save_pcd.cpp)
target_link_libraries(save_pcd
${PCL_LIBRARIES}
${catkin_LIBRARIES}
)
add_executable(view_pc_realtime
src/view_pc_realtime.cpp)
target_link_libraries(view_pc_realtime
${PCL_LIBRARIES}
${catkin_LIBRARIES}
)
add_executable(show_all_pc
src/show_all_pc.cpp)
target_link_libraries(show_all_pc
${PCL_LIBRARIES}
${catkin_LIBRARIES}
)
add_executable(merge_pc
src/merge_pc.cpp)
target_link_libraries(merge_pc
${PCL_LIBRARIES}
${catkin_LIBRARIES}
)
add_executable(view_image
src/view_image.cpp)
target_link_libraries(view_image
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)
add_executable(segment_image
src/segment_image.cpp)
target_link_libraries(segment_image
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
)
add_executable(view_pcd
src/view_pcd.cpp)
target_link_libraries(view_pcd
${PCL_LIBRARIES}
${catkin_LIBRARIES}
)