Ask Your Question
0

[rosrun] Couldn't find executable named ...

asked 2015-08-16 17:34:31 -0600

DENSO gravatar image

updated 2015-08-16 22:06:08 -0600

130s gravatar image

in src there is a package named random_husky_driver including: CMakeLists.text package.xml random_driver.cpp

This is the cmakelists.text:

cmake_minimum_required(VERSION 2.8.3)
project(random_husky_driver)

## 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
  std_msgs
)

set(random_driver ${random_drivers.cpp})
set(random_driver ${catkin_LIBRARIES})

## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)


## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
# catkin_python_setup()

################################################
## 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 and a run_depend tag for each package in MSG_DEP_SET
##   * If MSG_DEP_SET isn't empty the following dependencies might have been
##     pulled in transitively but can be declared for certainty nonetheless:
##     * add a build_depend tag for "message_generation"
##     * add a run_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 ...)
##   * add "message_runtime" and every package in MSG_DEP_SET to
##     catkin_package(CATKIN_DEPENDS ...)
##   * 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
#   Message1.msg
#   Message2.msg
# )

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

When I run catkin_make it gives me no error. BUT MY PROBLEM IS WHEN I RUN rosrun random_husky_driver random_driver I RECEIVE THIS ERROR:

[rosrun] Couldn't find executable named random_driver below /home/denso/ros101/src/random_husky_driver

I would appreciate it if you help me out.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-08-17 01:08:25 -0600

mgruhler gravatar image

updated 2015-08-19 01:00:36 -0600

If this is the full CMakeLists.txt, the problem is simply that you are not building the respective node.

This package actually seems to be a tutorial from Clearpath.

Check the Compiling ... section on how to compile anything. You need to have the two following lines in there:

add_executable(random_driver random_driver.cpp)
target_link_libraries(random_driver ${catkin_LIBRARIES})

And the two lines with set(...) in your CMakeLists.txt don't make sense.


EDIT:

Two possibilities:

  1. You don't have costmap_2d installed, do with sudo apt-get install ros-DISTRO-costmap-2d and replace DISTRO with whatever ROS version you are using.
  2. You don't configure CMake correctly. Do you have something like find_package(catkin REQUIRED COMPONENTS costmap_2d <otherpackages>) in your CMakeLists.txt, together with the resepctive include_dirs(${catkin_INCLUDE_DIRS} and target_link_libraries(..) calls? And you need to declare it as a <build_depend> in the package.xml.

If this does not help, please update your question with the respective/new CMakeLists.txt content...

edit flag offensive delete link more

Comments

i still getting this error

map_2d/costmap_2d_ros.h: No such file or directory
compilation terminated.
make[2]: *** [relaxed_astar/CMakeFiles/relaxed_astar_lib.dir/src/RAstar_ros.cpp.o] Error 1
make[1]: *** [relaxed_astar/CMakeFiles/relaxed_astar_lib.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed
DENSO gravatar imageDENSO ( 2015-08-18 20:58:32 -0600 )edit
1

see edit above...

mgruhler gravatar imagemgruhler ( 2015-08-19 00:55:43 -0600 )edit

Thank you my problem was solved but i have another error after following this tutorial link text the error is

roscd: No such package/stack 'turtlebot_navigation/
DENSO gravatar imageDENSO ( 2015-08-19 09:42:44 -0600 )edit

in the tutorial go all the way down where say { Running the Plugin on the Turtlebot }

Thank you for your time MIG

DENSO gravatar imageDENSO ( 2015-08-19 09:45:15 -0600 )edit

again, please as new question with more information

mgruhler gravatar imagemgruhler ( 2015-08-20 01:29:03 -0600 )edit

Would you please answer my questionCLICK HERE PLEASE in this link

DENSO gravatar imageDENSO ( 2015-08-20 10:53:02 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2015-08-16 17:34:31 -0600

Seen: 829 times

Last updated: Aug 19 '15