Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Catkin-built node not available under rosrun

Sorry for the elementary nature of this question. I am attempting to use rosrun in order to run an executable in Indigo.

My CMakeLists.txt is as follows:

cmake_minimum_required(VERSION 2.8.3)
project(arfw_blink)
SET(CMAKE_C_FLAGS "-std=gnu99")

find_package(catkin REQUIRED COMPONENTS roscpp message_generation)

add_service_files(FILES BlinkCmd.srv)
 generate_messages(DEPENDENCIES)

catkin_package()

 include_directories(include)
include_directories(
  ${catkin_INCLUDE_DIRS}
)

 add_executable(arfw_blink_node src/blinker.cpp src/hid.c src/blink1-lib.c)
 target_link_libraries(arfw_blink_node  ${catkin_LIBRARIES} usb-1.0 pthread rt)

 install(TARGETS arfw_blink_node
   ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
   LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
 )

And the package.xml is as follows:

<?xml version="1.0"?>
<package>
  <name>arfw_blink</name>
  <version>0.0.0</version>
  <description>The arfw_blink package</description>

  <maintainer email="odroid@todo.todo">odroid</maintainer>
  <license>TODO</license>

  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>roscpp</build_depend>
  <run_depend>roscpp</run_depend>
  <build_depend>message_generation</build_depend> 
  <run_depend>message_runtime</run_depend>

</package>

The resultant executable can be found and run via ./ at devel/lib/arfw_blink/arfw_blink_node, yet running rosrun arfw_blink arfw_blink_node results in the error: [rosrun] Couldn't find executable named arfw_blink_node below /home/odroid/catkin_ws/src/arfw_blink. Can anyone please show me how to resolve this?