[rospack] Error: package 'beginner_tutorials' not found
I followed the tutorials for ROS kinetic and in the writing a publisher and subscriber in C++ after copying the cpp files in the src folder of beginner_tutorials folder i pass:
cd ~/catkin_ws
catkin_make
When I build the workspace using catkin_make after copying the talker.cpp and listener.cpp in the ~catkin_ws/src/beginner_tutorials/src i get the following output:
ros@ros-HP-280-G2-SFF:~/catkin_ws$ catkin_make
Base path: /home/ros/catkin_ws
Source space: /home/ros/catkin_ws/src
Build space: /home/ros/catkin_ws/build
Devel space: /home/ros/catkin_ws/devel
Install space: /home/ros/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/ros/catkin_ws/build"
####
####
#### Running command: "make -j4 -l4" in "/home/ros/catkin_ws/build"
####
then when i open new terminal and pass
source ~/catkin_ws/devel/setup.bash
rosrun beginner_tutorials talker
the errors are as follows:
[rosrun] Couldn't find executable named talker below /home/ros/catkin_ws/src/beginner_tutorials
When I see this tutorial they are also following the same steps and while they give catkin_make command the output has few more lines like
[50%] Built target talker
[100%] Built target listener
which I am not getting.
I tried the solutions mentioned to similar problems, tried to chmod +x talker.cpp in the src folder of the package. Still getting the same error
PLEASE HELP ME TO UNDERSTAND WHAT I AM DOING WRONG. MANY THANKS IN ADVANCE
PS: I am an engineer from mechanical branch with little experience in coding, usually I copy+paste of the errors in google helps me solve them from people who have previously faced and solved.
Can you please edit the question and add your CMakeLists.txt file here?
It's likely that @designthala hasn't added the
talker
andlistener
targets to theirCMakeLists.txt
, causing Catkin to not actually build anything. That would explain both the missing lines in the build output and the fact that the nodes cannot be found byrosrun
.