[rosrun] Couldn't find executable named ...
Dear all,
I am trying to link against the youbot API driver repository from a catkin package.
First I created a catkin workspace named lib_youbot_test
including:
build devel src
in src
there is a package named node_pkg
including:
CMakeLists.text package.xml main.cpp
The main.cpp
is a node that uses the APIs and headers of youbot driver. (youbot_driver
package)
This is the cmakelists.text
:
cmake_minimum_required(VERSION 2.8.3)
project(node_pkg)
find_package(catkin REQUIRED COMPONENTS youbot_driver)
include_directories(${catkin_INCLUDE_DIRS})
link_directories(${catkin_LIBRARY_DIRS})
catkin_package()
add_definitions(-DYOUBOT_CONFIGURATIONS_DIR="${youbot_driver_CONFIG_DIR}")
add_executable(node_pkg
main.cpp
)
target_link_libraries(node_pkg
${catkin_LIBRARIES}
)
OPTION(USE_SETCAP "Set permissions to access ethernet interface without sudo" ON)
SET(SUDO_COMMAND gksudo)
IF($ENV{USE_NORMAL_SUDO})
SET(SUDO_COMMAND sudo)
ENDIF($ENV{USE_NORMAL_SUDO})
IF(USE_SETCAP)
add_custom_command(TARGET node_pkg POST_BUILD
COMMAND ${SUDO_COMMAND} setcap cap_net_raw+ep $<TARGET_FILE:node_pkg>
)
endif(USE_SETCAP)
install(TARGETS node_pkg
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
and this is package.xml
:
<package>
<name>node_pkg</name>
<description>
node_pkg
</description>
<author>ALIREZA</author>
<maintainer email="x@x.de">x</maintainer>
<license>BSD</license>
<version>0.1.0</version>
<url>https://github.com/youbot/youbot_applications</url>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>youbot_driver</build_depend>
<run_depend>roscpp</run_depend>
</package>
** When I run catkin_make it gives me no error.
BUT MY PROBLEM IS WHEN I RUN rosrun node_pkg main
I RECEIVE THIS ERROR:
[rosrun]Couldn't find executable named below /home/youbot/lib_youbot_test/src/node_pkg
And this is the output ROS_PACKAGE_PATH:
/home/youbot/lib_youbot_test:/home/youbot/lib_youbot_driver:/home/youbot/ros_stacks:/opt/ros/hydro/share:/opt/ros/hydro/stacks
I would appreciate it if you help me out.