forked from bayesian-object-tracking/dbot_ros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
201 lines (174 loc) · 4.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
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
cmake_minimum_required(VERSION 2.8.3)
project(dbot_ros)
############################
# Options #
############################
############################
# Flags #
############################
# Enable c++11 GCC 4.6 or greater required
add_definitions(-std=c++11)
add_definitions(-DPROFILING_ON=1 -fPIC) #print profiling output
############################
# Library Version #
############################
#include(cmake/version.cmake)
############################
# Library info summary #
############################
#include(cmake/info.cmake)
#info_begin()
# info_project("::bot::dbot_ros:: dbot Tracker ROS Pkg" ${PROJECT_VERSION})
#info_end()
############################
# Setup #
############################
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
set(dbot_ros_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/source)
############################
# Dependencies #
############################
find_package(catkin REQUIRED
roscpp
roslib
sensor_msgs
std_msgs
geometry_msgs
cv_bridge
rosbag
image_transport
fl
dbot
dbot_ros_msgs
interactive_markers
pcl_conversions
pcl_ros
geometric_shapes
)
set(PROJECT_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
set(CMAKE_MODULE_PATH ${PROJECT_MODULE_PATH})
find_package(Boost REQUIRED)
find_package(Eigen REQUIRED)
find_package(OpenCV REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
include_directories(${Eigen_INCLUDE_DIRS})
include_directories(${OpenCV_INCLUDE_DIRS})
###################################
## catkin specific configuration ##
###################################
catkin_package(
INCLUDE_DIRS
source
${dbot_ros_INCLUDE_DIRS}
LIBRARIES
${PROJECT_NAME}
CATKIN_DEPENDS
roscpp
roslib
sensor_msgs
std_msgs
geometry_msgs
message_filters
image_transport
fl
dbot
dbot_ros_msgs
interactive_markers
geometric_shapes
DEPENDS
OpenCV
eigen)
###########
## Build ##
###########
include_directories(${dbot_ros_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})
set(dbot_ros_SOURCE_DIR source/${PROJECT_NAME})
file(GLOB_RECURSE dbot_ros_HEADERS
${dbot_SOURCE_DIR}/*.hpp
${dbot_SOURCE_DIR}/*.h)
set(dbot_ros_SOURCES
source/${PROJECT_NAME}/object_tracker_ros.cpp
source/${PROJECT_NAME}/object_tracker_publisher.cpp
source/${PROJECT_NAME}/util/ros_camera_data_provider.cpp
source/${PROJECT_NAME}/util/data_set_camera_data_provider.cpp
source/${PROJECT_NAME}/util/ros_interface.cpp
source/${PROJECT_NAME}/util/tracking_dataset.cpp
source/${PROJECT_NAME}/util/interactive_marker_initializer.cpp)
add_library(${PROJECT_NAME}
${dbot_ros_HEADERS}
${dbot_ros_SOURCES})
add_dependencies(${PROJECT_NAME}
dbot_ros_msgs_generate_messages_cpp)
target_link_libraries(${PROJECT_NAME}
${catkin_LIBRARIES}
${OpenCV_LIBRARIES})
add_executable(particle_tracker
source/${PROJECT_NAME}/tracker/particle_tracker_node.cpp)
add_dependencies(particle_tracker
dbot_ros_msgs_generate_messages_cpp)
target_link_libraries(particle_tracker
${PROJECT_NAME}
${catkin_LIBRARIES}
${OpenCV_LIBS}
${PCL_LIBRARIES}
/usr/local/cuda/lib64/libcudart.so
yaml-cpp)
add_executable(gaussian_tracker
source/${PROJECT_NAME}/tracker/gaussian_tracker_node.cpp)
add_dependencies(gaussian_tracker
dbot_ros_msgs_generate_messages_cpp)
target_link_libraries(gaussian_tracker
${PROJECT_NAME}
${catkin_LIBRARIES}
${OpenCV_LIBS}
${PCL_LIBRARIES}
/usr/local/cuda/lib64/libcudart.so
yaml-cpp)
add_executable(object_tracker_service
source/${PROJECT_NAME}/tracker/object_tracker_service_node.cpp)
add_dependencies(object_tracker_service
dbot_ros_msgs_generate_messages_cpp)
target_link_libraries(object_tracker_service
${PROJECT_NAME}
${catkin_LIBRARIES}
${OpenCV_LIBS}
${PCL_LIBRARIES}
/usr/local/cuda/lib64/libcudart.so
yaml-cpp)
add_executable(object_tracker_controller_service
source/${PROJECT_NAME}/object_tracker_controller_service_node.cpp)
add_dependencies(object_tracker_controller_service
dbot_ros_msgs_generate_messages_cpp)
target_link_libraries(object_tracker_controller_service
${PROJECT_NAME}
/home/lev/projects/tracking/devel/lib/libdbot_gpu.so
${catkin_LIBRARIES}
${OpenCV_LIBS}
${PCL_LIBRARIES}
/usr/local/cuda/lib64/libcudart.so
yaml-cpp)
add_executable(
interactive_markers_initializer_node
source/${PROJECT_NAME}/interactive_markers_initializer_node_main.cpp)
target_link_libraries(
interactive_markers_initializer_node
${PROJECT_NAME}
/home/lev/projects/tracking/devel/lib/libdbot_gpu.so
${catkin_LIBRARIES}
/usr/local/cuda/lib64/libcudart.so)
add_executable(
pcl_pipeline
source/${PROJECT_NAME}/dev/pcl_pipeline.cpp)
target_link_libraries(
pcl_pipeline
${PROJECT_NAME}
${PCL_LIBRARIES}
${catkin_LIBRARIES})
#add_executable(
# pcd2binvox
# source/${PROJECT_NAME}/dev/pcd2binvox.cpp)
#target_link_libraries(
# pcd2binvox
# ${PROJECT_NAME}
# ${PCL_LIBRARIES}
# ${catkin_LIBRARIES})