0
$\begingroup$

Rosanswers logo

I created my catkin package like so:

 catkin_create_pkg dcp_processing sensor_msgs cv_bridge roscpp std_msgs image_transport

I don't edit anything, then I compile the package:

catkin_make

I get that error the cv_bridge is missing. I didn't add or edit anything in the package so everything is by default as it is created with catkin_create_pkg.

I'm using Ubuntu 16.04 Kinetic ROS Distribution.

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

    cv_bridgeConfig.cmake
    cv_bridge-config.cmake

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


-- Could not find the required component 'cv_bridge'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found. CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):   Could not find a package configuration file provided by "cv_bridge" with   any of the following names:

    cv_bridgeConfig.cmake
    cv_bridge-config.cmake

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


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

Originally posted by ROSkinect on ROS Answers with karma: 751 on 2017-10-03

Post score: 0


Original comments

Comment by gvdhoorn on 2017-10-03:\

I get that error the cv_bridge is missing.

well, is it? Do you have ros-kinetic-cv-bridge installed? What is the output of rospack find cv_bridge?

Adding it to your package as a dependency does not automatigically make it available.

Comment by ROSkinect on 2017-10-03:
Yes I know but I did install ros full version so as I don't miss any package. I get [rospack] Error: package 'cv_bridge' not found

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Yes I know but I did install ros full version so as I don't miss any package.

Installing ros-$distro-desktop-full does not result in all packages getting installed. The various metapackages provide you with a convenient way to install a select set of them, but definitely not all. See REP-142: ROS Indigo and Newer Metapackages - Desktop variants.

I get

[rospack] Error: package 'cv_bridge' not found

That would seem to indicate that cv_bridge is not installed on your machine. Check with dpkg -l | grep cv-bridge. If that also doesn't result in cv_bridge being found, then install it with (on Ubuntu):

sudo apt-get install ros-kinetic-cv-bridge

and try again.


Edit: cv_bridge should be installed as part of vision_opencv which is (through perception) part of desktop_full, so not having cv_bridge would be strange if you did in fact install desktop_full.


Originally posted by gvdhoorn with karma: 86574 on 2017-10-03

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by ROSkinect on 2017-10-03:
dpkg -l | grep cv-bridge doesn't result anything so it is not installed. I just installed it and it works. Thanks! I want to know why it didn't get installed the first time when I installed ROS? usually I don't need to installed cv_bridge separately.

Comment by gvdhoorn on 2017-10-03:
I don't know why it didn't get installed. What is the output of dpkg -l | grep desktop-full?

Comment by ROSkinect on 2017-10-03:
It doesn't show anything just like with dpkg -l | grep cv-bridge

Comment by gvdhoorn on 2017-10-03:
Then I guess you didn't "install ros full version" as you claimed earlier. Only ros-kinetic-desktop-full would install cv_bridge automatically.

Comment by ROSkinect on 2017-10-03:
I just checked with this: grep ros-kinetic ~/.bash_history I found that I launched sudo apt-get install ros-kinetic-desktop-full

Comment by gvdhoorn on 2017-10-03:
According to everything I can find and verify desktop_full should install cv_bridge, so I'm not sure what happened.

You could see whether /var/log/apt/history.log or /var/log/apt/term.log contains anything that can shed some light.

Comment by Sam123 on 2022-03-10:
hi @gvdhoorn

I'm getting same error Could not find a package configuration file provided by "cv_bridge" with any of the following names cv_bridgeConfig.cmake cv_bridge-config.cmake

i am working with ROS2 foxy ,18.04.1-Ubuntu on AWS ec2 server. after using this command $ dpkg -l | grep cv-bridge output shows:ii libcv-bridge1d:amd64 1.12.3+ds-2 amd64 cv_bridge Robot OS package ii python-cv-bridge 1.12.3+ds-2 amd64 cv_bridge ROS package - Python bindings

when i use this command $ dpkg -l | grep desktop-full it shows nothing.

$\endgroup$

Your Answer

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