Guest User

Untitled

a guest
Apr 27th, 2018
112
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. cmake_minimum_required(VERSION 2.8.3)
  2. project(velodyne_height_map)
  3.  
  4. set(${PROJECT_NAME}_CATKIN_DEPS
  5. nodelet
  6. roscpp
  7. pcl_ros
  8. sensor_msgs
  9. tf)
  10.  
  11. find_package(catkin REQUIRED COMPONENTS
  12. ${${PROJECT_NAME}_CATKIN_DEPS}
  13. angles
  14. pcl_conversions
  15. roslaunch rostest)
  16. find_package(Boost)
  17. find_package(PCL REQUIRED QUIET COMPONENTS common)
  18.  
  19. include_directories(include
  20. ${Boost_INCLUDE_DIR}
  21. ${catkin_INCLUDE_DIRS}
  22. ${PCL_INCLUDE_DIR})
  23.  
  24. catkin_package(CATKIN_DEPENDS ${${PROJECT_NAME}_CATKIN_DEPS})
  25.  
  26. add_executable(heightmap_node src/heightmap_node.cpp src/heightmap.cpp)
  27. target_link_libraries(heightmap_node
  28. ${catkin_LIBRARIES}
  29. ${Boost_LIBRARIES}
  30. ${PCL_LIBRARIES})
  31.  
  32. add_library(heightmap_nodelet src/heightmap_nodelet.cpp src/heightmap.cpp)
  33. target_link_libraries(heightmap_nodelet
  34. ${catkin_LIBRARIES}
  35. ${Boost_LIBRARIES}
  36. ${PCL_LIBRARIES})
  37. install(TARGETS heightmap_node
  38. RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
  39. install(TARGETS heightmap_nodelet
  40. RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
  41. ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  42. LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION})
  43. install(FILES nodelets.xml
  44. DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
  45. install(DIRECTORY launch/
  46. DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch)
  47. if (CATKIN_ENABLE_TESTING)
  48. message("-- ${PROJECT_NAME} unit testing enabled")
  49. catkin_download_test_data(
  50. ${PROJECT_NAME}_tests_class.pcap
  51. http://download.ros.org/data/velodyne/class.pcap
  52. DESTINATION ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/tests
  53. MD5 65808d25772101358a3719b451b3d015)
  54.  
  55. add_rostest(tests/heightmap_node_hz.test)
  56. add_rostest(tests/heightmap_nodelet_hz.test)
  57.  
  58. else ()
  59. message("-- ${PROJECT_NAME} unit testing disabled")
  60. endif (CATKIN_ENABLE_TESTING)
  61.  
  62.  
  63.  
  64. add_executable(myheight src/my_height_sub.cpp)
  65. target_link_libraries(myheight ${catkin_LIBRARIES}${catkin_LIBRARIES}
  66. ${Boost_LIBRARIES}
  67. ${PCL_LIBRARIES}${PCL_ROS_FILTER})
RAW Paste Data