Installing a catkin package without work space
To my understanding, catkin provides 2 different functionalities:
- a way to handle dependencies between packages in the installation process and
- a tool to create ROS services and messages.
As I am already using appropriate tools for 1, I wish to use catkin only for 2.
In other words, I use catkin macros
add_message_files
,
add_service_files
to generate the source code relative to my services and topics, but I want to install my package in the standard way:
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=myprefix -DCMAKE_INSTALL_LIBDIR=myprefix/lib..
make install
I use CATKIN_PACKAGE_BIN_DESTINATION
cmake macro as defined by REP 122 to install package relative executable and scripts.
As expected, cmake installs my executables in myprefix/lib/pkg-name
with execution rights for everyone.
However, when I type rosrun pkg-name executable
, i.e. rosrun dynamic_graph_bridge run_command
I get the following message:
[rosrun] Couldn't find executable named run_command below /home/florent/devel/ros/install/share/dynamic_graph_bridge
when as explained before run_command is in /home/florent/devel/ros/install/lib/dynamic_graph_bridge
.
my ROS_PACKAGE_PATH contains /home/florent/devel/ros/install:/opt/ros/groovy/share:/opt/ros/groovy/stacks
What did I wrong? Why does the error message seem inconsistent with REP 122?
I run groovy on ubuntu-12.04 32bits. The package can be found at http://www.github.com/stack-of-tasks/dynamic_graph_bridge.
Catkin itself actually doesn't provide the macros for message and service creation—it provides the mechanism by which those other packages may inject CMake functions in at the find_package point.