[SOLVED] rosrun - Couldn't find executable
I have installed ROS Melodic on Fedora 33 and all seems to work properly, for example, I've tried to run the turtlesim node with turtle_teleop_key and turtlesim_node and they work as expected.
So, I created my node and put it under ~/ros_catkin_ws/src/ode_simulator, compiled with catkin build ode_simulator
, all went smooth.
Then I tried to run it, with rosrun ode_simulator ode_simulator
but it gives the following error:
[rosrun] Couldn't find executable named ode_simulator below /home/MY_NAME/ros_catkin_ws/install_isolated/share/ode_simulator
[rosrun] Found the following, but they're either not files,
[rosrun] or not executable:
[rosrun] /home/MY_NAME/ros_catkin_ws/install_isolated/share/ode_simulator
However the package exists and is found by ROS, since running rospack find ode_simulator
gives:
/home/MY_NAME/ros_catkin_ws/install_isolated/share/ode_simulator
My CMakeLists.txt is quite long and mostly commented out, but the following lines are present and not commented:
include_directories(
include
${catkin_INCLUDE_DIRS}
)
add_executable(ode_simulator src/ode_simulator.cpp src/ode_simulator_node.cpp src/simulator_odefun.cpp)
target_link_libraries(ode_simulator ${catkin_LIBRARIES})
From these lines I understand that there should be an executable called ode_simulator, but it seems that there isn't one.
This is what is present in the ode_simulator folder in ~/ros_catkin_ws/src/ode_simulator, command ls *
:
CMakeLists.txt package.xml
config:
ode_simulator_params.yaml
include:
ode_simulator simulator_odefun.h
launch:
ode_simulator.launch
src:
ode_simulator.cpp ode_simulator_node.cpp simulator_odefun.cpp
Of course there is source ~/ros_catkin_ws/install_isolated/setup.zsh
in my .zshrc.
Any help is appreciated, if more info is needed please tell me and I'll provide it.
There isn't really a need to edit the titles of questions that have an answer. The green checkmark they show on the index page already clearly communicates there is an accepted answer.
I know that there is the green checkmark, but when looking for posts on, e.g., Google I find it helpful to know if a question has been solved or not.