|
1 | | -cmake_minimum_required(VERSION 3.0.2) |
| 1 | +cmake_minimum_required(VERSION 3.16.3) |
2 | 2 | project(cuzk_tools) |
3 | | -#a |
4 | | -## Compile as C++11, supported in ROS Kinetic and newer |
5 | | -# add_compile_options(-std=c++11) |
6 | 3 |
|
7 | | -## Find catkin macros and libraries |
8 | | -## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) |
9 | | -## is used, also find other catkin packages |
10 | 4 | find_package(catkin REQUIRED COMPONENTS |
11 | | - rospy |
12 | | - sensor_msgs |
13 | | - geometry_msgs |
14 | 5 | geographic_msgs |
15 | | - std_msgs |
16 | | - visualization_msgs |
| 6 | + geometry_msgs |
17 | 7 | jsk_recognition_msgs |
18 | 8 | message_generation |
| 9 | + sensor_msgs |
| 10 | + std_msgs |
| 11 | + visualization_msgs |
19 | 12 | ) |
20 | 13 |
|
21 | | -## System dependencies are found with CMake's conventions |
22 | | -# find_package(Boost REQUIRED COMPONENTS system) |
23 | | - |
| 14 | +catkin_python_setup() |
24 | 15 |
|
25 | | -## Uncomment this if the package has a setup.py. This macro ensures |
26 | | -## modules and global scripts declared therein get installed |
27 | | -## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html |
28 | | -# catkin_python_setup() |
29 | | - |
30 | | -################################################ |
31 | | -## Declare ROS messages, services and actions ## |
32 | | -################################################ |
33 | | - |
34 | | -## To declare and build messages, services or actions from within this |
35 | | -## package, follow these steps: |
36 | | -## * Let MSG_DEP_SET be the set of packages whose message types you use in |
37 | | -## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). |
38 | | -## * In the file package.xml: |
39 | | -## * add a build_depend tag for "message_generation" |
40 | | -## * add a build_depend and a exec_depend tag for each package in MSG_DEP_SET |
41 | | -## * If MSG_DEP_SET isn't empty the following dependency has been pulled in |
42 | | -## but can be declared for certainty nonetheless: |
43 | | -## * add a exec_depend tag for "message_runtime" |
44 | | -## * In this file (CMakeLists.txt): |
45 | | -## * add "message_generation" and every package in MSG_DEP_SET to |
46 | | -## find_package(catkin REQUIRED COMPONENTS ...) |
47 | | -## * add "message_runtime" and every package in MSG_DEP_SET to |
48 | | -## catkin_package(CATKIN_DEPENDS ...) |
49 | | -## * uncomment the add_*_files sections below as needed |
50 | | -## and list every .msg/.srv/.action file to be processed |
51 | | -## * uncomment the generate_messages entry below |
52 | | -## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) |
53 | | - |
54 | | -## Generate messages in the 'msg' folder |
55 | | -add_message_files( |
56 | | - FILES |
57 | | - Polygons.msg |
58 | | - LineString.msg |
59 | | - LineStringArray.msg |
60 | | - OrtoImage.msg |
61 | | - PointArray.msg |
62 | | - Topography.msg |
63 | | - TopographyCategory.msg |
| 16 | +add_message_files(FILES |
| 17 | + LineString.msg |
| 18 | + LineStringArray.msg |
| 19 | + OrtoImage.msg |
| 20 | + PointArray.msg |
| 21 | + Polygons.msg |
| 22 | + Topography.msg |
| 23 | + TopographyCategory.msg |
64 | 24 | ) |
65 | 25 |
|
66 | | -## Generate services in the 'srv' folder |
67 | | -add_service_files( |
68 | | - FILES |
69 | | - ElevationGet.srv |
70 | | - ElevationPublish.srv |
71 | | - GetTopography.srv |
72 | | - MarkerGet.srv |
73 | | - PointElevationGet.srv |
74 | | - GeoPointElevationGet.srv |
75 | | - ElevationSetTF.srv |
76 | | - ) |
77 | | - |
78 | | -## Generate actions in the 'action' folder |
79 | | -# add_action_files( |
80 | | -# FILES |
81 | | -# Action1.action |
82 | | -# Action2.action |
83 | | -# ) |
84 | | - |
85 | | -## Generate added messages and services with any dependencies listed here |
86 | | -generate_messages( |
87 | | - DEPENDENCIES |
88 | | - sensor_msgs |
89 | | - std_msgs |
90 | | - visualization_msgs |
91 | | - geometry_msgs |
92 | | - geographic_msgs |
93 | | - jsk_recognition_msgs |
| 26 | +add_service_files(FILES |
| 27 | + ElevationGet.srv |
| 28 | + ElevationPublish.srv |
| 29 | + ElevationSetTF.srv |
| 30 | + GeoPointElevationGet.srv |
| 31 | + GetTopography.srv |
| 32 | + MarkerGet.srv |
| 33 | + PointElevationGet.srv |
94 | 34 | ) |
95 | 35 |
|
96 | | -################################################ |
97 | | -## Declare ROS dynamic reconfigure parameters ## |
98 | | -################################################ |
99 | | - |
100 | | -## To declare and build dynamic reconfigure parameters within this |
101 | | -## package, follow these steps: |
102 | | -## * In the file package.xml: |
103 | | -## * add a build_depend and a exec_depend tag for "dynamic_reconfigure" |
104 | | -## * In this file (CMakeLists.txt): |
105 | | -## * add "dynamic_reconfigure" to |
106 | | -## find_package(catkin REQUIRED COMPONENTS ...) |
107 | | -## * uncomment the "generate_dynamic_reconfigure_options" section below |
108 | | -## and list every .cfg file to be processed |
109 | | - |
110 | | -## Generate dynamic reconfigure parameters in the 'cfg' folder |
111 | | -# generate_dynamic_reconfigure_options( |
112 | | -# cfg/DynReconf1.cfg |
113 | | -# cfg/DynReconf2.cfg |
114 | | -# ) |
| 36 | +generate_messages(DEPENDENCIES |
| 37 | + geographic_msgs |
| 38 | + geometry_msgs |
| 39 | + jsk_recognition_msgs |
| 40 | + sensor_msgs |
| 41 | + std_msgs |
| 42 | + visualization_msgs |
| 43 | +) |
115 | 44 |
|
116 | | -################################### |
117 | | -## catkin specific configuration ## |
118 | | -################################### |
119 | | -## The catkin_package macro generates cmake config files for your package |
120 | | -## Declare things to be passed to dependent projects |
121 | | -## INCLUDE_DIRS: uncomment this if your package contains header files |
122 | | -## LIBRARIES: libraries you create in this project that dependent projects also need |
123 | | -## CATKIN_DEPENDS: catkin_packages dependent projects also need |
124 | | -## DEPENDS: system dependencies of this project that dependent projects also need |
125 | 45 | catkin_package( |
126 | | -# INCLUDE_DIRS include |
127 | | -# LIBRARIES elevation |
128 | | -# CATKIN_DEPENDS rospy sensor_msgs std_msgs |
129 | | -# DEPENDS system_lib |
| 46 | + CATKIN_DEPENDS |
| 47 | + geographic_msgs |
| 48 | + geometry_msgs |
| 49 | + jsk_recognition_msgs |
| 50 | + message_runtime |
| 51 | + sensor_msgs |
| 52 | + std_msgs |
| 53 | + visualization_msgs |
130 | 54 | ) |
131 | 55 |
|
132 | | -########### |
133 | | -## Build ## |
134 | | -########### |
135 | | - |
136 | | -## Specify additional locations of header files |
137 | | -## Your package locations should be listed before other locations |
138 | | -include_directories( |
139 | | -# include |
140 | | - ${catkin_INCLUDE_DIRS} |
| 56 | +catkin_install_python(PROGRAMS |
| 57 | + nodes/elevation |
| 58 | + nodes/gpkg_parser |
| 59 | + nodes/marker_pub |
| 60 | + nodes/orto2mesh |
| 61 | + nodes/pcd2mesh |
| 62 | + nodes/pose_elevation_srv |
| 63 | + nodes/pose_elevation_tf |
| 64 | + nodes/topography |
| 65 | + nodes/viz_map |
| 66 | + DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} |
141 | 67 | ) |
142 | 68 |
|
143 | | -## Declare a C++ library |
144 | | -# add_library(${PROJECT_NAME} |
145 | | -# src/${PROJECT_NAME}/elevation.cpp |
146 | | -# ) |
147 | | - |
148 | | -## Add cmake target dependencies of the library |
149 | | -## as an example, code may need to be generated before libraries |
150 | | -## either from message generation or dynamic reconfigure |
151 | | -# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) |
152 | | - |
153 | | -## Declare a C++ executable |
154 | | -## With catkin_make all packages are built within a single CMake context |
155 | | -## The recommended prefix ensures that target names across packages don't collide |
156 | | -# add_executable(${PROJECT_NAME}_node src/elevation_node.cpp) |
157 | | - |
158 | | -## Rename C++ executable without prefix |
159 | | -## The above recommended prefix causes long target names, the following renames the |
160 | | -## target back to the shorter version for ease of user use |
161 | | -## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node" |
162 | | -# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "") |
163 | | - |
164 | | -## Add cmake target dependencies of the executable |
165 | | -## same as for the library above |
166 | | -# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) |
167 | | - |
168 | | -## Specify libraries to link a library or executable target against |
169 | | -# target_link_libraries(${PROJECT_NAME}_node |
170 | | -# ${catkin_LIBRARIES} |
171 | | -# ) |
172 | | - |
173 | | -############# |
174 | | -## Install ## |
175 | | -############# |
176 | | - |
177 | | -# all install targets should use catkin DESTINATION variables |
178 | | -# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html |
179 | | - |
180 | | -## Mark executable scripts (Python etc.) for installation |
181 | | -## in contrast to setup.py, you can choose the destination |
182 | | -# catkin_install_python(PROGRAMS |
183 | | -# scripts/my_python_script |
184 | | -# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} |
185 | | -# ) |
| 69 | +install(DIRECTORY |
| 70 | + config/ |
| 71 | + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/config |
| 72 | +) |
186 | 73 |
|
187 | | -## Mark executables for installation |
188 | | -## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_executables.html |
189 | | -# install(TARGETS ${PROJECT_NAME}_node |
190 | | -# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} |
191 | | -# ) |
| 74 | +install(DIRECTORY |
| 75 | + launch/ |
| 76 | + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch |
| 77 | +) |
192 | 78 |
|
193 | | -## Mark libraries for installation |
194 | | -## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html |
195 | | -# install(TARGETS ${PROJECT_NAME} |
196 | | -# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} |
197 | | -# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} |
198 | | -# RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION} |
199 | | -# ) |
| 79 | +install(DIRECTORY |
| 80 | + rviz/ |
| 81 | + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/rviz |
| 82 | +) |
200 | 83 |
|
201 | | -## Mark cpp header files for installation |
202 | | -# install(DIRECTORY include/${PROJECT_NAME}/ |
203 | | -# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} |
204 | | -# FILES_MATCHING PATTERN "*.h" |
205 | | -# PATTERN ".svn" EXCLUDE |
206 | | -# ) |
| 84 | +if (CATKIN_ENABLE_TESTING) |
| 85 | + find_package(roslint REQUIRED) |
| 86 | + find_package(roslaunch REQUIRED) |
207 | 87 |
|
208 | | -## Mark other files for installation (e.g. launch and bag files, etc.) |
209 | | -# install(FILES |
210 | | -# # myfile1 |
211 | | -# # myfile2 |
212 | | -# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} |
213 | | -# ) |
| 88 | + roslint_custom(catkin_lint "-W2" .) |
214 | 89 |
|
215 | | -############# |
216 | | -## Testing ## |
217 | | -############# |
| 90 | + # Run roslint on Python sources |
| 91 | + # file(GLOB_RECURSE python_files nodes/*.py src/${PROJECT_NAME}/*.py setup.py) |
| 92 | + # roslint_python("${python_files}") |
218 | 93 |
|
219 | | -## Add gtest based cpp test target and link libraries |
220 | | -# catkin_add_gtest(${PROJECT_NAME}-test test/test_elevation.cpp) |
221 | | -# if(TARGET ${PROJECT_NAME}-test) |
222 | | -# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) |
223 | | -# endif() |
| 94 | + roslint_add_test() |
224 | 95 |
|
225 | | -## Add folders to be run by python nosetests |
226 | | -# catkin_add_nosetests(test) |
| 96 | + roslaunch_add_file_check(launch IGNORE_UNSET_ARGS) |
| 97 | +endif() |
0 commit comments