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

[rosrun] Couldn't find executable named

asked 2015-01-11 13:12:53 -0600

ioann_kats gravatar image

hello i am new to ROS and to Ubuntu ! I use ubuntu 12.04 and Ros Fuerte!I was trying to understant ROS through the examples of the book "Learing Ros for Robotics Programming" but i've been stucked 2 days in creating nodes section !(pages 52-56) I have made whatever it says but when i write rosrun chapter2_tutorials example1_a on terminal i keep getting "[rosrun] Couldn't find executable named example1_a below /home/ioannis/dev/rosbook/chapter2_tutorials" Is there any idea which the problem is? If you want further info let me know! Sorry for my bad english! Thank you in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-01-11 13:39:41 -0600

Andromeda gravatar image

updated 2015-01-11 13:46:16 -0600

It could be that in your CMakelists.txt (see page 55 at the end of the page on the same book) you must define where your cpp files are in your system:

(from the book):

rosbuild_add_executable(example1_a src/example1_a.cpp)
rosbuild_add_executable(example1_b src/example1_b.cpp)

for this reason be sure that the path and the name of the .cpp files are right. if you didn't create a src/ folder in your chapter2_tutorials/ folder then you need to remove it from your CMakelists.txt file. For example it would be:

rosbuild_add_executable(example1_a example1_a.cpp)
rosbuild_add_executable(example1_b example1_b.cpp)

I hope that this solve your problem. And don't forget to source your file in your terminal:

source devel/setup.bash

EDIT: you picked up the only book that is made entirely from the tutorials online. For using and learning ROS I would suggest you to use the tutorials online since they are updated and much more detailed than the book. As an exercise can you lately switch to the book again and try to develop its robot's examples with the stuff you learned.

Ciao

edit flag offensive delete link more

Comments

First of all thank you for your time! unfortunately i have src folder and inside this folder is both example1 and example2 I think that the problem may be in bashrc file export ROS_PACKAGE_PATH=/home/ioannis/dev/rosbook:/home/ioannis/dev/rosbook:/opt/ros/fuerte/share:/opt/ros/fuerte/stacks

ioann_kats gravatar image ioann_kats  ( 2015-01-11 14:05:54 -0600 )edit

did you initialize the workspace of ROS?!?!? In ~/dev/rosbook you should initialize the workspace. Hydro and above need a catkin_initbut since you are using Fuerte I'm not really sure

Andromeda gravatar image Andromeda  ( 2015-01-11 14:12:22 -0600 )edit

if I were you I would forget the book for a moment and start again slowly with the tutorial online Select rosbuild when asked for the system. I'm pretty sure you didn't initialize the workspace.

Andromeda gravatar image Andromeda  ( 2015-01-11 14:14:26 -0600 )edit

So !should i prefer hydro?

ioann_kats gravatar image ioann_kats  ( 2015-01-11 14:57:49 -0600 )edit

If you don't need Fuerte install Indigo!! But if you are forced to use Fuerte you have to choose in the tutorials rosbuild.

If you can install Indigo

Andromeda gravatar image Andromeda  ( 2015-01-11 15:26:35 -0600 )edit

ok!Thank you so much!

ioann_kats gravatar image ioann_kats  ( 2015-01-11 16:01:26 -0600 )edit

rosrun chapter2_tutorials chap2_example1_a

corilei gravatar image corilei  ( 2018-01-15 06:53:08 -0600 )edit

Question Tools

Stats

Asked: 2015-01-11 13:12:53 -0600

Seen: 4,551 times

Last updated: Jan 11 '15