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

YSY's profile - activity

2022-01-21 09:15:23 -0500 marked best answer [rosrun] Couldn't find executable

//www.ros.org/wiki/ROS/Tutorials/ExaminingPublisherSubscriber.

When I try to run rosrun beginner_tutorials talker. It tells me that: [rosrun] Couldn't find executable named talker below /home/MY_NAME/catkin_ws/src/beginner_tutorials

Additional information: When I ran find -executable -type f the output is given as below:

./src/beginner_tutorials/talker.cpp
./src/beginner_tutorials/listener.cpp
./devel/_setup_util.py
./devel/env.sh
./build/catkin_generated/stamps/Project/_setup_util.py.stamp
./build/catkin_generated/installspace/_setup_util.py
./build/catkin_generated/installspace/env.sh
./build/catkin_generated/setup_cached.sh
./build/catkin_generated/env_cached.sh
./build/CMakeFiles/feature_tests.bin
./build/CMakeFiles/3.5.1/CompilerIdC/a.out
./build/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_CXX.bin
./build/CMakeFiles/3.5.1/CompilerIdCXX/a.out
./build/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin

After using the env | grep ROS_PACKAGE_PATH I get:

ROS_PACKAGE_PATH=/home/MY_NAME/catkin_ws/src:/opt/ros/kinetic/share

and I have sourced the file using the following command: source ./devel/setup.bash

below is the CMakeLists.txt

cmake_minimum_required(VERSION 2.8.3)
project(beginner_tutorials)

## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  std_msgs
)


################################################
## Declare ROS messages, services and actions ##
################################################

## To declare and build messages, services or actions from within this
## package, follow these steps:
## * Let MSG_DEP_SET be the set of packages whose message types you use in
##   your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
## * In the file package.xml:
##   * add a build_depend tag for "message_generation"
##   * add a build_depend and a exec_depend tag for each package in MSG_DEP_SET
##   * If MSG_DEP_SET isn't empty the following dependency has been pulled in
##     but can be declared for certainty nonetheless:
##     * add a exec_depend tag for "message_runtime"
## * In this file (CMakeLists.txt):
##   * add "message_generation" and every package in MSG_DEP_SET to
     find_package(catkin REQUIRED COMPONENTS 
    roscpp
    rospy
    std_msgs
    message_generation
     )
##   * add "message_runtime" and every package in MSG_DEP_SET to
     catkin_package(
    ...
        CATKIN_DEPENDS message_runtime ...
        ...)
##   * uncomment the add_*_files sections below as needed
##     and list every .msg/.srv/.action file to be processed
##   * uncomment the generate_messages entry below
##   * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)

## Generate messages in the 'msg' folder
 add_message_files(
   FILES
   Num.msg
 )

generate_messages()

## Generate services in the 'srv' folder
 add_service_files(
   FILES
   AddTwoInts.srv
 )

## Generate added messages and services with any dependencies listed here
 generate_messages(
   DEPENDENCIES
   std_msgs
 )

catkin_package(
)

###########
## Build ##
###########

## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
 include
  ${catkin_INCLUDE_DIRS}
)




add_executable(talker src/talker.cpp)
target_link_libraries(talker ${catkin_LIBRARIES})
add_dependencies(talker beginner_tutorials_generate_messages_cpp)

add_executable(listener src/listener.cpp)
target_link_libraries(listener ${catkin_LIBRARIES})
add_dependencies(listener beginner_tutorials_generate_messages_cpp)

add_executable(add_two_ints_server src/add_two_ints_server.cpp)
target_link_libraries(add_two_ints_server ${catkin_LIBRARIES})
add_dependencies(add_two_ints_server beginner_tutorials_gencpp)

add_executable(add_two_ints_client src/add_two_ints_client.cpp)
target_link_libraries(add_two_ints_client ${catkin_LIBRARIES})
add_dependencies(add_two_ints_client beginner_tutorials_gencpp)

thanks

2022-01-08 05:18:23 -0500 received badge  Nice Question (source)
2019-02-19 02:23:24 -0500 received badge  Student (source)
2018-11-12 04:14:36 -0500 received badge  Famous Question (source)
2018-09-10 01:20:54 -0500 received badge  Notable Question (source)
2018-09-10 00:09:47 -0500 commented answer [rosrun] Couldn't find executable

??????????????

2018-09-10 00:08:44 -0500 received badge  Popular Question (source)
2018-09-08 02:35:22 -0500 commented answer [rosrun] Couldn't find executable

CMakeLists show at the questions. it will show out rosrun beginner_tutorials after tab completion i have no idea what t

2018-09-08 02:34:25 -0500 edited question [rosrun] Couldn't find executable

[rosrun] Couldn't find executable //www.ros.org/wiki/ROS/Tutorials/ExaminingPublisherSubscriber. When I try to run rosr

2018-09-07 09:43:56 -0500 commented answer [rosrun] Couldn't find executable

it is a C++ node i have add the code below into CMakeLists.txt before add_executable(listener src/listener.cpp) target

2018-09-07 09:43:41 -0500 commented answer [rosrun] Couldn't find executable

it is a C++ node i have add the code below into CMakeLists.txt before add_executable(listener src/listener.cpp) target_

2018-09-07 09:43:24 -0500 commented answer [rosrun] Couldn't find executable

it is a C++ node i have add the code below into CMakeLists.txt before add_executable(listener src/listener.cpp) target_l

2018-09-07 06:14:21 -0500 asked a question [rosrun] Couldn't find executable

[rosrun] Couldn't find executable //www.ros.org/wiki/ROS/Tutorials/ExaminingPublisherSubscriber. When I try to run ros