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

ROSRUN can't find EXECUTABLE

asked 2018-02-26 13:24:32 -0500

Prof. xavier gravatar image

updated 2018-02-26 13:34:55 -0500

gvdhoorn gravatar image

Hello, I am using kinetic and I am trying to run a simple publisher and subscriber.

the cmakelists.xml has the following code.

cmake_minimum_required(VERSION 2.8.3)
project(mastering_ros_demo_pkg)

cmake_policy(SET CMP0046 OLD)

find_package(catkin REQUIRED COMPONENTS
  actionlib
  actionlib_msgs
  roscpp
  std_msgs
)


include_directories(
 include
  ${catkin_INCLUDE_DIRS}
)



add_executable(demo_topic_publisher src/demo_topic_publisher.cpp) 
add_executable(demo_topic_subscriber src/demo_topic_subscriber.cpp)


add_dependencies(demo_topic_publisher ${mastering_ros_demo_pkg}_gencfg)
add_dependencies(demo_topic_subscriber ${mastering_ros_demo_pkg}_gencfg)


target_link_libraries(demo_topic_publisher ${catkin_LIBRARIES}) 
target_link_libraries(demo_topic_subscriber ${catkin_LIBRARIES})

after running rosrun i get the following error :

[rosrun] Couldn't find executable named demo_topic_publisher below /home/xavier/catkin_ws/src/mastering_ros_demo_pkg

I did source the setup.bash after catkin_make but still the issue was not sovled.

Please help me out here.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2018-02-26 13:35:53 -0500

gvdhoorn gravatar image

updated 2018-02-26 13:37:18 -0500

If that is really your CMakeLists.txt, it would appear you are missing a call to catkin_package(..).

See wiki/catkin/CMakeLists.txt for an overview of the various parts and why and when they are needed. See wiki/catkin/CMakeLists.txt - catkin_package() specifically.

edit flag offensive delete link more

Comments

I added the catkin_package but I still the same issue

Prof. xavier gravatar image Prof. xavier  ( 2018-02-26 13:53:42 -0500 )edit

Please make sure to delete your devel and build folders, rebuild your workspace and then source /home/xavier/catkin_ws/devel/setup.bash.

gvdhoorn gravatar image gvdhoorn  ( 2018-02-26 13:59:22 -0500 )edit

Also: could you update your question text and add the new CMakeLists.txt (do not overwrite your previous one), so it shows where you added catkin_package(..)? Use the edit button/link for that.

gvdhoorn gravatar image gvdhoorn  ( 2018-02-26 14:00:25 -0500 )edit

okay, thanks for helping I will try this and post if any issues come along.

Prof. xavier gravatar image Prof. xavier  ( 2018-02-26 14:01:09 -0500 )edit
1

Did you resolve this issue? If so, please click on the checkmark next to the answer to mark the question as answered.

gvdhoorn gravatar image gvdhoorn  ( 2018-03-24 05:22:53 -0500 )edit

thanks gvdhoom, fixed it for me

taxi711 gravatar image taxi711  ( 2018-08-16 12:40:21 -0500 )edit

type chmod +x "your programfile"
and you can confirm rosrunable file

digitalhub gravatar image digitalhub  ( 2019-03-11 23:03:10 -0500 )edit

Question Tools

Stats

Asked: 2018-02-26 13:24:32 -0500

Seen: 4,217 times

Last updated: Feb 26 '18