Hi!
I have the same problem as mentioned here: Error using rosmsg in "Creating msg and srv" Tutorial
In section 2.2 of this tutorial when typing the command
$ rosmsg show beginner_tutorials/Num
I don't get
init64 num
but
Unable to load msg [beginner_tutorials/Num]: Cannot locate message [Num]: unknown package [beginner_tutorials] on search path ...
In the other thread the solution is: I should simply run:
$ cd ~/catkin_ws/ then > $ catkin_make
But there I get the Error:
CMake Error at /home/user/catkin_ws/build/beginner_tutorials/cmake/beginner_tutorials-genmsg.cmake:3 (message):
Could not find messages which '/home/user/catkin_ws/src/beginner_tutorials/msg/Num.msg' depends on.
Did you forget to specify generate_messages(DEPENDENCIES ...)?Cannot locate message [init64] in package [beginner_tutorials] with paths
[['/home/user/catkin_ws/src/beginner_tutorials/msg']] Call Stack (most recent call first): /opt/ros/indigo/share/genmsg/cmake/genmsg-extras.cmake:304 (include)
beginner_tutorials/CMakeLists.txt:68 (generate_messages)-- Configuring incomplete, errors occurred! See also "/home/user/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/user/catkin_ws/build/CMakeFiles/CMakeError.log". make: *** [cmake_check_build_system] Error 1 Invoking "make cmake_check_build_system" failed
What do I do wrong. I changed the CMakeList.txt exactly as said in the tutorials and checked it a lot of times. And I put in
catkin_package(CATKIN_DEPENDS message_runtime)
Can anybody help me out here? Thanks!!
Edit:
Here is the CMakeLists.txt (I removed the commented parts):
cmake_minimum_required(VERSION 2.8.3)
project(beginner_tutorials)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
message_generation
)
add_message_files(
FILES
Num.msg
)
generate_messages(
DEPENDENCIES
std_msgs
)
include_directories(
${catkin_INCLUDE_DIRS}
)
And here the package.xml:
<?xml version="1.0"?>
<package>
<name>beginner_tutorials</name>
<version>0.0.0</version>
<description>The package for beginners</description>
<maintainer email="[email protected]">user</maintainer>
<license>TODO</license>
<build_depend>message_generation</build_depend>
<run_depend>message_runtime</run_depend>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>std_msgs</build_depend>
<run_depend>roscpp</run_depend>
<run_depend>rospy</run_depend>
<run_depend>std_msgs</run_depend>
<export>
</export>
</package>
Originally posted by bluefish on ROS Answers with karma: 236 on 2015-02-20
Post score: 1
Original comments
Comment by Andromeda on 2015-02-20:
Did you save the file as said iin the tutorial?
Could you please entirely post your CMakeLists.txt
und package.xml
?
Comment by bluefish on 2015-02-20:
Thanks for your comment!
Yes, I saved it here: ~/catkin_ws/src/beginner_tutorials
Comment by bluefish on 2015-02-20:
I put in both files in the edit above.
Comment by jarvisschultz on 2015-02-20:
Does your Num.msg
file actually say init64 num
? It should say int64 num
(you have an extra 'i'). That typing error would explain why you are getting the "Cannot locate message [init64]" when running catkin_make
Comment by Andromeda on 2015-02-20:
And what happen if you type simply:
$ rosmsg show Num
????? without the folder name
Comment by bluefish on 2015-02-20:
Thanks so much javisschultz and Andromeda!! I really put in that extra "i".
And I tried to find that error for hours. So stupid....
Sorry for bothering you with that and thanks again!!
Comment by JarvisRobot on 2016-12-07:
I face the same problem. I changed the CMakeList.txt exactly as said in the tutorials and checked it a lot of times. When I try to ~/catkin_ws/src/beginner_tutorials$ rosmsg show Num
,it returns Could not find msg 'Num'
. Can anybody help me out here? Thanks!!
Comment by jarvisschultz on 2016-12-08:
The command should be rosmsg show beginner_tutorials/Num