Rosrun can not find an executable file.
So I have a package called dijkstra, it contains a cpp program in the src folder called algorithm_1.cpp which I need to run.
First I run the command source devel/setup.bash to set up the environment. After that I do, rosrun dijkstra and press tab twice, but it doesn't find any executable file.
This is the CMake-
cmake_minimum_required(VERSION 2.8.3)
project(dijkstra)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
geometry_msgs
)
include_directories(include ${catkin_INCLUDE_DIRS})
add_executable(${PROJECT_NAME} src/algorithm_1.cpp)
target_link_libraries(${PROJECT_NAME}
${catkin_LIBRARIES}
)
EDIT-
This is the error I get -
parth@Parth:~/catkin_ws/src$ rosrun dijkstra dijkstra.cpp
[rosrun] Couldn't find executable named dijkstra.cpp below /home/parth/catkin_ws/src/dijkstra
[rosrun] Found the following, but they're either not files,
[rosrun] or not executable:
[rosrun] /home/parth/catkin_ws/src/dijkstra/src/dijkstra.cpp
@rubicks: it would also have worked if you would've updated your answer.