Why can't catkin_make find a config file?

asked 2020-11-14 12:29:08 -0500

DariusAvalon gravatar image

I have cloned the rplidar_ros package into the src folder of a catkin workspace. When I run the catkin_make command in that workspace I get the following error:

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

sensor_msgsConfig.cmake
sensor_msgs-config.cmake

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

I have confirmed that the sensor_msgs package is installed on my system using the command rospack find sensor_msgs which yields:

/opt/ros/noetic/share/common_msgs/sensor_msgs

The sensor_msgs folder does not contain either of the cmake files mentioned in the error message, however it does provide a CMakeLists.txt file. I am unfamiliar with CMake; should the package ship with these cmake files or is this due to a failure on my part to build them?

Any guidance would be appreciated. Thank you.

Running ROS Noetic on Ubuntu 20.04.

edit retag flag offensive close merge delete