Robotics StackExchange | Archived questions

Why can't catkin_make find my existing packages?

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:

    librealsenseConfig.cmake
    librealsense-config.cmake

  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

and

$ 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?

Asked by jacksonkr_ on 2016-10-21 11:12:46 UTC

Comments

Answers

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.

Asked by jacksonkr_ on 2016-10-21 11:17:32 UTC

Comments

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

Asked by ahendrix on 2016-10-21 11:52:55 UTC

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

Asked by jarvisschultz on 2016-10-21 16:37:43 UTC