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

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

//www.ros.org/wiki/ROS/Tutorials/ExaminingPublisherSubscriber.

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

devel/lib/beginner_tutorials/talker

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

*./devel/lib/beginner_tutorials/add_two_ints_client
./devel/lib/beginner_tutorials/talker
./devel/lib/beginner_tutorials/add_two_ints_server
./devel/lib/beginner_tutorials/listener
./devel/_setup_util.py
./devel/env.sh
./install/_setup_util.py
./install/env.sh
./build/CMakeFiles/CompilerIdC/a.out
./build/CMakeFiles/CompilerIdCXX/a.out
./build/CMakeFiles/CMakeDetermineCompilerABI_C.bin
./build/CMakeFiles/CMakeDetermineCompilerABI_CXX.bin
./build/catkin_generated/installspace/_setup_util.py
./build/catkin_generated/installspace/env.sh
./build/catkin_generated/setup_cached.sh
./build/catkin_generated/env_cached.sh*

After using the env | grep ROS_PACKAGE_PATH I get:

ROS_PACKAGE_PATH=/opt/ros/groovy/share:/opt/ros/groovy/stacks

and I have sourced the file using the following command:

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

Comments

2

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 image Boris  ( 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 image Asfandyar 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 image dornhege  ( 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 image Asfandyar 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 http://wiki.ros.org/catkin/CMakeLists... 3.Include all the package needed

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

I'm still having a problem saying

 [rosrun] Couldn't find executable named run_emvs below /home/ubuntu/emvs_ws/src/rpg_emvs/mapper_emvs

I followed the installation guide in here ! https://github.com/uzh-rpg/rpg_emvs

M.Halwani gravatar image M.Halwani  ( 2020-08-07 02:45:26 -0500 )edit

5 Answers

Sort by » oldest newest most voted
3

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.

UPDATE:

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/setup.sh

edit flag offensive delete link more

Comments

Thanks. I will try to recreate it

Asfandyar Ashraf Malik gravatar image Asfandyar 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.

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

To me it seems that this method does not work.

Abdul Mannan gravatar image 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 image Jägermeister  ( 2019-02-19 02:16:22 -0500 )edit
7

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

Comments

Specifically created an account to upvote. Thank you!

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

Where is this file?

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

replace exec_file with your file name

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

this worked! thank you so much!!

Nooyi gravatar image Nooyi  ( 2020-05-04 10:28:29 -0500 )edit
1

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

and

$ 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
0

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 :

Catkin_make

and run :

rosrun <your_package> <your_node>

edit flag offensive delete link more

Comments

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

Jägermeister gravatar image Jägermeister  ( 2019-02-19 02:13:20 -0500 )edit
0

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

Comments

Nah, doesn't solve the problem.

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

Question Tools

Stats

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

Seen: 37,581 times

Last updated: Nov 21 '16