Ask Your Question
0

catkin_make: cannot find 'std_msg'

asked 2018-02-08 09:04:09 -0600

dayogeorge gravatar image

updated 2018-02-11 09:06:11 -0600

I'm still in the process of setting up my ROS, I am getting an error message when i run this command

catkin_make

The above command is at step 4 here

Then i get this error Message:

Base path: /home/dayo/catkin_ws
Source space: /home/dayo/catkin_ws/src
Build space: /home/dayo/catkin_ws/build
Devel space: /home/dayo/catkin_ws/devel
Install space: /home/dayo/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/dayo/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/dayo/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/kinetic
-- This workspace overlays: /opt/ros/kinetic
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/dayo/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.8
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 1 packages in topological order:
-- ~~  - beginner_tutorials
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'beginner_tutorials'
-- ==> add_subdirectory(beginner_tutorials)
CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
  Could not find a package configuration file provided by "std_msg" with any
  of the following names:
    std_msgConfig.cmake
    std_msg-config.cmake
  Add the installation prefix of "std_msg" to CMAKE_PREFIX_PATH or set
  "std_msg_DIR" to a directory containing one of the above files.  If
  "std_msg" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  beginner_tutorials/CMakeLists.txt:10 (find_package)
-- Could not find the required component 'std_msg'. 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 "std_msg" with any
  of the following names:
    std_msgConfig.cmake
    std_msg-config.cmake
  Add the installation prefix of "std_msg" to CMAKE_PREFIX_PATH or set
  "std_msg_DIR" to a directory containing one of the above files.  If
  "std_msg" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  beginner_tutorials/CMakeLists.txt:10 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/dayo/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/dayo/catkin_ws/build/CMakeFiles/CMakeError.log".
Makefile:290: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed*

This is the CMakeLists.txt :

cmake_minimum_required(VERSION 2.8.3)
project(beginner_tutorials)

find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  std_msgs
)  

catkin_package()

include_directories(
  ${catkin_INCLUDE_DIRS}
)

This is the Package.xml :

<?xml version="1.0"?>
<package format="2">
  <name>beginner_tutorials</name>
  <version>0.0.0</version>
  <description>The beginner_tutorials package</description>
  <maintainer email="dayo@todo.todo">dayo</maintainer>
  <license>TODO</license>

  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>rospy</build_depend>
  <build_depend>std_msgs</build_depend>
  <build_export_depend>roscpp</build_export_depend>
  <build_export_depend>rospy</build_export_depend>
  <build_export_depend>std_msgs</build_export_depend>
  <exec_depend>roscpp</exec_depend>
  <exec_depend>rospy</exec_depend>
  <exec_depend>std_msgs</exec_depend>

  <export>
  </export>
</package>

These are the outputs of the following commands:

dpkg -l | grep std-msgs

ii  ros-kinetic-std-msgs                         0.5.11-0xenial-20171104-175741-0800                   amd64        Standard ROS Messages including common message ...
(more)
edit retag flag offensive close merge delete

Comments

1

#q208679 has the same error message, they were able to debug it with additional catkin output and contents of the package CMakeLists.txt

lucasw gravatar imagelucasw ( 2018-02-08 10:02:43 -0600 )edit

Please update your question with the entire terminal output. There isn't enough information to figure out what's going on here.

jayess gravatar imagejayess ( 2018-02-08 11:08:29 -0600 )edit

Can you post your package.xml and CMakeLists.txt?

jayess gravatar imagejayess ( 2018-02-08 13:19:49 -0600 )edit

i've updated the terminal output, pls check it out

dayogeorge gravatar imagedayogeorge ( 2018-02-08 13:31:53 -0600 )edit

please check the package.xml and CMakeLists.text

dayogeorge gravatar imagedayogeorge ( 2018-02-08 15:54:34 -0600 )edit

Can you please copy and paste those files again using the preformatted text (101010) button? The current formatting makes the contents of those files are unreadable. And please remove any comments to shorten the length of them too.

jayess gravatar imagejayess ( 2018-02-08 16:27:56 -0600 )edit

i have done that

dayogeorge gravatar imagedayogeorge ( 2018-02-08 18:22:39 -0600 )edit

It looks the same

jayess gravatar imagejayess ( 2018-02-08 18:33:53 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-02-11 17:36:20 -0600

clyde gravatar image

To state the obvious (and answer the question): the catkin_build output refers to std_msg instead of std_msgs. The revised CMakeLists.txt and package.xml in the question are correct. It should build now.

edit flag offensive delete link more

Comments

That would seem to be the actual answer, however, the initial CMakeLists.txt posted by @dayogeorge (rev7) already has this:

find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs )

so either that is the CMakeLists.txt of a different pkg, or @dayogeorge forgot to tell us something.

gvdhoorn gravatar imagegvdhoorn ( 2018-02-12 00:49:22 -0600 )edit

there is nothing more i'm not telling you..i followed the steps in the tutorials and i post the outputs

dayogeorge gravatar imagedayogeorge ( 2018-02-12 14:26:54 -0600 )edit

Did you find any solution for this problem? There is same problem for me.

Teyhan gravatar imageTeyhan ( 2019-06-04 02:37:48 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-02-08 09:04:09 -0600

Seen: 1,987 times

Last updated: Feb 11 '18