implementation of cplex libraries into ROS. [rosrun] Couldn't find executable named

asked 2019-02-16 08:17:55 -0600

Bennir gravatar image

Hi, I'm trying to implement the c++ libraries of Cplex (external optimization library, provided by IBM) into the ROS enviroment. I'm running ROS kinetic on Ubuntu 16.04 LTS. I built the Cmakelist for the ros package that uses these libraries and the catkin_make command compiles the package without errors. The problem is that when I try to run the node with rosrun command, it returns this error:

     [rosrun] Couldn't find executable named unex_opt below /home/bennir/catkin_ws/src/unex_opt

     [rosrun] Found the following, but they're either not files,

     [rosrun] or not executable:

     [rosrun]   /home/bennir/catkin_ws/src/unex_opt

     [rosrun]   /home/bennir/catkin_ws/src/unex_opt/include/unex_opt

and actually if I look for the executable in dev/lib/unex_opt, there is no executable created.

I attach the Cmakelist I built. The libraries are file .a and I include the headers in the cpp code inside src folder.

 cmake_minimum_required(VERSION 2.8.3)
 project(unex_opt)

 add_compile_options(-std=c++11)

 find_package(catkin REQUIRED COMPONENTS
   roscpp
   rospy
   std_msgs
   cmake_modules
   geometry_msgs
 )

 find_package(Eigen REQUIRED)

 catkin_package(
   INCLUDE_DIRS include
 )

 include_directories(
   ${catkin_INCLUDE_DIRS}
   ${Eigen_INCLUDE_DIRS}
   /home/bennir/MyCplex/cplex/include
   /home/bennir/MyCplex/concert/include
 )

 set(CMAKE_CXX_FLAGS "-g ${OTHERS_DEFINE} -O0 -c -m64 -O -fPIC -fno-strict-aliasing -fexceptions  -DNDEBUG      -DIL_STD")

 add_executable(${PROJECT_NAME}
    src/opt_unex.cpp
 )

 add_dependencies(unex_opt unex_opt_generate_messages_cpp ${${PROJECT_NAME}_EXPORTED_TARGETS}      ${catkin_EXPORTED_TARGETS})

 FIND_LIBRARY(ILOCPLEX_LIBRARY ilocplex /home/bennir/MyCplex/cplex/lib/x86-64_linux/static_pic)
 FIND_LIBRARY(CONCERT_LIBRARY concert /home/bennir/MyCplex/concert/lib/x86-64_linux/static_pic)
 FIND_LIBRARY(CPLEX_LIBRARY cplex /home/bennir/MyCplex/cplex/lib/x86-64_linux/static_pic)

 target_link_libraries(unex_opt
   ${catkin_LIBRARIES}
   ${ILOCPLEX_LIBRARY}
   ${CONCERT_LIBRARY}
   ${CPLEX_LIBRARY}
 )
edit retag flag offensive close merge delete

Comments

After compiling (catkin_make) did you source ~/catkin_ws/devel/setup.bash? Check these out: #220455 and #64763

aPonza gravatar imageaPonza ( 2019-02-18 03:29:20 -0600 )edit