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

catkin_make: cannot find 'std_msg'

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

dayogeorge gravatar image

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

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 image lucasw  ( 2018-02-08 10:02:43 -0500 )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 image jayess  ( 2018-02-08 11:08:29 -0500 )edit

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

jayess gravatar image jayess  ( 2018-02-08 13:19:49 -0500 )edit

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

dayogeorge gravatar image dayogeorge  ( 2018-02-08 13:31:53 -0500 )edit

please check the package.xml and CMakeLists.text

dayogeorge gravatar image dayogeorge  ( 2018-02-08 15:54:34 -0500 )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 image jayess  ( 2018-02-08 16:27:56 -0500 )edit

i have done that

dayogeorge gravatar image dayogeorge  ( 2018-02-08 18:22:39 -0500 )edit

It looks the same

jayess gravatar image jayess  ( 2018-02-08 18:33:53 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

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

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 image gvdhoorn  ( 2018-02-12 00:49:22 -0500 )edit

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

dayogeorge gravatar image dayogeorge  ( 2018-02-12 14:26:54 -0500 )edit

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

Teyhan gravatar image Teyhan  ( 2019-06-04 02:37:48 -0500 )edit
1

answered 2019-11-26 05:48:25 -0500

Robotronics gravatar image

Hi , the command : " catkin_create_pkg beginner_tutorials std_msgs rospy roscpp " creates for you two files:

  1. package.xml
  2. CMakeLists.txt.

The folder name is std_msgs (with an s) while the folder containing package.xml and CMakeLists.txt has std_msg (without an s) embedded inside it.

To Solve: Simply edit package.xml and CMakeLists.txt and change all std_msg to std_msgs.

Save and Done!

edit flag offensive delete link more

Comments

this solved the issue, thanks!

adiManav gravatar image adiManav  ( 2021-10-29 23:48:50 -0500 )edit

Question Tools

1 follower

Stats

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

Seen: 9,744 times

Last updated: Feb 11 '18