0
$\begingroup$

Rosanswers logo

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/ , may be this is my problem so i couldnt run $ rosrun beginner2_tutorials talker so please help me to solve this


Originally posted by fatima on ROS Answers with karma: 62 on 2015-12-08

Post score: 0


Original comments

Comment by 2ROS0 on 2015-12-08:
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?

Comment by fatima on 2015-12-08:
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?

Comment by fatima on 2015-12-11:
i edited my question if you could please help me

Comment by inflo on 2015-12-11:
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 ?

Comment by fatima on 2015-12-11:
yes i have run true my mistake was catkin_make and before this , i should make msg and srv folder.

Comment by fatima on 2015-12-11:
thank you for reply

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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 .


Originally posted by fatima with karma: 62 on 2015-12-11

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by infinity_warp_101 on 2020-03-08:
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?

$\endgroup$
0
$\begingroup$

Rosanswers logo

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

chmod +x exec_file

Originally posted by tsadik with karma: 91 on 2017-03-06

This answer was NOT ACCEPTED on the original site

Post score: 2


Original comments

Comment by Yev_D on 2020-04-17:
This solved it for me. Thnx

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.