From 7e7738c10df870e6523a9b2e42dd5ef23c805e6b Mon Sep 17 00:00:00 2001 From: Hanzhe Teng Date: Tue, 10 Dec 2019 22:39:18 -0800 Subject: [PATCH 1/2] clean up --- .../OpenCV4Tegra-ROSIndigo/Untitled Document~ | 0 .../cv_bridgeConfig.cmake~ | 8 - .../OpenCV4Tegra-ROSIndigo/image_geometry.pc~ | 8 - .../image_geometryConfig.cmake~ | 8 - Files/OpenCV4Tegra-ROSKinetic/cv_bridge.pc~ | 8 - .../cv_bridgeConfig.cmake~ | 191 ---------------- .../image_geometry.pc~ | 8 - .../image_geometryConfig.cmake~ | 191 ---------------- .../roscuda_img_filter/CMakeLists.txt~ | 210 ------------------ .../roscuda_img_filter/opencvtest.launch~ | 5 - ROS Packages/roscuda_img_filter/package.xml~ | 61 ----- .../roscuda_img_filter.launch~ | 5 - 12 files changed, 703 deletions(-) delete mode 100644 Files/OpenCV4Tegra-ROSIndigo/Untitled Document~ delete mode 100644 Files/OpenCV4Tegra-ROSIndigo/cv_bridgeConfig.cmake~ delete mode 100644 Files/OpenCV4Tegra-ROSIndigo/image_geometry.pc~ delete mode 100644 Files/OpenCV4Tegra-ROSIndigo/image_geometryConfig.cmake~ delete mode 100644 Files/OpenCV4Tegra-ROSKinetic/cv_bridge.pc~ delete mode 100644 Files/OpenCV4Tegra-ROSKinetic/cv_bridgeConfig.cmake~ delete mode 100644 Files/OpenCV4Tegra-ROSKinetic/image_geometry.pc~ delete mode 100644 Files/OpenCV4Tegra-ROSKinetic/image_geometryConfig.cmake~ delete mode 100644 ROS Packages/roscuda_img_filter/CMakeLists.txt~ delete mode 100644 ROS Packages/roscuda_img_filter/opencvtest.launch~ delete mode 100644 ROS Packages/roscuda_img_filter/package.xml~ delete mode 100644 ROS Packages/roscuda_img_filter/roscuda_img_filter.launch~ diff --git a/Files/OpenCV4Tegra-ROSIndigo/Untitled Document~ b/Files/OpenCV4Tegra-ROSIndigo/Untitled Document~ deleted file mode 100644 index e69de29..0000000 diff --git a/Files/OpenCV4Tegra-ROSIndigo/cv_bridgeConfig.cmake~ b/Files/OpenCV4Tegra-ROSIndigo/cv_bridgeConfig.cmake~ deleted file mode 100644 index 465812e..0000000 --- a/Files/OpenCV4Tegra-ROSIndigo/cv_bridgeConfig.cmake~ +++ /dev/null @@ -1,8 +0,0 @@ -prefix=/opt/ros/indigo - -Name: image_geometry -Description: Description of image_geometry -Version: 1.11.6 -Cflags: -I/opt/ros/indigo/include -I/usr/include/opencv -I/usr/include -Libs: -L/opt/ros/indigo/lib -limage_geometry -l:/usr/lib/libopencv_videostab.so.2.4.12 -l:/usr/lib/libopencv_video.so.2.4.12 -l:/usr/lib/libopencv_superres.so.2.4.12 -l:/usr/lib/libopencv_stitching.so.2.4.12 -l:/usr/lib/libopencv_photo.so.2.4.12 -l:/usr/lib/libopencv_objdetect.so.2.4.12 -l:/usr/lib/libopencv_ml.so.2.4.12 -l:/usr/lib/libopencv_legacy.so.2.4.12 -l:/usr/lib/libopencv_imgproc.so.2.4.12 -l:/usr/lib/libopencv_highgui.so.2.4.12 -l:/usr/lib/libopencv_gpu.so.2.4.12 -l:/usr/lib/libopencv_flann.so.2.4.12 -l:/usr/lib/libopencv_features2d.so.2.4.12 -l:/usr/lib/libopencv_core.so.2.4.12 -l:/usr/lib/libopencv_contrib.so.2.4.12 -l:/usr/lib/libopencv_calib3d.so.2.4.12 -Requires: sensor_msgs diff --git a/Files/OpenCV4Tegra-ROSIndigo/image_geometry.pc~ b/Files/OpenCV4Tegra-ROSIndigo/image_geometry.pc~ deleted file mode 100644 index 0711e0f..0000000 --- a/Files/OpenCV4Tegra-ROSIndigo/image_geometry.pc~ +++ /dev/null @@ -1,8 +0,0 @@ -prefix=/opt/ros/indigo - -Name: cv_bridge -Description: Description of cv_bridge -Version: 1.11.6 -Cflags: -I/opt/ros/indigo/include -I/usr/include/opencv -I/usr/include -Libs: -L/opt/ros/indigo/lib -lcv_bridge -l:/usr/lib/libopencv_videostab.so.2.4.12 -l:/usr/lib/libopencv_video.so.2.4.12 -l:/usr/lib/libopencv_superres.so.2.4.12 -l:/usr/lib/libopencv_stitching.so.2.4.12 -l:/usr/lib/libopencv_photo.so.2.4.12 -l:/usr/lib/libopencv_objdetect.so.2.4.12 -l:/usr/lib/libopencv_ml.so.2.4.12 -l:/usr/lib/libopencv_legacy.so.2.4.12 -l:/usr/lib/libopencv_imgproc.so.2.4.12 -l:/usr/lib/libopencv_highgui.so.2.4.12 -l:/usr/lib/libopencv_gpu.so.2.4.12 -l:/usr/lib/libopencv_flann.so.2.4.12 -l:/usr/lib/libopencv_features2d.so.2.4.12 -l:/usr/lib/libopencv_core.so.2.4.12 -l:/usr/lib/libopencv_contrib.so.2.4.12 -l:/usr/lib/libopencv_calib3d.so.2.4.12 -Requires: rosconsole sensor_msgs diff --git a/Files/OpenCV4Tegra-ROSIndigo/image_geometryConfig.cmake~ b/Files/OpenCV4Tegra-ROSIndigo/image_geometryConfig.cmake~ deleted file mode 100644 index 0711e0f..0000000 --- a/Files/OpenCV4Tegra-ROSIndigo/image_geometryConfig.cmake~ +++ /dev/null @@ -1,8 +0,0 @@ -prefix=/opt/ros/indigo - -Name: cv_bridge -Description: Description of cv_bridge -Version: 1.11.6 -Cflags: -I/opt/ros/indigo/include -I/usr/include/opencv -I/usr/include -Libs: -L/opt/ros/indigo/lib -lcv_bridge -l:/usr/lib/libopencv_videostab.so.2.4.12 -l:/usr/lib/libopencv_video.so.2.4.12 -l:/usr/lib/libopencv_superres.so.2.4.12 -l:/usr/lib/libopencv_stitching.so.2.4.12 -l:/usr/lib/libopencv_photo.so.2.4.12 -l:/usr/lib/libopencv_objdetect.so.2.4.12 -l:/usr/lib/libopencv_ml.so.2.4.12 -l:/usr/lib/libopencv_legacy.so.2.4.12 -l:/usr/lib/libopencv_imgproc.so.2.4.12 -l:/usr/lib/libopencv_highgui.so.2.4.12 -l:/usr/lib/libopencv_gpu.so.2.4.12 -l:/usr/lib/libopencv_flann.so.2.4.12 -l:/usr/lib/libopencv_features2d.so.2.4.12 -l:/usr/lib/libopencv_core.so.2.4.12 -l:/usr/lib/libopencv_contrib.so.2.4.12 -l:/usr/lib/libopencv_calib3d.so.2.4.12 -Requires: rosconsole sensor_msgs diff --git a/Files/OpenCV4Tegra-ROSKinetic/cv_bridge.pc~ b/Files/OpenCV4Tegra-ROSKinetic/cv_bridge.pc~ deleted file mode 100644 index 0711e0f..0000000 --- a/Files/OpenCV4Tegra-ROSKinetic/cv_bridge.pc~ +++ /dev/null @@ -1,8 +0,0 @@ -prefix=/opt/ros/indigo - -Name: cv_bridge -Description: Description of cv_bridge -Version: 1.11.6 -Cflags: -I/opt/ros/indigo/include -I/usr/include/opencv -I/usr/include -Libs: -L/opt/ros/indigo/lib -lcv_bridge -l:/usr/lib/libopencv_videostab.so.2.4.12 -l:/usr/lib/libopencv_video.so.2.4.12 -l:/usr/lib/libopencv_superres.so.2.4.12 -l:/usr/lib/libopencv_stitching.so.2.4.12 -l:/usr/lib/libopencv_photo.so.2.4.12 -l:/usr/lib/libopencv_objdetect.so.2.4.12 -l:/usr/lib/libopencv_ml.so.2.4.12 -l:/usr/lib/libopencv_legacy.so.2.4.12 -l:/usr/lib/libopencv_imgproc.so.2.4.12 -l:/usr/lib/libopencv_highgui.so.2.4.12 -l:/usr/lib/libopencv_gpu.so.2.4.12 -l:/usr/lib/libopencv_flann.so.2.4.12 -l:/usr/lib/libopencv_features2d.so.2.4.12 -l:/usr/lib/libopencv_core.so.2.4.12 -l:/usr/lib/libopencv_contrib.so.2.4.12 -l:/usr/lib/libopencv_calib3d.so.2.4.12 -Requires: rosconsole sensor_msgs diff --git a/Files/OpenCV4Tegra-ROSKinetic/cv_bridgeConfig.cmake~ b/Files/OpenCV4Tegra-ROSKinetic/cv_bridgeConfig.cmake~ deleted file mode 100644 index bbea61d..0000000 --- a/Files/OpenCV4Tegra-ROSKinetic/cv_bridgeConfig.cmake~ +++ /dev/null @@ -1,191 +0,0 @@ -# generated from catkin/cmake/template/pkgConfig.cmake.in - -# append elements to a list and remove existing duplicates from the list -# copied from catkin/cmake/list_append_deduplicate.cmake to keep pkgConfig -# self contained -macro(_list_append_deduplicate listname) - if(NOT "${ARGN}" STREQUAL "") - if(${listname}) - list(REMOVE_ITEM ${listname} ${ARGN}) - endif() - list(APPEND ${listname} ${ARGN}) - endif() -endmacro() - -# append elements to a list if they are not already in the list -# copied from catkin/cmake/list_append_unique.cmake to keep pkgConfig -# self contained -macro(_list_append_unique listname) - foreach(_item ${ARGN}) - list(FIND ${listname} ${_item} _index) - if(_index EQUAL -1) - list(APPEND ${listname} ${_item}) - endif() - endforeach() -endmacro() - -# pack a list of libraries with optional build configuration keywords -# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig -# self contained -macro(_pack_libraries_with_build_configuration VAR) - set(${VAR} "") - set(_argn ${ARGN}) - list(LENGTH _argn _count) - set(_index 0) - while(${_index} LESS ${_count}) - list(GET _argn ${_index} lib) - if("${lib}" MATCHES "^debug|optimized|general$") - math(EXPR _index "${_index} + 1") - if(${_index} EQUAL ${_count}) - message(FATAL_ERROR "_pack_libraries_with_build_configuration() the list of libraries '${ARGN}' ends with '${lib}' which is a build configuration keyword and must be followed by a library") - endif() - list(GET _argn ${_index} library) - list(APPEND ${VAR} "${lib}${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}${library}") - else() - list(APPEND ${VAR} "${lib}") - endif() - math(EXPR _index "${_index} + 1") - endwhile() -endmacro() - -# unpack a list of libraries with optional build configuration keyword prefixes -# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig -# self contained -macro(_unpack_libraries_with_build_configuration VAR) - set(${VAR} "") - foreach(lib ${ARGN}) - string(REGEX REPLACE "^(debug|optimized|general)${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}(.+)$" "\\1;\\2" lib "${lib}") - list(APPEND ${VAR} "${lib}") - endforeach() -endmacro() - - -if(cv_bridge_CONFIG_INCLUDED) - return() -endif() -set(cv_bridge_CONFIG_INCLUDED TRUE) - -# set variables for source/devel/install prefixes -if("FALSE" STREQUAL "TRUE") - set(cv_bridge_SOURCE_PREFIX /tmp/buildd/ros-indigo-cv-bridge-1.11.6-0trusty-20141201-2058) - set(cv_bridge_DEVEL_PREFIX /tmp/buildd/ros-indigo-cv-bridge-1.11.6-0trusty-20141201-2058/obj-arm-linux-gnueabihf/devel) - set(cv_bridge_INSTALL_PREFIX "") - set(cv_bridge_PREFIX ${cv_bridge_DEVEL_PREFIX}) -else() - set(cv_bridge_SOURCE_PREFIX "") - set(cv_bridge_DEVEL_PREFIX "") - set(cv_bridge_INSTALL_PREFIX /opt/ros/indigo) - set(cv_bridge_PREFIX ${cv_bridge_INSTALL_PREFIX}) -endif() - -# warn when using a deprecated package -if(NOT "" STREQUAL "") - set(_msg "WARNING: package 'cv_bridge' is deprecated") - # append custom deprecation text if available - if(NOT "" STREQUAL "TRUE") - set(_msg "${_msg} ()") - endif() - message("${_msg}") -endif() - -# flag project as catkin-based to distinguish if a find_package()-ed project is a catkin project -set(cv_bridge_FOUND_CATKIN_PROJECT TRUE) - -if(NOT "include;/usr/include/opencv;/usr/include" STREQUAL "") - set(cv_bridge_INCLUDE_DIRS "") - set(_include_dirs "include;/usr/include/opencv;/usr/include") - foreach(idir ${_include_dirs}) - if(IS_ABSOLUTE ${idir} AND IS_DIRECTORY ${idir}) - set(include ${idir}) - elseif("${idir}" STREQUAL "include") - get_filename_component(include "${cv_bridge_DIR}/../../../include" ABSOLUTE) - if(NOT IS_DIRECTORY ${include}) - message(FATAL_ERROR "Project 'cv_bridge' specifies '${idir}' as an include dir, which is not found. It does not exist in '${include}'. Ask the maintainer 'Vincent Rabaud ' to fix it.") - endif() - else() - message(FATAL_ERROR "Project 'cv_bridge' specifies '${idir}' as an include dir, which is not found. It does neither exist as an absolute directory nor in '/opt/ros/indigo/${idir}'. Ask the maintainer 'Vincent Rabaud ' to fix it.") - endif() - _list_append_unique(cv_bridge_INCLUDE_DIRS ${include}) - endforeach() -endif() - -set(libraries "cv_bridge;/usr/lib/libopencv_videostab.so.2.4.12;/usr/lib/libopencv_video.so.2.4.12;/usr/lib/libopencv_superres.so.2.4.12;/usr/lib/libopencv_stitching.so.2.4.12;/usr/lib/libopencv_photo.so.2.4.12;/usr/lib/libopencv_objdetect.so.2.4.12;/usr/lib/libopencv_ml.so.2.4.12;/usr/lib/libopencv_legacy.so.2.4.12;/usr/lib/libopencv_imgproc.so.2.4.12;/usr/lib/libopencv_highgui.so.2.4.12;/usr/lib/libopencv_gpu.so.2.4.12;/usr/lib/libopencv_flann.so.2.4.12;/usr/lib/libopencv_features2d.so.2.4.12;/usr/lib/libopencv_core.so.2.4.12;/usr/lib/libopencv_contrib.so.2.4.12;/usr/lib/libopencv_calib3d.so.2.4.12") -foreach(library ${libraries}) - # keep build configuration keywords, target names and absolute libraries as-is - if("${library}" MATCHES "^debug|optimized|general$") - list(APPEND cv_bridge_LIBRARIES ${library}) - elseif(TARGET ${library}) - list(APPEND cv_bridge_LIBRARIES ${library}) - elseif(IS_ABSOLUTE ${library}) - list(APPEND cv_bridge_LIBRARIES ${library}) - else() - set(lib_path "") - set(lib "${library}-NOTFOUND") - # since the path where the library is found is returned we have to iterate over the paths manually - foreach(path /opt/ros/indigo/lib;/opt/ros/indigo/lib) - find_library(lib ${library} - PATHS ${path} - NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) - if(lib) - set(lib_path ${path}) - break() - endif() - endforeach() - if(lib) - _list_append_unique(cv_bridge_LIBRARY_DIRS ${lib_path}) - list(APPEND cv_bridge_LIBRARIES ${lib}) - else() - # as a fall back for non-catkin libraries try to search globally - find_library(lib ${library}) - if(NOT lib) - message(FATAL_ERROR "Project '${PROJECT_NAME}' tried to find library '${library}'. The library is neither a target nor built/installed properly. Did you compile project 'cv_bridge'? Did you find_package() it before the subdirectory containing its code is included?") - endif() - list(APPEND cv_bridge_LIBRARIES ${lib}) - endif() - endif() -endforeach() - -set(cv_bridge_EXPORTED_TARGETS "") -# create dummy targets for exported code generation targets to make life of users easier -foreach(t ${cv_bridge_EXPORTED_TARGETS}) - if(NOT TARGET ${t}) - add_custom_target(${t}) - endif() -endforeach() - -set(depends "rosconsole;sensor_msgs") -foreach(depend ${depends}) - string(REPLACE " " ";" depend_list ${depend}) - # the package name of the dependency must be kept in a unique variable so that it is not overwritten in recursive calls - list(GET depend_list 0 cv_bridge_dep) - list(LENGTH depend_list count) - if(${count} EQUAL 1) - # simple dependencies must only be find_package()-ed once - if(NOT ${cv_bridge_dep}_FOUND) - find_package(${cv_bridge_dep} REQUIRED) - endif() - else() - # dependencies with components must be find_package()-ed again - list(REMOVE_AT depend_list 0) - find_package(${cv_bridge_dep} REQUIRED ${depend_list}) - endif() - _list_append_unique(cv_bridge_INCLUDE_DIRS ${${cv_bridge_dep}_INCLUDE_DIRS}) - - # merge build configuration keywords with library names to correctly deduplicate - _pack_libraries_with_build_configuration(cv_bridge_LIBRARIES ${cv_bridge_LIBRARIES}) - _pack_libraries_with_build_configuration(_libraries ${${cv_bridge_dep}_LIBRARIES}) - _list_append_deduplicate(cv_bridge_LIBRARIES ${_libraries}) - # undo build configuration keyword merging after deduplication - _unpack_libraries_with_build_configuration(cv_bridge_LIBRARIES ${cv_bridge_LIBRARIES}) - - _list_append_unique(cv_bridge_LIBRARY_DIRS ${${cv_bridge_dep}_LIBRARY_DIRS}) - list(APPEND cv_bridge_EXPORTED_TARGETS ${${cv_bridge_dep}_EXPORTED_TARGETS}) -endforeach() - -set(pkg_cfg_extras "") -foreach(extra ${pkg_cfg_extras}) - if(NOT IS_ABSOLUTE ${extra}) - set(extra ${cv_bridge_DIR}/${extra}) - endif() - include(${extra}) -endforeach() diff --git a/Files/OpenCV4Tegra-ROSKinetic/image_geometry.pc~ b/Files/OpenCV4Tegra-ROSKinetic/image_geometry.pc~ deleted file mode 100644 index 465812e..0000000 --- a/Files/OpenCV4Tegra-ROSKinetic/image_geometry.pc~ +++ /dev/null @@ -1,8 +0,0 @@ -prefix=/opt/ros/indigo - -Name: image_geometry -Description: Description of image_geometry -Version: 1.11.6 -Cflags: -I/opt/ros/indigo/include -I/usr/include/opencv -I/usr/include -Libs: -L/opt/ros/indigo/lib -limage_geometry -l:/usr/lib/libopencv_videostab.so.2.4.12 -l:/usr/lib/libopencv_video.so.2.4.12 -l:/usr/lib/libopencv_superres.so.2.4.12 -l:/usr/lib/libopencv_stitching.so.2.4.12 -l:/usr/lib/libopencv_photo.so.2.4.12 -l:/usr/lib/libopencv_objdetect.so.2.4.12 -l:/usr/lib/libopencv_ml.so.2.4.12 -l:/usr/lib/libopencv_legacy.so.2.4.12 -l:/usr/lib/libopencv_imgproc.so.2.4.12 -l:/usr/lib/libopencv_highgui.so.2.4.12 -l:/usr/lib/libopencv_gpu.so.2.4.12 -l:/usr/lib/libopencv_flann.so.2.4.12 -l:/usr/lib/libopencv_features2d.so.2.4.12 -l:/usr/lib/libopencv_core.so.2.4.12 -l:/usr/lib/libopencv_contrib.so.2.4.12 -l:/usr/lib/libopencv_calib3d.so.2.4.12 -Requires: sensor_msgs diff --git a/Files/OpenCV4Tegra-ROSKinetic/image_geometryConfig.cmake~ b/Files/OpenCV4Tegra-ROSKinetic/image_geometryConfig.cmake~ deleted file mode 100644 index 5e4d09e..0000000 --- a/Files/OpenCV4Tegra-ROSKinetic/image_geometryConfig.cmake~ +++ /dev/null @@ -1,191 +0,0 @@ -# generated from catkin/cmake/template/pkgConfig.cmake.in - -# append elements to a list and remove existing duplicates from the list -# copied from catkin/cmake/list_append_deduplicate.cmake to keep pkgConfig -# self contained -macro(_list_append_deduplicate listname) - if(NOT "${ARGN}" STREQUAL "") - if(${listname}) - list(REMOVE_ITEM ${listname} ${ARGN}) - endif() - list(APPEND ${listname} ${ARGN}) - endif() -endmacro() - -# append elements to a list if they are not already in the list -# copied from catkin/cmake/list_append_unique.cmake to keep pkgConfig -# self contained -macro(_list_append_unique listname) - foreach(_item ${ARGN}) - list(FIND ${listname} ${_item} _index) - if(_index EQUAL -1) - list(APPEND ${listname} ${_item}) - endif() - endforeach() -endmacro() - -# pack a list of libraries with optional build configuration keywords -# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig -# self contained -macro(_pack_libraries_with_build_configuration VAR) - set(${VAR} "") - set(_argn ${ARGN}) - list(LENGTH _argn _count) - set(_index 0) - while(${_index} LESS ${_count}) - list(GET _argn ${_index} lib) - if("${lib}" MATCHES "^debug|optimized|general$") - math(EXPR _index "${_index} + 1") - if(${_index} EQUAL ${_count}) - message(FATAL_ERROR "_pack_libraries_with_build_configuration() the list of libraries '${ARGN}' ends with '${lib}' which is a build configuration keyword and must be followed by a library") - endif() - list(GET _argn ${_index} library) - list(APPEND ${VAR} "${lib}${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}${library}") - else() - list(APPEND ${VAR} "${lib}") - endif() - math(EXPR _index "${_index} + 1") - endwhile() -endmacro() - -# unpack a list of libraries with optional build configuration keyword prefixes -# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig -# self contained -macro(_unpack_libraries_with_build_configuration VAR) - set(${VAR} "") - foreach(lib ${ARGN}) - string(REGEX REPLACE "^(debug|optimized|general)${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}(.+)$" "\\1;\\2" lib "${lib}") - list(APPEND ${VAR} "${lib}") - endforeach() -endmacro() - - -if(image_geometry_CONFIG_INCLUDED) - return() -endif() -set(image_geometry_CONFIG_INCLUDED TRUE) - -# set variables for source/devel/install prefixes -if("FALSE" STREQUAL "TRUE") - set(image_geometry_SOURCE_PREFIX /tmp/buildd/ros-indigo-image-geometry-1.11.6-0trusty-20141201-2057) - set(image_geometry_DEVEL_PREFIX /tmp/buildd/ros-indigo-image-geometry-1.11.6-0trusty-20141201-2057/obj-arm-linux-gnueabihf/devel) - set(image_geometry_INSTALL_PREFIX "") - set(image_geometry_PREFIX ${image_geometry_DEVEL_PREFIX}) -else() - set(image_geometry_SOURCE_PREFIX "") - set(image_geometry_DEVEL_PREFIX "") - set(image_geometry_INSTALL_PREFIX /opt/ros/indigo) - set(image_geometry_PREFIX ${image_geometry_INSTALL_PREFIX}) -endif() - -# warn when using a deprecated package -if(NOT "" STREQUAL "") - set(_msg "WARNING: package 'image_geometry' is deprecated") - # append custom deprecation text if available - if(NOT "" STREQUAL "TRUE") - set(_msg "${_msg} ()") - endif() - message("${_msg}") -endif() - -# flag project as catkin-based to distinguish if a find_package()-ed project is a catkin project -set(image_geometry_FOUND_CATKIN_PROJECT TRUE) - -if(NOT "include;/usr/include/opencv;/usr/include" STREQUAL "") - set(image_geometry_INCLUDE_DIRS "") - set(_include_dirs "include;/usr/include/opencv;/usr/include") - foreach(idir ${_include_dirs}) - if(IS_ABSOLUTE ${idir} AND IS_DIRECTORY ${idir}) - set(include ${idir}) - elseif("${idir}" STREQUAL "include") - get_filename_component(include "${image_geometry_DIR}/../../../include" ABSOLUTE) - if(NOT IS_DIRECTORY ${include}) - message(FATAL_ERROR "Project 'image_geometry' specifies '${idir}' as an include dir, which is not found. It does not exist in '${include}'. Ask the maintainer 'Vincent Rabaud ' to fix it.") - endif() - else() - message(FATAL_ERROR "Project 'image_geometry' specifies '${idir}' as an include dir, which is not found. It does neither exist as an absolute directory nor in '/opt/ros/indigo/${idir}'. Ask the maintainer 'Vincent Rabaud ' to fix it.") - endif() - _list_append_unique(image_geometry_INCLUDE_DIRS ${include}) - endforeach() -endif() - -set(libraries "image_geometry;/usr/lib/libopencv_videostab.so.2.4.12;/usr/lib/libopencv_video.so.2.4.12;/usr/lib/libopencv_superres.so.2.4.12;/usr/lib/libopencv_stitching.so.2.4.12;/usr/lib/libopencv_photo.so.2.4.12;/usr/lib/libopencv_objdetect.so.2.4.12;/usr/lib/libopencv_ml.so.2.4.12;/usr/lib/libopencv_legacy.so.2.4.12;/usr/lib/libopencv_imgproc.so.2.4.12;/usr/lib/libopencv_highgui.so.2.4.12;/usr/lib/libopencv_gpu.so.2.4.12;/usr/lib/libopencv_flann.so.2.4.12;/usr/lib/libopencv_features2d.so.2.4.12;/usr/lib/libopencv_core.so.2.4.12;/usr/lib/libopencv_contrib.so.2.4.12;/usr/lib/libopencv_calib3d.so.2.4.12") -foreach(library ${libraries}) - # keep build configuration keywords, target names and absolute libraries as-is - if("${library}" MATCHES "^debug|optimized|general$") - list(APPEND image_geometry_LIBRARIES ${library}) - elseif(TARGET ${library}) - list(APPEND image_geometry_LIBRARIES ${library}) - elseif(IS_ABSOLUTE ${library}) - list(APPEND image_geometry_LIBRARIES ${library}) - else() - set(lib_path "") - set(lib "${library}-NOTFOUND") - # since the path where the library is found is returned we have to iterate over the paths manually - foreach(path /opt/ros/indigo/lib;/opt/ros/indigo/lib) - find_library(lib ${library} - PATHS ${path} - NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) - if(lib) - set(lib_path ${path}) - break() - endif() - endforeach() - if(lib) - _list_append_unique(image_geometry_LIBRARY_DIRS ${lib_path}) - list(APPEND image_geometry_LIBRARIES ${lib}) - else() - # as a fall back for non-catkin libraries try to search globally - find_library(lib ${library}) - if(NOT lib) - message(FATAL_ERROR "Project '${PROJECT_NAME}' tried to find library '${library}'. The library is neither a target nor built/installed properly. Did you compile project 'image_geometry'? Did you find_package() it before the subdirectory containing its code is included?") - endif() - list(APPEND image_geometry_LIBRARIES ${lib}) - endif() - endif() -endforeach() - -set(image_geometry_EXPORTED_TARGETS "") -# create dummy targets for exported code generation targets to make life of users easier -foreach(t ${image_geometry_EXPORTED_TARGETS}) - if(NOT TARGET ${t}) - add_custom_target(${t}) - endif() -endforeach() - -set(depends "sensor_msgs") -foreach(depend ${depends}) - string(REPLACE " " ";" depend_list ${depend}) - # the package name of the dependency must be kept in a unique variable so that it is not overwritten in recursive calls - list(GET depend_list 0 image_geometry_dep) - list(LENGTH depend_list count) - if(${count} EQUAL 1) - # simple dependencies must only be find_package()-ed once - if(NOT ${image_geometry_dep}_FOUND) - find_package(${image_geometry_dep} REQUIRED) - endif() - else() - # dependencies with components must be find_package()-ed again - list(REMOVE_AT depend_list 0) - find_package(${image_geometry_dep} REQUIRED ${depend_list}) - endif() - _list_append_unique(image_geometry_INCLUDE_DIRS ${${image_geometry_dep}_INCLUDE_DIRS}) - - # merge build configuration keywords with library names to correctly deduplicate - _pack_libraries_with_build_configuration(image_geometry_LIBRARIES ${image_geometry_LIBRARIES}) - _pack_libraries_with_build_configuration(_libraries ${${image_geometry_dep}_LIBRARIES}) - _list_append_deduplicate(image_geometry_LIBRARIES ${_libraries}) - # undo build configuration keyword merging after deduplication - _unpack_libraries_with_build_configuration(image_geometry_LIBRARIES ${image_geometry_LIBRARIES}) - - _list_append_unique(image_geometry_LIBRARY_DIRS ${${image_geometry_dep}_LIBRARY_DIRS}) - list(APPEND image_geometry_EXPORTED_TARGETS ${${image_geometry_dep}_EXPORTED_TARGETS}) -endforeach() - -set(pkg_cfg_extras "") -foreach(extra ${pkg_cfg_extras}) - if(NOT IS_ABSOLUTE ${extra}) - set(extra ${image_geometry_DIR}/${extra}) - endif() - include(${extra}) -endforeach() diff --git a/ROS Packages/roscuda_img_filter/CMakeLists.txt~ b/ROS Packages/roscuda_img_filter/CMakeLists.txt~ deleted file mode 100644 index 85a67f7..0000000 --- a/ROS Packages/roscuda_img_filter/CMakeLists.txt~ +++ /dev/null @@ -1,210 +0,0 @@ -cmake_minimum_required(VERSION 2.8.3) -project(roscuda_img_filter) - -## Compile as C++11, supported in ROS Kinetic and newer -# add_compile_options(-std=c++11) - -## 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 - cv_bridge - image_transport - roscpp - sensor_msgs - std_msgs -) - -find_package(CUDA REQUIRED) -## 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, services and actions ## -################################################ - -## To declare and build messages, services or actions from within this -## package, follow these steps: -## * Let MSG_DEP_SET be the set of packages whose message types you use in -## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). -## * In the file package.xml: -## * add a build_depend tag for "message_generation" -## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET -## * If MSG_DEP_SET isn't empty the following dependency has been pulled in -## but can be declared for certainty nonetheless: -## * add a run_depend tag for "message_runtime" -## * In this file (CMakeLists.txt): -## * add "message_generation" and every package in MSG_DEP_SET to -## find_package(catkin REQUIRED COMPONENTS ...) -## * add "message_runtime" and every package in MSG_DEP_SET to -## catkin_package(CATKIN_DEPENDS ...) -## * uncomment the add_*_files sections below as needed -## and list every .msg/.srv/.action file to be processed -## * uncomment the generate_messages entry below -## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) - -## Generate messages in the 'msg' folder -# add_message_files( -# FILES -# Message1.msg -# Message2.msg -# ) - -## Generate services in the 'srv' folder -# add_service_files( -# FILES -# Service1.srv -# Service2.srv -# ) - -## Generate actions in the 'action' folder -# add_action_files( -# FILES -# Action1.action -# Action2.action -# ) - -## Generate added messages and services with any dependencies listed here -# generate_messages( -# DEPENDENCIES -# sensor_msgs# std_msgs -# ) - -################################################ -## Declare ROS dynamic reconfigure parameters ## -################################################ - -## To declare and build dynamic reconfigure parameters within this -## package, follow these steps: -## * In the file package.xml: -## * add a build_depend and a run_depend tag for "dynamic_reconfigure" -## * In this file (CMakeLists.txt): -## * add "dynamic_reconfigure" to -## find_package(catkin REQUIRED COMPONENTS ...) -## * uncomment the "generate_dynamic_reconfigure_options" section below -## and list every .cfg file to be processed - -## Generate dynamic reconfigure parameters in the 'cfg' folder -# generate_dynamic_reconfigure_options( -# cfg/DynReconf1.cfg -# cfg/DynReconf2.cfg -# ) - -################################### -## 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 roscuda_img_filter -# CATKIN_DEPENDS cv_bridge image_transport roscpp sensor_msgs std_msgs -# DEPENDS system_lib -) - -########### -## Build ## -########### - -## Specify additional locations of header files -## Your package locations should be listed before other locations -include_directories( -# include - ${catkin_INCLUDE_DIRS} -) - -set(CUDA_NVCC_FLAGS "-arch=compute_30" CACHE STRING "nvcc flags" FORCE) -set(CUDA_VERBOSE_BUILD ON CACHE BOOL "nvcc verbose" FORCE) -set(LIB_TYPE STATIC) -cuda_add_library(CUDAopencvLib ${LIB_TYPE} src/test.cu) -## Declare a C++ library -# add_library(${PROJECT_NAME} -# src/${PROJECT_NAME}/roscuda_img_filter.cpp -# ) - -## Add cmake target dependencies of the library -## as an example, code may need to be generated before libraries -## either from message generation or dynamic reconfigure -# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) - -## Declare a C++ executable -## With catkin_make all packages are built within a single CMake context -## The recommended prefix ensures that target names across packages don't collide -# add_executable(${PROJECT_NAME}_node src/roscuda_img_filter_node.cpp) -add_executable(roscuda_img_filter_node src/main.cpp) -## Rename C++ executable without prefix -## The above recommended prefix causes long target names, the following renames the -## target back to the shorter version for ease of user use -## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node" -# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "") - -## Add cmake target dependencies of the executable -## same as for the library above -# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) -add_dependencies(roscuda_img_filter_node CUDAopencvLib) -## Specify libraries to link a library or executable target against -# target_link_libraries(${PROJECT_NAME}_node -# ${catkin_LIBRARIES} -# ) -TARGET_LINK_LIBRARIES(roscuda_img_filter_node -${catkin_LIBRARIES} -CUDAopencvLib -) - -############# -## Install ## -############# - -# all install targets should use catkin DESTINATION variables -# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html - -## Mark executable scripts (Python etc.) for installation -## in contrast to setup.py, you can choose the destination -# install(PROGRAMS -# scripts/my_python_script -# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} -# ) - -## Mark executables and/or libraries for installation -# install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_node -# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} -# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} -# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} -# ) - -## Mark cpp header files for installation -# install(DIRECTORY include/${PROJECT_NAME}/ -# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} -# FILES_MATCHING PATTERN "*.h" -# PATTERN ".svn" EXCLUDE -# ) - -## Mark other files for installation (e.g. launch and bag files, etc.) -# install(FILES -# # myfile1 -# # myfile2 -# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} -# ) - -############# -## Testing ## -############# - -## Add gtest based cpp test target and link libraries -# catkin_add_gtest(${PROJECT_NAME}-test test/test_roscuda_img_filter.cpp) -# if(TARGET ${PROJECT_NAME}-test) -# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) -# endif() - -## Add folders to be run by python nosetests -# catkin_add_nosetests(test) diff --git a/ROS Packages/roscuda_img_filter/opencvtest.launch~ b/ROS Packages/roscuda_img_filter/opencvtest.launch~ deleted file mode 100644 index 9b88a28..0000000 --- a/ROS Packages/roscuda_img_filter/opencvtest.launch~ +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/ROS Packages/roscuda_img_filter/package.xml~ b/ROS Packages/roscuda_img_filter/package.xml~ deleted file mode 100644 index b6c71f6..0000000 --- a/ROS Packages/roscuda_img_filter/package.xml~ +++ /dev/null @@ -1,61 +0,0 @@ - - - opencvtest - 0.0.0 - The opencvtest package - - - - - nicolas - - - - - - TODO - - - - - - - - - - - - - - - - - - - - - - - - - - catkin - cv_bridge - image_transport - roscpp - sensor_msgs - std_msgs - cv_bridge - image_transport - roscpp - cuda - sensor_msgs - std_msgs - - - - - - - - diff --git a/ROS Packages/roscuda_img_filter/roscuda_img_filter.launch~ b/ROS Packages/roscuda_img_filter/roscuda_img_filter.launch~ deleted file mode 100644 index be40963..0000000 --- a/ROS Packages/roscuda_img_filter/roscuda_img_filter.launch~ +++ /dev/null @@ -1,5 +0,0 @@ - - - - - From 62516d7a7dc2af04ea50bf892db80db53003c164 Mon Sep 17 00:00:00 2001 From: Hanzhe Teng Date: Tue, 10 Dec 2019 22:42:15 -0800 Subject: [PATCH 2/2] fix bug THREADS_PER_BLOCK not defined --- ROS Packages/roscuda_vectoradd/src/main.cpp | 1 + ROS Packages/roscuda_vectoradd/src/vectoradd.cu | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ROS Packages/roscuda_vectoradd/src/main.cpp b/ROS Packages/roscuda_vectoradd/src/main.cpp index af2a390..bf94d88 100644 --- a/ROS Packages/roscuda_vectoradd/src/main.cpp +++ b/ROS Packages/roscuda_vectoradd/src/main.cpp @@ -4,6 +4,7 @@ #include "std_msgs/Float32.h" #define N (1024*1024) +#define THREADS_PER_BLOCK 512 int *testmain(int num, int threads); int size=10; diff --git a/ROS Packages/roscuda_vectoradd/src/vectoradd.cu b/ROS Packages/roscuda_vectoradd/src/vectoradd.cu index 870ceab..927d8e8 100644 --- a/ROS Packages/roscuda_vectoradd/src/vectoradd.cu +++ b/ROS Packages/roscuda_vectoradd/src/vectoradd.cu @@ -20,7 +20,7 @@ void random_ints(int *i, int size) } } -int *testmain(int num) +int *testmain(int num, int threads) { int *in1, *in2, *out; // host copies of inputs and output int *d_in1, *d_in2, *d_out; // device copies of inputs and output @@ -41,7 +41,7 @@ int *testmain(int num) cudaMemcpy(d_in2, in2, size, cudaMemcpyHostToDevice); // Launch add() kernel on GPU - add<<>>(d_in1, d_in2, d_out); + add<<>>(d_in1, d_in2, d_out); // Wait for the GPU to finish cudaDeviceSynchronize(); // Copy result back to host