0
$\begingroup$

Rosanswers logo

i went to ~/catkin_ws(my workspace) and then to src folder and created my package with the command

catkin_create_pkg face sensor_msgs opencv2 cv_bridge rospy std_msgs

The package was successfully created.Then i went to catkin_ws and executed the command

catkin_make

it showed an error

CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package): Could not find a package configuration file provided by "opencv2" with any of the following names:

opencv2Config.cmake
opencv2-config.cmake

Add the installation prefix of "opencv2" to CMAKE_PREFIX_PATH or set "opencv2_DIR" to a directory containing one of the above files. If "opencv2" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): face/CMakeLists.txt:10 (find_package)

-- Configuring incomplete, errors occurred! See also "/home/hari/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/hari/catkin_ws/build/CMakeFiles/CMakeError.log". Makefile:738: recipe for target 'cmake_check_build_system' failed make: *** [cmake_check_build_system] Error 1 Invoking "make cmake_check_build_system" failed


Originally posted by HHG on ROS Answers with karma: 1 on 2017-06-28

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Well, it could not detect OpenCV2 package in ROS Kinetic version because kinetic has an OpenCV3 package in their Debain package as default.

First of all, you need to install (if you haven't install opencv before)

sudo apt-get install ros-kinetic-opencv3

Secondly, change the dependency to opencv3 from opencv2 in that concerned package and then catkin_make.

Hope it helps!


Originally posted by vignesh with karma: 101 on 2017-06-30

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.