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

[rosrun] Couldn't find executable named talker or listener

asked 2015-12-08 10:13:36 -0500

fatima gravatar image

updated 2015-12-11 07:23:05 -0500

Hi I created two files with name : talker.cpp and listener.cpp and put them in path : catkin_ws1>src>beginner2_tutorials>src , and the chang the CmakeLists.txt as said in 11. Writing a Simple Publisher and Subscriber (C++) ROS tutorials and then run catkin_make and then in root workspace run : $ rosrun beginner2_tutorials talker but I receive this result :

[rosrun] Couldn't find executable named talker below /home/fatima/catkin_ws1/src/beginner2_tutorials

I review [11. Writing a Simple Publisher and Subscriber (C++) ROS tutorials] again i have noticed that i should have two executable in directory of my devel space but i havent any executable file i have only pkgconfig and beginner2_tutorials.pc !!! i dont know how should i have executable in located by default at ~/catkin_ws/devel/lib/<package name=""> , may be this is my problem so i couldnt run $ rosrun beginner2_tutorials talker so please help me to solve this

edit retag flag offensive close merge delete

Comments

The default location of the executable shouldn't be in your src directory if you're following the tutorials. Did you forget to source the setup.bash file from your devel directory?

2ROS0 gravatar image 2ROS0  ( 2015-12-08 10:37:58 -0500 )edit

thanks , i am following the tutorials but where should be the executable ??? and what you mean about executable your mean is : the talker.cpp file? is its loacation in another place?

fatima gravatar image fatima  ( 2015-12-08 11:51:11 -0500 )edit

i edited my question if you could please help me

fatima gravatar image fatima  ( 2015-12-11 07:24:02 -0500 )edit

hi, when your using your own package called "beginner2_tutorials" i think you have completed the normal "beginner_tutorials" ? Is this so,and was the result, that you could run it ?

have you sourced your devel/setup.bash file before running rosrun ?

inflo gravatar image inflo  ( 2015-12-11 07:55:32 -0500 )edit

yes i have run true my mistake was catkin_make and before this , i should make msg and srv folder.

fatima gravatar image fatima  ( 2015-12-11 09:01:07 -0500 )edit

thank you for reply

fatima gravatar image fatima  ( 2015-12-11 09:01:26 -0500 )edit

4 Answers

Sort by » oldest newest most voted
0

answered 2015-12-11 08:48:01 -0500

fatima gravatar image

hi , thanks for all helps all of my fault was mkdir msg and srv so after make them and did the catkin_make again i 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

so two executable files with name talker and listener were made in catkin_ws2/devel/lib/beginner_tutorials so when i run rosrun beginner2_tutorials talker again i could receive the result true run catkin_make is so important .

edit flag offensive delete link more

Comments

I still didn't get you. I am having the same problem, and I am not able to resolve, can you elaborate on the steps?

infinity_warp_101 gravatar image infinity_warp_101  ( 2020-03-08 12:52:34 -0500 )edit
0

answered 2015-12-08 10:47:14 -0500

130s gravatar image

updated 2015-12-08 13:46:23 -0500

Instead of trying to solve your issue directly, I suggest you to take a look at other threads where some of them seem to handle exactly the same error messages.


UPDATE) Not sure from the limited provided information, but you might have forgotten to run source devel/setup.bash.

If this works, I suggest you review the earlier tutorials; usage of source command is covered earlier.

edit flag offensive delete link more

Comments

i look for it but i havent found a good answer , i have done every thing at tutorials and many things were told in diffrent answer but didnt get true answer so what should i do? if you could please help me

fatima gravatar image fatima  ( 2015-12-08 11:54:49 -0500 )edit

thanks , though i havent forgotten but may be i made a mistake between making workspace and ... so i try again and will tell you thank you again

fatima gravatar image fatima  ( 2015-12-08 14:17:34 -0500 )edit

i have edited my question know i think i know whats my problem so please read and if you could please guide me

fatima gravatar image fatima  ( 2015-12-11 07:25:38 -0500 )edit
2

answered 2017-03-06 08:36:31 -0500

tsadik gravatar image

this error may happen when you don`t grant an execute permission to the file

chmod +x exec_file
edit flag offensive delete link more

Comments

This solved it for me. Thnx

Yev_D gravatar image Yev_D  ( 2020-04-17 15:27:51 -0500 )edit
0

answered 2018-05-10 01:06:46 -0500

Ethan_kuo gravatar image

hi guys,the executable files' path is always .../devel/lib,besides catkin_ws/devel/,a IDE may create another path,such as catkin_ws/src/cmake_and_debug/devel/lib,so remember to source the setup.sh in every devel folder in your workspace.good luck!

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-12-08 10:13:36 -0500

Seen: 6,879 times

Last updated: Dec 11 '15