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

Beginner Tutorial 11- unable to create talker/listener node c++

asked 2013-03-28 03:34:40 -0500

Schluchti gravatar image

updated 2014-01-28 17:15:57 -0500

ngrennan gravatar image

Hi, i am running ROS on an Ubuntu-VM with groovy and came across following problem.

I just started using ROS and am trying to learn the features by doing the tutorial. (in other words: i am a newbie, please bare with me) However i am not able to create the executable files for the talker.cpp and listener.cpp as described in tutorial 11. I followed every step as described and ran catkin_make but when i try to run the node with:

$rosrun beginner_tutorials talker

i only get:

[rosrun] Couldn't find executable named talker below /home/faps/catkin_ws/src/beginner_tutorials

i tried to compile the package with rosmake and it successfully builds 23 packages but not the talker.cpp or listener.cpp. Here is the complete response:

faps@VMFAPSGROOVY:~/catkin_ws/src/beginner_tutorials$ rosmake
[ rosmake ] rosmake starting...                                                 
[ rosmake ] No package specified.  Building ['beginner_tutorials']              
[ rosmake ] Packages requested are: ['beginner_tutorials']                      
[ rosmake ] Logging to directory /home/faps/.ros/rosmake/rosmake_output-20130328-122310
[ rosmake ] Expanded args ['beginner_tutorials'] to:
['beginner_tutorials']     
[rosmake-0] Starting >>> catkin [ make ]                                        
[rosmake-0] Finished <<< catkin ROS_NOBUILD in package catkin
 No Makefile in package catkin
[rosmake-0] Starting >>> cpp_common [ make ]                                    
[rosmake-0] Finished <<< cpp_common ROS_NOBUILD in package cpp_common
 No Makefile in package cpp_common
[rosmake-0] Starting >>> genmsg [ make ]                                        
[rosmake-0] Finished <<< genmsg ROS_NOBUILD in package genmsg
 No Makefile in package genmsg
[rosmake-0] Starting >>> gencpp [ make ]                                        
[rosmake-0] Finished <<< gencpp ROS_NOBUILD in package gencpp
 No Makefile in package gencpp
[rosmake-0] Starting >>> genlisp [ make ]                                       
[rosmake-0] Finished <<< genlisp ROS_NOBUILD in package genlisp
 No Makefile in package genlisp
[rosmake-0] Starting >>> genpy [ make ]                                         
[rosmake-0] Finished <<< genpy ROS_NOBUILD in package genpy
 No Makefile in package genpy
[rosmake-0] Starting >>> message_generation [ make ]                            
[rosmake-0] Finished <<< message_generation ROS_NOBUILD in package message_generation
 No Makefile in package message_generation
[rosmake-0] Starting >>> rostime [ make ]                                       
[rosmake-2] Starting >>> rospack [ make ]                                       
[rosmake-2] Finished <<< rospack ROS_NOBUILD in package rospack
 No Makefile in package rospack
[rosmake-2] Starting >>> roslib [ make ]                                        
[rosmake-1] Starting >>> roslang [ make ]                                       
[rosmake-3] Starting >>> xmlrpcpp [ make ]                                      
[rosmake-1] Finished <<< roslang ROS_NOBUILD in package roslang
 No Makefile in package roslang
[rosmake-0] Finished <<< rostime ROS_NOBUILD in package rostime
 No Makefile in package rostime
[rosmake-0] Starting >>> roscpp_traits [ make ]                                 
[rosmake-1] Starting >>> rosgraph [ make ]                                      
[rosmake-0] Finished <<< roscpp_traits ROS_NOBUILD in package roscpp_traits
 No Makefile in package roscpp_traits
[rosmake-0] Starting >>> roscpp_serialization [ make ]                          
[rosmake-1] Finished <<< rosgraph ROS_NOBUILD in package rosgraph
 No Makefile in package rosgraph
[rosmake-2] Finished <<< roslib ROS_NOBUILD in package roslib
 No Makefile in package roslib
[rosmake-3] Finished <<< xmlrpcpp ROS_NOBUILD in package xmlrpcpp
 No Makefile in package xmlrpcpp
[rosmake-2] Starting >>> rosunit [ make ]                                       
[rosmake-0] Finished <<< roscpp_serialization ROS_NOBUILD in package roscpp_serialization
 No Makefile in package roscpp_serialization
[rosmake-0] Starting >>> message_runtime [ make ]                               
[rosmake-2] Finished <<< rosunit ROS_NOBUILD in package rosunit
 No Makefile in package rosunit
[rosmake-2] Starting >>> rosconsole [ make ]                                    
[rosmake-0] Finished <<< message_runtime ROS_NOBUILD in package message_runtime
 No Makefile in package message_runtime
[rosmake-2] Finished <<< rosconsole ROS_NOBUILD in package rosconsole
 No Makefile in package rosconsole
[rosmake-0] Starting >>> std_msgs [ make ]                                      
[rosmake-0] Finished <<< std_msgs ROS_NOBUILD in package std_msgs
 No Makefile in package std_msgs
[rosmake-0] Starting >>> rosgraph_msgs [ make ]                                 
[rosmake-0] Finished <<< rosgraph_msgs ROS_NOBUILD in package rosgraph_msgs
 No Makefile in package rosgraph_msgs
[rosmake-0] Starting >>> roscpp [ make ]                                        
[rosmake-1] Starting >>> rospy [ make ]                                         
[rosmake-1] Finished <<< rospy ROS_NOBUILD in package rospy
 No Makefile ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2013-03-28 05:55:57 -0500

It looks to me like it's trying to compile the "beginner_tutorials" package located in the default ROS install directories:

[rosmake-0] Starting >>> beginner_tutorials [ make ]
[rosmake-0] Finished <<< beginner_tutorials ROS_NOBUILD in package beginner_tutorials No Makefile in package beginner_tutorials

This could happen if you've named your test package the same as the built-in ROS package ("beginner_tutorials") and if rospack finds the default ROS package before your package.

Try running rospack find beginner_tutorials to see which version is returned. You'd want this to point to your package, not the default ROS package. Make sure you've set the environment variable $ROS_PACKAGE_PATH to include your package directory (or a higher-level directory). And that this path is set before the default $ROS_PACKAGE_PATH. Typically this variable is set in your .bashrc file.

Alternatively, you could just rename your package to be something different than the built-in ROS package (e.g. my_beginner_tutorials).

edit flag offensive delete link more

Comments

Probably this is the right answer instead of mine.

Claudio gravatar image Claudio  ( 2013-03-28 07:43:18 -0500 )edit

Thx for the answers. I have not quite understood why and how but i think this is the solution. The rospack find beginner_tutorials returned the right package but catkin_make still didn't work. However: Running catkin_make --force-cmake worked perfectly and compiled the two cpp files.

Schluchti gravatar image Schluchti  ( 2013-04-04 04:47:16 -0500 )edit

I think that problem is/was that you did not run catkin_make, but rosmake instead.

dornhege gravatar image dornhege  ( 2013-04-05 00:09:06 -0500 )edit

i did run catkin_make before, it just didnt do anything.

Schluchti gravatar image Schluchti  ( 2013-04-08 02:15:03 -0500 )edit
0

answered 2013-03-28 05:45:58 -0500

Claudio gravatar image

updated 2013-03-28 05:48:12 -0500

Please use the code tag to make your code more readable in your posts.

[rosmake-0] Finished <<< beginner_tutorials ROS_NOBUILD in package beginner_tutorials No Makefile in package beginner_tutorials [ rosmake ] Results:

In this line almost at the end you can see two different things:

  • ROS_NOBUILD
  • No Makefile

ROS_NOBUILD is used to prevent the build system from rebuilding packages each time. The build system in ROS automatically traverses the hierarchy of modules starting from your package. So it most often would attempt to build any other package yours depends on. To avoid unnecessary recompilations, ROS_NOBUILD is used. If you have that file in your package folder, just remove it.

Then the No Makefile. If you have a CMakeLists.txt but you don't have a Makefile nothing will build. I'm not informed of the new catkin system since I'm still on an older realease, but once it was sufficient that your Makefile had the following line in it:

include $(shell rospack find mk)/cmake.mk

Try creating a Makefile with that line in it and it should now compile.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-03-28 03:34:40 -0500

Seen: 2,863 times

Last updated: Apr 04 '13