ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Vincent Rabaud helped me through this issue via Email:

Ok, so vision_opencv is a stack so you cannot depend on it/find_package it: you have to depend/find_package any of its packages (cv_bridge ...).

opencv2 is not a ROS package so you cannot find_package it through catkin. You need to find_package it as any user would do: find_package(OpenCV). I'll update the wiki for that.

So now in my package.xml I have:

  <build_depend>image_geometry</build_depend>
  <build_depend>cv_bridge</build_depend>
  <build_depend>OpenCV</build_depend>

And in my CMakeLists.txt:

find_package(catkin REQUIRED COMPONENTS cv_bridge image_geometry ...)
...
find_package(OpenCV REQUIRED)
...
add_executable(calibrate_kinect_checkerboard
  src/detect_calibration_pattern.cpp
  src/calibrate_kinect_checkerboard.cpp
  )
target_link_libraries(calibrate_kinect_checkerboard ${catkin_LIBRARIES} ${OpenCV_LIBS})