Ask Your Question
1

ros run couldn't find executable file after catkin build and source

asked 2020-08-07 02:06:19 -0500

M.Halwani gravatar image

updated 2020-08-07 02:39:41 -0500

gvdhoorn gravatar image

I'm trying to run an executable, but I'm getting the following error, I ran

catkin build

and then

source ~/emvs_ws/devel/setup.bash

after this running the following command

rosrun mapper_emvs run_emvs

shows this meassage

[rosrun] Couldn't find executable named run_emvs below /home/ubuntu/emvs_ws/src/rpg_emvs/mapper_emvs

this is the cmake file:

project(mapper_emvs)
cmake_minimum_required(VERSION 2.8.3)

find_package(catkin_simple REQUIRED)
catkin_simple(ALL_DEPS_REQUIRED)

set(CMAKE_BUILD_TYPE RelWithDebInfo) # Release, RelWithDebInfo
set(CMAKE_CXX_FLAGS "-O3 -fopenmp -std=c++11 ${CMAKE_CXX_FLAGS}")

set(HEADERS
  include/mapper_emvs/mapper_emvs.hpp
  include/mapper_emvs/data_loading.hpp
  include/mapper_emvs/depth_vector.hpp
  include/mapper_emvs/trajectory.hpp
  include/mapper_emvs/geometry_utils.hpp
  include/mapper_emvs/median_filtering.hpp
)

set(SOURCES
  src/mapper_emvs.cpp
  src/data_loading.cpp
  src/median_filtering.cpp
)

option(DEFINE_USE_INVERSE_DEPTH "Use linear spacing in inverse depth (if OFF, will use linear spacing in depth)" ON)
if(DEFINE_USE_INVERSE_DEPTH)
    add_definitions(-DUSE_INVERSE_DEPTH)
endif(DEFINE_USE_INVERSE_DEPTH)

cs_add_library(${PROJECT_NAME} ${SOURCES} ${HEADERS})

# Executables
################################################################################

cs_add_executable(run_emvs src/main.cpp)
target_link_libraries(run_emvs ${PROJECT_NAME})

################################################################################
cs_install()
cs_export()
edit retag flag offensive close merge delete

Comments

Title seems to be in trouble :O

130s gravatar image 130s  ( 2020-08-07 02:17:58 -0500 )edit

@M.Halwani: please fix the title.

If you don't, and this is a spam account, I'll remove all the content and block the user account.

gvdhoorn gravatar image gvdhoorn  ( 2020-08-07 02:37:26 -0500 )edit

what is the problem with the title ! I'm not a spam account :)

M.Halwani gravatar image M.Halwani  ( 2020-08-07 02:57:25 -0500 )edit

The title was this, before I changed it: Public Stack Overflow Tags Users Find a Job Jobs Companies Teams What’s this? Free 30 Day Trial.

That doesn't seem like a proper title for this forum, and seems like someone trying to use ROS Answers to spam.

gvdhoorn gravatar image gvdhoorn  ( 2020-08-07 03:10:45 -0500 )edit

I'm sorry but I didn;t see this title at all in my browser ! I don't know what's the issue

M.Halwani gravatar image M.Halwani  ( 2020-08-07 03:13:39 -0500 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2020-08-08 02:05:55 -0500

M.Halwani gravatar image

using catkin_make instead of catkin buildsolved the issue !

edit flag offensive delete link more
0

answered 2020-08-07 02:17:21 -0500

130s gravatar image

Error reads that a binary rosrun cannot find an executable run_emvs. In your CMakeLists.txt (Btw thanks for posting a detail of your setting. That helps):

cs_add_executable(run_emvs src/main.cpp)

This line is probably what you meant to define an executable. I've never seen cs_add_executable, then Google says it's for catkin_simple, an early variant of catkin, which I don't expect the tool you use, catkin_tools, supports. See catkin's document for building executable (docs.ros.org). Replace with add_executable.

edit flag offensive delete link more

Comments

Thank you for your reply, but changing cs_add_executable to add_executable didn't solve the issue

M.Halwani gravatar image M.Halwani  ( 2020-08-07 03:01:40 -0500 )edit

You can find all the files I'm using in here https://github.com/uzh-rpg/rpg_emvs

M.Halwani gravatar image M.Halwani  ( 2020-08-07 03:03:37 -0500 )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: 2020-08-07 02:06:19 -0500

Seen: 223 times

Last updated: Aug 08 '20