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

Why can't catkin_make find my existing packages?

asked 2016-10-21 11:12:46 -0600

jacksonkr_ gravatar image

When running $ catkin_make I receive the following error:

 CMake Error at /usr/share/catkin/cmake/catkinConfig.cmake:75 (find_package):
  Could not find a package configuration file provided by "librealsense" with
  any of the following names:


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

Normally this means the dependency is missing but check this out:

$ rosdep install --from-path src
#All required rosdeps installed successfully


$ sudo apt-get install ros-kinetic-librealsense 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ros-kinetic-librealsense is already the newest version (1.11.0-0xenial-20161003-141254-0700).
0 upgraded, 0 newly installed, 0 to remove and 321 not upgraded.

And if I look inside /opt/ros/kinetic/share I can see the librealsense package there. The librealsenseConfig.cmake exists inside of the ./cmake folder there.

Why isn't find_package able to find this package?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-10-21 11:17:32 -0600

jacksonkr_ gravatar image
source ~/catkin_ws/devel/setup.bash
source /opt/ros/kinetic/setup.bash

Are in my ~/.bashrc but I had to manually run the second again before packages were picked up. Not exactly sure why but it must have something to do with the packages not being found after install until the environments are resourced.

edit flag offensive delete link more



sourcing a setup.bash overrides the previous setup.bash, so whichever one you source last is the workspace that you're using.

ahendrix gravatar image ahendrix  ( 2016-10-21 11:52:55 -0600 )edit

Check out the "Efficiency Considerations" section of the rospack docs. My guess is that the cache just hadn't been re-built. Even though it doesn't explicitly say this in the docs, I find that rospack profile seems to force a rebuild

jarvisschultz gravatar image jarvisschultz  ( 2016-10-21 16:37:43 -0600 )edit

Question Tools

1 follower


Asked: 2016-10-21 11:12:46 -0600

Seen: 3,346 times

Last updated: Oct 21 '16