Ask Your Question

Change path of rosrun. Couldn't find executables?

asked 2013-06-11 00:40:54 -0500

Asfandyar Ashraf Malik gravatar image

updated 2013-06-11 02:37:16 -0500

I am following tutorials of ROS at the ROS wiki


When I try to run rosrun beginner_tutorials talker. It tells me that:

[rosrun] Couldn't find executable named talker below /home/maverick/catkin_ws/install/share/beginner_tutorials

I know that the executable is not in the install folder but rather in devel. How can I make it search for rosrun beginner_tutorial talker in


Additional information: When I ran find -executable -type f the output is given as below:


After using the env | grep ROS_PACKAGE_PATH I get:


and I have sourced the file using the following command:

source ./devel/setup.bash
edit retag flag offensive close merge delete



Please post more info, i.e. output of $ env | grep ROS_PACKAGE_PATH. Also check whether you did source appropriate setup.bash file or not.

Boris gravatar imageBoris ( 2013-06-11 01:09:14 -0500 )edit

I have edited my question up there and have posted my output to $ env| grep ROS_PACKAGE_PATH . Also I have sourced the file using the command source ./devel/setup.bash

Asfandyar Ashraf Malik gravatar imageAsfandyar Ashraf Malik ( 2013-06-11 01:46:12 -0500 )edit

Something doesn't match. Did you source the setup.bash after the ROS_PACKAGE_PATH display? Did you run catkin_make?

dornhege gravatar imagedornhege ( 2013-06-11 01:55:51 -0500 )edit

Yes I did all of this. Even after this I am still getting the same errors. When I do roscd beginner_tutorials I get /catkin_ws/install/share/beginner_tutorials$. Why is roscd checking always in the install folder. It should check in the devel because my executables are there. How can I change this.

Asfandyar Ashraf Malik gravatar imageAsfandyar Ashraf Malik ( 2013-06-11 02:01:24 -0500 )edit

I had the same error and this is same of the things I did. 1.Delete the build and devel folder with our your working directory. 2.Make sure that all that you have followed the overall order and structure with in you CMakeList 3.Include all the package needed

kiyamelak gravatar imagekiyamelak ( 2016-06-29 12:22:58 -0500 )edit

5 Answers

Sort by » oldest newest most voted

answered 2013-06-11 02:07:27 -0500

updated 2013-06-11 02:16:12 -0500

The ROS_PACKAGE_PATH is wrong - it should also include the path to overlay, i.e. to your catkin workspace.

If ROS_PACKAGE_PATH didn't change after $ source ~/catkin_ws/devel/setup.bash then there is something wrong with your overlay. Try to recreate it.


This tutorial may also help. In case you are using install space you have to source setup.bash from it.

At any rate it will be better to recreate workspace and try again with $ source devel/

edit flag offensive delete link more


Thanks. I will try to recreate it

Asfandyar Ashraf Malik gravatar imageAsfandyar Ashraf Malik ( 2013-06-11 02:18:00 -0500 )edit

Asfandyar, did you resolve the problem. I have been following the same steps but I am unable to do that.

Dr Abdul Mannan gravatar imageDr Abdul Mannan ( 2016-11-14 04:33:43 -0500 )edit

To me it seems that this method does not work.

Dr Abdul Mannan gravatar imageDr Abdul Mannan ( 2016-11-14 04:34:03 -0500 )edit

This isn't the solution. I have both of source /opt/ros/melodic/setup.bashsource ~/ros_ws/devel/setup.bash these and I still run into the same problem.

Jägermeister gravatar imageJägermeister ( 2019-02-19 02:16:22 -0500 )edit

answered 2017-03-06 08:34:07 -0500

tsadik gravatar image

you should grant execute permission to the file

chmod +x exec_file
edit flag offensive delete link more


Specifically created an account to upvote. Thank you!

Btdr gravatar imageBtdr ( 2018-08-16 04:30:38 -0500 )edit

Where is this file?

Jägermeister gravatar imageJägermeister ( 2019-02-19 02:16:44 -0500 )edit

replace exec_file with your file name

parzival gravatar imageparzival ( 2019-08-16 05:41:58 -0500 )edit

answered 2015-12-11 08:36:15 -0500

fatima gravatar image

i had a problem like this but when made srv and msg folder with mkdir $

 cd ~/catkin_ws/src/beginner_tutorials
$ mkdir msg


$ roscd beginner_tutorials
$ mkdir srv

look at this link and then run catkin_make and did every thing for talker.cpp and listener.cpp and did source ./devel/setup.bash in my catkin workspace and run catkin_make again and we could see :

Linking CXX executable /home/fatima/catkin_ws2/devel/lib/beginner_tutorials/talker
Linking CXX executable /home/fatima/catkin_ws2/devel/lib/beginner_tutorials/listener

and then : two executable file were made in catkin_ws/devel/lib/beginner_tutorials/talker and listener and now it could be run :

rosrun beginner_tutorials talker
edit flag offensive delete link more

answered 2016-03-29 08:00:42 -0500

MARAUDER gravatar image

I faced the same trouble getting started with ROS Indigo. My issue was to make sure that I was sourcing :$ source devel/setup.bash while being in my catkin_ws folder. Using $ source ./devel/setup.bash or $ source ~/catkin_ws/devel/setup.bashwasn't efficient.

edit flag offensive delete link more


Nah, doesn't solve the problem.

Jägermeister gravatar imageJägermeister ( 2019-02-19 02:14:12 -0500 )edit

answered 2016-11-21 16:02:18 -0500

quynt gravatar image

I have the same your problem. I have a tip for you:

  1. Creat new package with the tutorial
  2. Copy all your source code in to src/ folder
  3. Edit yourCMakeLists.txt and package.xml in <your_package_folder>

run command with :


and run :

rosrun <your_package> <your_node>

edit flag offensive delete link more


This is exactly what I did and I got the same problem. So, no, this isn't the solution.

Jägermeister gravatar imageJägermeister ( 2019-02-19 02:13:20 -0500 )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


Asked: 2013-06-11 00:40:54 -0500

Seen: 23,596 times

Last updated: Nov 21 '16