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

catkin_make with common_msgs as a dependency

asked 2016-12-07 10:00:30 -0500

copyat300 gravatar image

I want to use some of the common_msgs in a ROS node I'm working on so used catkin_create_pkg with common_msgs as a dependency (Similar to what is done in the simple publisher subscriber with std_msgs)

I get the following error when running catkin_make

-- Could not find the required component 'common_msgs'. 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/indigo/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "common_msgs" with
  any of the following names:

    common_msgsConfig.cmake
    common_msgs-config.cmake

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

I made sure common_msgs is installed and used roscd to enter it. It only contains a package.xml file.

Here's the package I'm working on https://github.com/iscumd/ZenithObstacleDetector

I've commented out the find common_msgs so it builds

Here's the workspace https://github.com/iscumd/Zenith2017/tree/master/catkin_ws

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2016-12-07 10:32:23 -0500

gvdhoorn gravatar image

updated 2016-12-07 10:35:53 -0500

common_msgs is the metapackage, not a package that contains any files itself (other than a package manifest).

You should depend on the package(s) that actually contain the message/service/action specs that you'd like to use (ie, any of: actionlib_msgs, diagnostic_msgs, geometry_msgs, nav_msgs, sensor_msgs, shape_msgs, stereo_msgs, trajectory_msgs or visualization_msgs).

edit flag offensive delete link more

Comments

Thank you, I realized I could include the sensor_msgs on it's own but didn't realize this was the "correct" way to do it.

copyat300 gravatar image copyat300  ( 2016-12-07 11:06:16 -0500 )edit

Question Tools

Stats

Asked: 2016-12-07 10:00:30 -0500

Seen: 2,248 times

Last updated: Dec 07 '16