From 696e05424f1993e176b6e2cecb841afd049224c5 Mon Sep 17 00:00:00 2001 From: Vincent Rabaud Date: Mon, 1 Oct 2012 19:23:47 +0200 Subject: [PATCH] fix dependencies and dynamic_reconfigure --- camera_calibration/CMakeLists.txt | 8 ++----- camera_calibration/package.xml | 8 +++---- camera_calibration/setup.py | 10 ++++++++ depth_image_proc/CMakeLists.txt | 4 +++- depth_image_proc/package.xml | 2 +- image_proc/CMakeLists.txt | 23 +++++++++++------- image_proc/cfg/CropDecimate.cfg | 3 +-- image_proc/cfg/Debayer.cfg | 3 +-- image_proc/cfg/Rectify.cfg | 3 +-- image_proc/package.xml | 4 +++- image_rotate/CMakeLists.txt | 17 +++++++++----- image_rotate/cfg/ImageRotate.cfg | 3 +-- image_rotate/package.xml | 4 +++- image_view/CMakeLists.txt | 36 ++++++++++------------------- image_view/package.xml | 4 +++- stereo_image_proc/CMakeLists.txt | 9 +++++--- stereo_image_proc/cfg/Disparity.cfg | 3 +-- stereo_image_proc/package.xml | 1 - 18 files changed, 78 insertions(+), 67 deletions(-) create mode 100644 camera_calibration/setup.py diff --git a/camera_calibration/CMakeLists.txt b/camera_calibration/CMakeLists.txt index 69d2dda1f..29628bbd2 100644 --- a/camera_calibration/CMakeLists.txt +++ b/camera_calibration/CMakeLists.txt @@ -11,14 +11,10 @@ catkin_add_nosetests(test/directed.py) catkin_add_nosetests(test/testapproxsync.py) # Tests simple calibration dataset -if (FALSE) -rosbuild_download_test_data(http://pr.willowgarage.com/data/camera_calibration/camera_calibration.tar.gz camera_calibration.tar.gz 6da43ea314640a4c15dd7a90cbc3aee0) -endif() +download_test_data(http://pr.willowgarage.com/data/camera_calibration/camera_calibration.tar.gz camera_calibration.tar.gz 6da43ea314640a4c15dd7a90cbc3aee0) # Tests multiple checkerboards -if (FALSE) -rosbuild_download_test_data(http://pr.willowgarage.com/data/camera_calibration/multi_board_calibration.tar.gz multi_board_calibration.tar.gz ddc0f69582d140e33f9d3bfb681956bb) -endif() +download_test_data(http://pr.willowgarage.com/data/camera_calibration/multi_board_calibration.tar.gz multi_board_calibration.tar.gz ddc0f69582d140e33f9d3bfb681956bb) catkin_add_nosetests(test/multiple_boards.py) diff --git a/camera_calibration/package.xml b/camera_calibration/package.xml index ce8909373..739d93da2 100644 --- a/camera_calibration/package.xml +++ b/camera_calibration/package.xml @@ -11,10 +11,10 @@ Patrick Mihelich Vincent Rabaud - image_geometry<_run_depend> - opencv2<_run_depend> - rospy<_run_depend> - sensor_msgs<_run_depend> + image_geometry + opencv2 + rospy + sensor_msgs BSD http://www.ros.org/wiki/camera_calibration diff --git a/camera_calibration/setup.py b/camera_calibration/setup.py new file mode 100644 index 000000000..769e87c48 --- /dev/null +++ b/camera_calibration/setup.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +from distutils.core import setup +from catkin_pkg.package import parse_package_for_distutils + +d = parse_package_for_distutils() +d['packages'] = ['camera_calibration'] +d['package_dir'] = {'':'src'} +) + +setup(**d) diff --git a/depth_image_proc/CMakeLists.txt b/depth_image_proc/CMakeLists.txt index f37b42b38..52be1edc7 100644 --- a/depth_image_proc/CMakeLists.txt +++ b/depth_image_proc/CMakeLists.txt @@ -5,11 +5,13 @@ find_package(catkin REQUIRED) catkin_package(LIBRARIES ${PROJECT_NAME}) find_package(Boost REQUIRED) +find_package(catkin REQUIRED cv_bridge image_geometry image_transport message_filters nodelet pcl_ros sensor_msgs stereo_msgs tf) find_package(Eigen REQUIRED) -find_package(catkin REQUIRED cv_bridge image_geometry image_transport message_filters nodelet_core pcl pcl_ros sensor_msgs stereo_msgs tf) +find_package(PCL) include_directories(SYSTEM ${BOOST_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} + ${PCL_INCLUDE_DIRS} ) add_library(${PROJECT_NAME} src/nodelets/convert_metric.cpp src/nodelets/disparity.cpp diff --git a/depth_image_proc/package.xml b/depth_image_proc/package.xml index 4b4d7a713..2bd0e634c 100644 --- a/depth_image_proc/package.xml +++ b/depth_image_proc/package.xml @@ -24,7 +24,7 @@ image_geometry image_transport message_filters - nodelet_core + nodelet pcl pcl_ros sensor_msgs diff --git a/image_proc/CMakeLists.txt b/image_proc/CMakeLists.txt index 067f8578f..f2acee04c 100644 --- a/image_proc/CMakeLists.txt +++ b/image_proc/CMakeLists.txt @@ -2,18 +2,22 @@ cmake_minimum_required(VERSION 2.8) project(image_proc) find_package(catkin REQUIRED) -catkin_package() -find_package(catkin REQUIRED image_geometry) -include_directories(SYSTEM ${image_geometry_INCLUDE_DIRS}) +find_package(catkin REQUIRED cv_bridge dynamic_reconfigure image_geometry image_transport nodelet roscpp sensor_msgs) +find_package(OpenCV REQUIRED) +catkin_package(DEPENDS image_geometry OpenCV roscpp sensor_msgs + INCLUDE_DIRS include + LIBRARIES ${PROJECT_NAME} +) + +include_directories(SYSTEM ${catkin_INCLUDE_DIRS}) include_directories(include) # Dynamic reconfigure support -find_package(catkin REQUIRED dynamic_reconfigure) -gencfg() +generate_cfg(cfg/CropDecimate.cfg cfg/Debayer.cfg cfg/Rectify.cfg) # Nodelet library -add_library(image_proc src/libimage_proc/processor.cpp +add_library(${PROJECT_NAME} src/libimage_proc/processor.cpp src/nodelets/debayer.cpp src/nodelets/rectify.cpp src/nodelets/crop_decimate.cpp @@ -21,7 +25,10 @@ add_library(image_proc src/libimage_proc/processor.cpp src/nodelets/edge_aware.cpp src/nodelets/yuv422.cpp ) -install(TARGETS image_proc +add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_gencfg) +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES}) + +install(TARGETS ${PROJECT_NAME} DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} ) install(DIRECTORY include/${PROJECT_NAME}/ @@ -30,7 +37,7 @@ install(DIRECTORY include/${PROJECT_NAME}/ # Standalone node add_executable(image_proc_exe src/nodes/image_proc.cpp) -target_link_libraries(image_proc_exe image_proc) +target_link_libraries(image_proc_exe ${PROJECT_NAME}) SET_TARGET_PROPERTIES(image_proc_exe PROPERTIES OUTPUT_NAME image_proc) install(TARGETS image_proc_exe DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} diff --git a/image_proc/cfg/CropDecimate.cfg b/image_proc/cfg/CropDecimate.cfg index 82f5bf480..e00ff7578 100755 --- a/image_proc/cfg/CropDecimate.cfg +++ b/image_proc/cfg/CropDecimate.cfg @@ -1,9 +1,8 @@ #! /usr/bin/env python PACKAGE='image_proc' -import roslib; roslib.load_manifest(PACKAGE) -from dynamic_reconfigure.parameter_generator import * +from dynamic_reconfigure.parameter_generator_catkin import * gen = ParameterGenerator() diff --git a/image_proc/cfg/Debayer.cfg b/image_proc/cfg/Debayer.cfg index 03608e3c6..b5bc6d9aa 100755 --- a/image_proc/cfg/Debayer.cfg +++ b/image_proc/cfg/Debayer.cfg @@ -1,9 +1,8 @@ #! /usr/bin/env python PACKAGE='image_proc' -import roslib; roslib.load_manifest(PACKAGE) -from dynamic_reconfigure.parameter_generator import * +from dynamic_reconfigure.parameter_generator_catkin import * gen = ParameterGenerator() diff --git a/image_proc/cfg/Rectify.cfg b/image_proc/cfg/Rectify.cfg index 1a4e4f7a1..c264cd291 100755 --- a/image_proc/cfg/Rectify.cfg +++ b/image_proc/cfg/Rectify.cfg @@ -1,9 +1,8 @@ #! /usr/bin/env python PACKAGE='image_proc' -import roslib; roslib.load_manifest(PACKAGE) -from dynamic_reconfigure.parameter_generator import * +from dynamic_reconfigure.parameter_generator_catkin import * gen = ParameterGenerator() diff --git a/image_proc/package.xml b/image_proc/package.xml index 5088904f9..c2a6d775b 100644 --- a/image_proc/package.xml +++ b/image_proc/package.xml @@ -17,15 +17,17 @@ cv_bridge dynamic_reconfigure image_geometry - image_proc image_transport nodelet opencv2 + roscpp sensor_msgs + cv_bridge dynamic_reconfigure image_geometry nodelet opencv2 + roscpp sensor_msgs diff --git a/image_rotate/CMakeLists.txt b/image_rotate/CMakeLists.txt index 8cb864e6e..587aa3a25 100644 --- a/image_rotate/CMakeLists.txt +++ b/image_rotate/CMakeLists.txt @@ -4,17 +4,22 @@ project(image_rotate) find_package(catkin REQUIRED) catkin_package() -find_package(catkin REQUIRED dynamic_reconfigure tf) -gencfg() - find_package(OpenCV REQUIRED) +find_package(catkin REQUIRED cv_bridge dynamic_reconfigure image_transport tf) + +# generate the dynamic_reconfigure config file +generate_cfg(cfg/ImageRotate.cfg) -include_directories(SYSTEM ${OpenCV_INCLUDE_DIRS} - ${tf_INCLUDE_DIRS} +# add the executable +include_directories(SYSTEM ${catkin_INCLUDE_DIRS} + ${OpenCV_INCLUDE_DIRS} ) add_executable(${PROJECT_NAME} src/node/image_rotate.cpp) -target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBRARIES}) +add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_gencfg) +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} + ${OpenCV_LIBRARIES} +) install(TARGETS ${PROJECT_NAME} DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} ) diff --git a/image_rotate/cfg/ImageRotate.cfg b/image_rotate/cfg/ImageRotate.cfg index 17afd9260..892b23185 100755 --- a/image_rotate/cfg/ImageRotate.cfg +++ b/image_rotate/cfg/ImageRotate.cfg @@ -33,9 +33,8 @@ PACKAGE='image_rotate' -import roslib; roslib.load_manifest(PACKAGE) -from dynamic_reconfigure.parameter_generator import * +from dynamic_reconfigure.parameter_generator_catkin import * gen = ParameterGenerator() gen.add("target_frame_id", str_t, 0, "Frame in which the target vector is specified. Empty means the input frame.", "base_link") diff --git a/image_rotate/package.xml b/image_rotate/package.xml index 9ac63f0cd..ebc2054ad 100644 --- a/image_rotate/package.xml +++ b/image_rotate/package.xml @@ -33,7 +33,9 @@ opencv2 tf + cv_bridge dynamic_reconfigure - tf + image_transport opencv2 + tf diff --git a/image_view/CMakeLists.txt b/image_view/CMakeLists.txt index 78a1b09bb..e0e79090c 100644 --- a/image_view/CMakeLists.txt +++ b/image_view/CMakeLists.txt @@ -7,20 +7,19 @@ catkin_package() find_package(Boost COMPONENTS signals) find_package(GTK2) find_package(OpenCV) -find_package(catkin REQUIRED camera_calibration_parsers cv_bridge image_transport message_filters rosconsole roscpp) +find_package(catkin REQUIRED camera_calibration_parsers cv_bridge image_transport message_filters nodelet rosconsole roscpp) include_directories(SYSTEM ${Boost_INCLUDE_DIRS} - ${camera_calibration_parsers_INCLUDE_DIRS} - ${cv_bridge_INCLUDE_DIRS} + ${catkin_INCLUDE_DIRS} ${GTK2_INCLUDE_DIRS} - ${image_transport_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} ) add_definitions(-DHAVE_GTK) # Nodelet library -rosbuild_add_library(image_view src/nodelets/image_nodelet.cpp src/nodelets/disparity_nodelet.cpp src/nodelets/window_thread.cpp) -target_link_libraries(image_view ${GTK_LIBRARIES} +add_library(image_view src/nodelets/image_nodelet.cpp src/nodelets/disparity_nodelet.cpp src/nodelets/window_thread.cpp) +target_link_libraries(image_view ${catkin_LIBRARIES} + ${GTK_LIBRARIES} ${OpenCV_LIBRARIES} ) install(TARGETS image_view @@ -30,43 +29,32 @@ install(TARGETS image_view # Image viewers add_executable(image_view_exe src/nodes/image_view.cpp) SET_TARGET_PROPERTIES(image_view_exe PROPERTIES OUTPUT_NAME image_view) -target_link_libraries(image_view_exe - ${OpenCV_LIBRARIES} +target_link_libraries(image_view_exe ${catkin_LIBRARIES} + ${OpenCV_LIBRARIES} ) add_executable(disparity_view src/nodes/disparity_view.cpp) -target_link_libraries(disparity_view - ${OpenCV_LIBRARIES} +target_link_libraries(disparity_view ${catkin_LIBRARIES} + ${OpenCV_LIBRARIES} ) add_executable(stereo_view src/nodes/stereo_view.cpp) target_link_libraries(stereo_view ${Boost_LIBRARIES} - ${cv_bridge_LIBRARIES} + ${catkin_LIBRARIES} ${GTK_LIBRARIES} - ${image_transport_LIBRARIES} - ${message_filters_LIBRARIES} ${OpenCV_LIBRARIES} - ${rosconsole_LIBRARIES} - ${roscpp_LIBRARIES} ) # Extra tools add_executable(extract_images src/nodes/extract_images.cpp) -target_link_libraries(extract_images ${cv_bridge_LIBRARIES} - ${image_transport_LIBRARIES} +target_link_libraries(extract_images ${catkin_LIBRARIES} ${OpenCV_LIBRARIES} - ${rosconsole_LIBRARIES} - ${roscpp_LIBRARIES} ) add_executable(image_saver src/nodes/image_saver.cpp) -target_link_libraries(image_saver ${camera_calibration_parsers_LIBRARIES} - ${cv_bridge_LIBRARIES} - ${image_transport_LIBRARIES} +target_link_libraries(image_saver ${catkin_LIBRARIES} ${OpenCV_LIBRARIES} - ${rosconsole_LIBRARIES} - ${roscpp_LIBRARIES} ) install(TARGETS disparity_view extract_images image_saver image_view_exe stereo_view diff --git a/image_view/package.xml b/image_view/package.xml index 7b5b38384..f04002dc1 100644 --- a/image_view/package.xml +++ b/image_view/package.xml @@ -6,7 +6,7 @@ for stereo + disparity images. Patrick Mihelich - Patrick Mihelich + Vincent Rabaud BSD http://www.ros.org/wiki/image_view @@ -18,6 +18,7 @@ cv_bridge image_transport message_filters + nodelet opencv2 rosconsole roscpp @@ -27,6 +28,7 @@ cv_bridge image_transport message_filters + nodelet opencv2 rosconsole roscpp diff --git a/stereo_image_proc/CMakeLists.txt b/stereo_image_proc/CMakeLists.txt index 4d8c09ed2..af3429e77 100644 --- a/stereo_image_proc/CMakeLists.txt +++ b/stereo_image_proc/CMakeLists.txt @@ -8,9 +8,9 @@ include_directories(include) # Dynamic reconfigure support find_package(catkin REQUIRED dynamic_reconfigure) -gencfg() +generate_cfg(cfg/Disparity.cfg) -find_package(catkin REQUIRED dynamic_reconfigure image_geometry image_proc image_transport message_filters nodelet sensor_msgs stereo_image_proc stereo_msgs) +find_package(catkin REQUIRED dynamic_reconfigure image_geometry image_proc image_transport message_filters nodelet sensor_msgs stereo_msgs) find_package(OpenCV REQUIRED) include_directories(SYSTEM ${catkin_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} @@ -18,7 +18,10 @@ include_directories(SYSTEM ${catkin_INCLUDE_DIRS} # Nodelet library add_library(${PROJECT_NAME} src/libstereo_image_proc/processor.cpp src/nodelets/disparity.cpp src/nodelets/point_cloud2.cpp src/nodelets/point_cloud.cpp) -target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBRARIES}) +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} + ${OpenCV_LIBRARIES} +) +add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_gencfg) install(TARGETS ${PROJECT_NAME} DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} ) diff --git a/stereo_image_proc/cfg/Disparity.cfg b/stereo_image_proc/cfg/Disparity.cfg index 69ab30646..d73524122 100755 --- a/stereo_image_proc/cfg/Disparity.cfg +++ b/stereo_image_proc/cfg/Disparity.cfg @@ -3,9 +3,8 @@ # Declare parameters that control stereo processing PACKAGE='stereo_image_proc' -import roslib; roslib.load_manifest(PACKAGE) -from dynamic_reconfigure.parameter_generator import * +from dynamic_reconfigure.parameter_generator_catkin import * gen = ParameterGenerator() diff --git a/stereo_image_proc/package.xml b/stereo_image_proc/package.xml index 72db73182..f9b4b26c9 100644 --- a/stereo_image_proc/package.xml +++ b/stereo_image_proc/package.xml @@ -21,7 +21,6 @@ nodelet opencv2 sensor_msgs - stereo_image_proc stereo_msgs dynamic_reconfigure