Ask Your Question

SailAvid's profile - activity

2021-09-03 06:22:41 -0600 received badge  Student (source)
2018-10-04 17:37:56 -0600 received badge  Famous Question (source)
2018-10-04 17:37:56 -0600 received badge  Notable Question (source)
2018-10-04 17:37:56 -0600 received badge  Popular Question (source)
2018-08-06 02:27:36 -0600 asked a question Where does RViz/MoveIt get the link position

Where does RViz/MoveIt get the link position I'm currently trying to get the universal_robot package with UR5 running in

2015-10-25 20:03:33 -0600 received badge  Famous Question (source)
2015-08-20 07:27:12 -0600 received badge  Notable Question (source)
2015-06-30 11:46:21 -0600 received badge  Popular Question (source)
2015-05-28 08:53:56 -0600 asked a question catkin_make install binary not found with rosrun

I have a ros package which I compile with catkin_make install and then I move the install folder to a remote PC. On this PC the binary within the package isn't found with rosrun.

The ROS package has the following CMakeLists.txt

cmake_minimum_required(VERSION 2.8.3)

find_package(catkin REQUIRED COMPONENTS

catkin_package(CATKIN_DEPENDS roscpp rospy roslib std_msgs)

include_directories(${catkin_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/src)

SET(HDRS  src/main.h)

SET(SRCS  src/main.cpp)



install(TARGETS my_app_node

Now I run catkin_make install which compiles the package and copies the binary to the install dir ./install/lib/my_app/my_app_node:

~/catkin_ws $ ls
build  devel  install  src
~/catkin_ws $ ls install
include  lib  share  setup.bash  setup.zsh
~/catkin_ws $ ll install/lib/my_app
total 2.0M
-rwxr-xr-x 1 user user 2.0M Mai 28 10:58 my_app_node

To execute the app on a remote PC without recompiling it, I only copy the install directory to this PC which already includes the required binary. (Should work, right?)

Until here everything works fine. So here is where the problems start:


On the remote PC I have to source the setup.bash: source /home/remote/install/setup.bash

Unfortunately the ROS_PACKAGE_PATH doesn't get set by the setup script. Why? (rospack find doesn't find the package my_app

To circumvent this problem I set it manually: ROS_PACKAGE_PATH=/home/remote/install:$ROS_PACKAGE_PATH. Now rospack can find the package.

2. Binary not found with rosrun

Trying to start the node fails:

~/install$ rospack find my_app
~/install$ rosrun my_app my_app_node
[rosrun] Couldn't find executable named my_app_node below /home/remote/install/share/my_app

rosrun can't find the binary in the path: /home/remote/install/lib/my_app/my_app_node. Why?