-
-
Notifications
You must be signed in to change notification settings - Fork 40
/
CMakeLists.txt
291 lines (238 loc) · 7.82 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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
cmake_minimum_required(VERSION 2.8.3)
project(webots_ros)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs sensor_msgs message_generation tf moveit_ros_planning_interface)
## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
# catkin_python_setup()
#######################################
## Declare ROS messages and services ##
#######################################
## Generate messages in the 'msg' folder
add_message_files(
FILES
BoolStamped.msg
Float64Stamped.msg
Int32Stamped.msg
Int8Stamped.msg
RadarTarget.msg
RecognitionObject.msg
RecognitionObjects.msg
StringStamped.msg
ContactPoint.msg
)
## Generate services in the 'srv' folder
add_service_files(
FILES
camera_get_focus_info.srv
camera_get_info.srv
camera_get_zoom_info.srv
display_draw_line.srv
display_draw_oval.srv
display_draw_pixel.srv
display_draw_polygon.srv
display_draw_rectangle.srv
display_draw_text.srv
display_get_info.srv
display_image_copy.srv
display_image_delete.srv
display_image_load.srv
display_image_new.srv
display_image_paste.srv
display_image_save.srv
display_set_font.srv
field_disable_sf_tracking.srv
field_enable_sf_tracking.srv
field_get_bool.srv
field_get_color.srv
field_get_count.srv
field_get_float.srv
field_get_int32.srv
field_get_node.srv
field_get_rotation.srv
field_get_string.srv
field_get_type.srv
field_get_name.srv
field_get_vec2f.srv
field_get_vec3f.srv
field_import_node_from_string.srv
field_remove_node.srv
field_remove.srv
field_set_bool.srv
field_set_color.srv
field_set_float.srv
field_set_int32.srv
field_set_rotation.srv
field_set_string.srv
field_set_vec2f.srv
field_set_vec3f.srv
get_bool.srv
get_float_array.srv
get_float.srv
get_int.srv
get_string.srv
get_uint64.srv
get_urdf.srv
gps_decimal_degrees_to_degrees_minutes_seconds.srv
lidar_get_frequency_info.srv
lidar_get_info.srv
lidar_get_layer_point_cloud.srv
lidar_get_layer_range_image.srv
motor_set_control_pid.srv
mouse_get_state.srv
node_add_force_or_torque.srv
node_add_force_with_offset.srv
node_disable_contact_points_tracking.srv
node_disable_pose_tracking.srv
node_enable_contact_points_tracking.srv
node_enable_pose_tracking.srv
node_get_center_of_mass.srv
node_get_contact_points.srv
node_get_field.srv
node_get_field_by_index.srv
node_get_id.srv
node_get_number_of_fields.srv
node_get_name.srv
node_get_orientation.srv
node_get_pose.srv
node_get_parent_node.srv
node_get_position.srv
node_get_static_balance.srv
node_get_status.srv
node_get_string.srv
node_set_string.srv
node_get_type.srv
node_get_velocity.srv
node_remove.srv
node_reset_functions.srv
node_move_viewpoint.srv
node_set_joint_position.srv
node_set_visibility.srv
node_set_velocity.srv
pen_set_ink_color.srv
range_finder_get_info.srv
receiver_get_emitter_direction.srv
robot_get_device_list.srv
robot_set_mode.srv
robot_wait_for_user_input_event.srv
save_image.srv
set_bool.srv
set_float.srv
set_float_array.srv
set_int.srv
set_string.srv
skin_get_bone_name.srv
skin_get_bone_orientation.srv
skin_get_bone_position.srv
skin_set_bone_orientation.srv
skin_set_bone_position.srv
speaker_is_sound_playing.srv
speaker_speak.srv
speaker_play_sound.srv
supervisor_get_from_def.srv
supervisor_get_from_id.srv
supervisor_get_from_string.srv
supervisor_movie_start_recording.srv
supervisor_set_label.srv
supervisor_virtual_reality_headset_get_orientation.srv
supervisor_virtual_reality_headset_get_position.srv
)
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
std_msgs
sensor_msgs
)
###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if you package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES webots_ros
CATKIN_DEPENDS roscpp rospy std_msgs sensor_msgs message_runtime tf
# DEPENDS system_lib
)
###########
## Build ##
###########
include_directories(
${catkin_INCLUDE_DIRS}
)
## Instructions for keyboard_teleop node
add_executable(keyboard_teleop src/keyboard_teleop.cpp)
add_dependencies(keyboard_teleop webots_ros_generate_messages_cpp)
target_link_libraries(keyboard_teleop
${catkin_LIBRARIES}
)
#instructions for e_puck_line client
add_executable(e_puck_line src/e_puck_line.cpp)
add_dependencies(e_puck_line webots_ros_generate_messages_cpp)
target_link_libraries(e_puck_line
${catkin_LIBRARIES}
)
#instructions for complete_test client
add_executable(complete_test src/complete_test.cpp)
add_dependencies(complete_test webots_ros_generate_messages_cpp)
target_link_libraries(complete_test
${catkin_LIBRARIES}
)
#instructions for robot_information_parser node
add_executable(robot_information_parser src/robot_information_parser.cpp)
add_dependencies(robot_information_parser webots_ros_generate_messages_cpp)
target_link_libraries(robot_information_parser
${catkin_LIBRARIES}
)
#instructions for catch_the_bird node
add_executable(catch_the_bird src/catch_the_bird.cpp)
add_dependencies(catch_the_bird webots_ros_generate_messages_cpp)
target_link_libraries(catch_the_bird
${catkin_LIBRARIES}
)
#instructions for panoramic_view_recorder node
add_executable(panoramic_view_recorder src/panoramic_view_recorder.cpp)
add_dependencies(panoramic_view_recorder webots_ros_generate_messages_cpp)
target_link_libraries(panoramic_view_recorder
${catkin_LIBRARIES}
)
#############
## Install ##
#############
install(TARGETS keyboard_teleop
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(TARGETS e_puck_line
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(TARGETS complete_test
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(TARGETS robot_information_parser
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(TARGETS catch_the_bird
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(TARGETS panoramic_view_recorder
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
catkin_install_python(PROGRAMS scripts/ros_controller.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
catkin_install_python(PROGRAMS scripts/ros_python.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
catkin_install_python(PROGRAMS scripts/webots_launcher.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(DIRECTORY launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY plugins
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY worlds
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY config
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY controllers
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})