| 
 | 1 | +cmake_minimum_required(VERSION 2.8.3)  | 
 | 2 | +project(tf_mapping)  | 
 | 3 | + | 
 | 4 | +## Compile as C++11, supported in ROS Kinetic and newer  | 
 | 5 | +add_compile_options(-std=c++11)  | 
 | 6 | + | 
 | 7 | +set(CMAKE_BUILD_TYPE Debug)  | 
 | 8 | + | 
 | 9 | +## Find catkin macros and libraries  | 
 | 10 | +## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)  | 
 | 11 | +## is used, also find other catkin packages  | 
 | 12 | +find_package(catkin REQUIRED COMPONENTS  | 
 | 13 | +  roscpp  | 
 | 14 | +  tf  | 
 | 15 | +  std_msgs  | 
 | 16 | +  geometry_msgs  | 
 | 17 | +  sensor_msgs  | 
 | 18 | +)  | 
 | 19 | + | 
 | 20 | +#find_package(OpenCV REQUIRED)  | 
 | 21 | + | 
 | 22 | +## System dependencies are found with CMake's conventions  | 
 | 23 | +# find_package(Boost REQUIRED COMPONENTS system)  | 
 | 24 | + | 
 | 25 | + | 
 | 26 | +## Uncomment this if the package has a setup.py. This macro ensures  | 
 | 27 | +## modules and global scripts declared therein get installed  | 
 | 28 | +## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html  | 
 | 29 | +# catkin_python_setup()  | 
 | 30 | + | 
 | 31 | +################################################  | 
 | 32 | +## Declare ROS messages, services and actions ##  | 
 | 33 | +################################################  | 
 | 34 | + | 
 | 35 | +## To declare and build messages, services or actions from within this  | 
 | 36 | +## package, follow these steps:  | 
 | 37 | +## * Let MSG_DEP_SET be the set of packages whose message types you use in  | 
 | 38 | +##   your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).  | 
 | 39 | +## * In the file package.xml:  | 
 | 40 | +##   * add a build_depend tag for "message_generation"  | 
 | 41 | +##   * add a build_depend and a run_depend tag for each package in MSG_DEP_SET  | 
 | 42 | +##   * If MSG_DEP_SET isn't empty the following dependency has been pulled in  | 
 | 43 | +##     but can be declared for certainty nonetheless:  | 
 | 44 | +##     * add a run_depend tag for "message_runtime"  | 
 | 45 | +## * In this file (CMakeLists.txt):  | 
 | 46 | +##   * add "message_generation" and every package in MSG_DEP_SET to  | 
 | 47 | +##     find_package(catkin REQUIRED COMPONENTS ...)  | 
 | 48 | +##   * add "message_runtime" and every package in MSG_DEP_SET to  | 
 | 49 | +##     catkin_package(CATKIN_DEPENDS ...)  | 
 | 50 | +##   * uncomment the add_*_files sections below as needed  | 
 | 51 | +##     and list every .msg/.srv/.action file to be processed  | 
 | 52 | +##   * uncomment the generate_messages entry below  | 
 | 53 | +##   * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)  | 
 | 54 | + | 
 | 55 | +## Generate messages in the 'msg' folder  | 
 | 56 | +# add_message_files(  | 
 | 57 | +#   FILES  | 
 | 58 | +#   Message1.msg  | 
 | 59 | +#   Message2.msg  | 
 | 60 | +# )  | 
 | 61 | + | 
 | 62 | +## Generate services in the 'srv' folder  | 
 | 63 | +# add_service_files(  | 
 | 64 | +#   FILES  | 
 | 65 | +#   Service1.srv  | 
 | 66 | +#   Service2.srv  | 
 | 67 | +# )  | 
 | 68 | + | 
 | 69 | +## Generate actions in the 'action' folder  | 
 | 70 | +# add_action_files(  | 
 | 71 | +#   FILES  | 
 | 72 | +#   Action1.action  | 
 | 73 | +#   Action2.action  | 
 | 74 | +# )  | 
 | 75 | + | 
 | 76 | +## Generate added messages and services with any dependencies listed here  | 
 | 77 | +# generate_messages(  | 
 | 78 | +#   DEPENDENCIES  | 
 | 79 | +#   std_msgs  # Or other packages containing msgs  | 
 | 80 | +# )  | 
 | 81 | + | 
 | 82 | +################################################  | 
 | 83 | +## Declare ROS dynamic reconfigure parameters ##  | 
 | 84 | +################################################  | 
 | 85 | + | 
 | 86 | +## To declare and build dynamic reconfigure parameters within this  | 
 | 87 | +## package, follow these steps:  | 
 | 88 | +## * In the file package.xml:  | 
 | 89 | +##   * add a build_depend and a run_depend tag for "dynamic_reconfigure"  | 
 | 90 | +## * In this file (CMakeLists.txt):  | 
 | 91 | +##   * add "dynamic_reconfigure" to  | 
 | 92 | +##     find_package(catkin REQUIRED COMPONENTS ...)  | 
 | 93 | +##   * uncomment the "generate_dynamic_reconfigure_options" section below  | 
 | 94 | +##     and list every .cfg file to be processed  | 
 | 95 | + | 
 | 96 | +## Generate dynamic reconfigure parameters in the 'cfg' folder  | 
 | 97 | +# generate_dynamic_reconfigure_options(  | 
 | 98 | +#   cfg/DynReconf1.cfg  | 
 | 99 | +#   cfg/DynReconf2.cfg  | 
 | 100 | +# )  | 
 | 101 | + | 
 | 102 | +###################################  | 
 | 103 | +## catkin specific configuration ##  | 
 | 104 | +###################################  | 
 | 105 | +## The catkin_package macro generates cmake config files for your package  | 
 | 106 | +## Declare things to be passed to dependent projects  | 
 | 107 | +## INCLUDE_DIRS: uncomment this if you package contains header files  | 
 | 108 | +## LIBRARIES: libraries you create in this project that dependent projects also need  | 
 | 109 | +## CATKIN_DEPENDS: catkin_packages dependent projects also need  | 
 | 110 | +## DEPENDS: system dependencies of this project that dependent projects also need  | 
 | 111 | +#catkin_package(  | 
 | 112 | +#  INCLUDE_DIRS include  | 
 | 113 | +#  LIBRARIES ${PROJECT_NAME}  | 
 | 114 | +#  CATKIN_DEPENDS roscpp std_msgs sensor_msgs control_msgs  | 
 | 115 | +#  DEPENDS system_lib)  | 
 | 116 | +catkin_package(  | 
 | 117 | +  INCLUDE_DIRS include  | 
 | 118 | +  LIBRARIES ${PROJECT_NAME}  | 
 | 119 | +  CATKIN_DEPENDS roscpp tf std_msgs geometry_msgs sensor_msgs  | 
 | 120 | +#  DEPENDS system_lib  | 
 | 121 | +)  | 
 | 122 | +# |^ rviz_visual_tools deleted in catkin depends.  | 
 | 123 | +###########  | 
 | 124 | +## Build ##  | 
 | 125 | +###########  | 
 | 126 | + | 
 | 127 | +## Specify additional locations of header files  | 
 | 128 | +## Your package locations should be listed before other locations  | 
 | 129 | +include_directories(  | 
 | 130 | +  include ${catkin_INCLUDE_DIRS}  | 
 | 131 | +)  | 
 | 132 | + | 
 | 133 | +## Specify additional locations of header files  | 
 | 134 | +set(HEADERSx  | 
 | 135 | +  include/${PROJECT_NAME}/tf_mapping_node.h  | 
 | 136 | +    include/${PROJECT_NAME}/helper.h  | 
 | 137 | +)  | 
 | 138 | + | 
 | 139 | +set(SOURCES  | 
 | 140 | +src/helper.cpp  | 
 | 141 | +)  | 
 | 142 | + | 
 | 143 | +## Declare a cpp library  | 
 | 144 | +add_library(${PROJECT_NAME} ${SOURCES} ${HEADERS})  | 
 | 145 | + | 
 | 146 | +## Declare a cpp executable  | 
 | 147 | +add_executable(tf_mapping_node src/tf_mapping_node.cpp)  | 
 | 148 | + | 
 | 149 | +## Add cmake target dependencies of the executable/library  | 
 | 150 | +## as an example, message headers may need to be generated before nodes  | 
 | 151 | +add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS})  | 
 | 152 | + | 
 | 153 | +## Specify libraries to link a library or executable target against  | 
 | 154 | +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES})  | 
 | 155 | +target_link_libraries(tf_mapping_node ${PROJECT_NAME} )   | 
 | 156 | + | 
 | 157 | +#############  | 
 | 158 | +## Install ##  | 
 | 159 | +#############  | 
 | 160 | + | 
 | 161 | +# all install targets should use catkin DESTINATION variables  | 
 | 162 | +# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html  | 
 | 163 | + | 
 | 164 | +## Mark executable scripts (Python etc.) for installation  | 
 | 165 | +## in contrast to setup.py, you can choose the destination  | 
 | 166 | +# install(PROGRAMS  | 
 | 167 | +#   scripts/my_python_script  | 
 | 168 | +#   DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}  | 
 | 169 | +# )  | 
 | 170 | + | 
 | 171 | +## Mark executables and/or libraries for installation  | 
 | 172 | +# install(TARGETS ${PROJECT_NAME} tf_mapping_node  | 
 | 173 | +#   ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}  | 
 | 174 | +#   LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}  | 
 | 175 | +#   RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}  | 
 | 176 | +# )  | 
 | 177 | + | 
 | 178 | +# ## Mark other files for installation (e.g. launch and bag files, etc.)  | 
 | 179 | +# install(DIRECTORY launch  | 
 | 180 | +#   DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}  | 
 | 181 | +#   FILES_MATCHING PATTERN "*.launch"  | 
 | 182 | +#   PATTERN "*~" EXCLUDE  | 
 | 183 | +# )  | 
 | 184 | + | 
 | 185 | +# install(DIRECTORY config  | 
 | 186 | +#   DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}  | 
 | 187 | +#   PATTERN "*~" EXCLUDE  | 
 | 188 | +# )  | 
 | 189 | + | 
 | 190 | +#############  | 
 | 191 | +## Testing ##  | 
 | 192 | +#############  | 
 | 193 | + | 
 | 194 | +## Add gtest based cpp test target and link libraries  | 
 | 195 | +# catkin_add_gtest(${PROJECT_NAME}-test test/test_turtlebot3_arm_controller_exercise.cpp)  | 
 | 196 | +# if(TARGET ${PROJECT_NAME}-test)  | 
 | 197 | +#   target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})  | 
 | 198 | +# endif()  | 
 | 199 | + | 
 | 200 | +## Add folders to be run by python nosetests  | 
 | 201 | +# catkin_add_nosetests(test)  | 
0 commit comments