ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

BLOOM-GENERATE is not generating generating executable files

asked 2018-06-08 09:46:43 -0500

billyDong gravatar image

updated 2018-06-11 14:33:46 -0500

gvdhoorn gravatar image

Hello, I've been trying to create deb files from my rospackages using bloom-generate command:

$ cd path/to/your/catkin/package
$ bloom-generate rosdebian --os-name ubuntu --ros-distro kinetic
$ fakeroot debian/rules binary
or
$ dpkg-buildpackage -b -uc

after this I normally install my package:

$ sudo dpkg -i my_ros_package.deb

If I do :

$ roscd my_ros_package

I obtain this:

opt/ros/kinetic/share/my_ros_package$

but when I try to execute:

$rosrun my_ros_package my_ros_package_node
  [rosrun] Couldn't find executable named my_ros_package_node  below/opt/ros/kinetic/share/my_ros_package

It works fine when I use catkin. I used a generic example because this is happening with all of my_packages. But I will leave a concrete example here:

Cmakelists

package.xml


Edit:

CMakeLists.txt:

cmake_minimum_required(VERSION 2.8.3)
project(octo_to_pcl)

## Compile as C++11, supported in ROS Kinetic and newer
 add_compile_options(-std=c++11)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
  roscpp
  std_msgs
  map_msgs
  tf
  roslaunch
  geometry_msgs
  sensor_msgs
)
find_package (OpenCV)
find_package( PCL REQUIRED )
find_package(octomap REQUIRED)

## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)


## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
# catkin_python_setup()

################################################
## Declare ROS messages, services and actions ##
################################################

## To declare and build messages, services or actions from within this
## package, follow these steps:
## * Let MSG_DEP_SET be the set of packages whose message types you use in
##   your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
## * In the file package.xml:
##   * add a build_depend tag for "message_generation"
##   * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
##   * If MSG_DEP_SET isn't empty the following dependency has been pulled in
##     but can be declared for certainty nonetheless:
##     * add a run_depend tag for "message_runtime"
## * In this file (CMakeLists.txt):
##   * add "message_generation" and every package in MSG_DEP_SET to
##     find_package(catkin REQUIRED COMPONENTS ...)
##   * add "message_runtime" and every package in MSG_DEP_SET to
##     catkin_package(CATKIN_DEPENDS ...)
##   * uncomment the add_*_files sections below as needed
##     and list every .msg/.srv/.action file to be processed
##   * uncomment the generate_messages entry below
##   * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)

## Generate messages in the 'msg' folder
# add_message_files(
#   FILES
#   Message1.msg
#   Message2.msg
# )

## Generate services in the 'srv' folder
# add_service_files(
#   FILES
#   Service1.srv
#   Service2.srv
# )

## Generate actions in the 'action' folder
# add_action_files(
#   FILES
#   Action1.action
#   Action2.action
# )

## Generate added messages and services with any dependencies listed here
# generate_messages(
#   DEPENDENCIES
#   std_msgs  # Or other packages containing msgs
# )

################################################
## Declare ROS dynamic reconfigure parameters ##
################################################

## To declare and build dynamic reconfigure parameters within this
## package, follow these steps:
## * In the file package.xml:
##   * add a build_depend and a run_depend tag for "dynamic_reconfigure"
## * In this file (CMakeLists.txt):
##   * add "dynamic_reconfigure" to
##     find_package(catkin REQUIRED COMPONENTS ...)
##   * uncomment the "generate_dynamic_reconfigure_options" section below
##     and list every .cfg file to be processed

## Generate dynamic reconfigure parameters in the 'cfg' folder
# generate_dynamic_reconfigure_options(
#   cfg/DynReconf1.cfg
#   cfg/DynReconf2.cfg
# )

###################################
## catkin specific configuration ##
###################################
## The ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2018-06-11 14:36:12 -0500

gvdhoorn gravatar image

updated 2018-06-11 14:36:54 -0500

(I've included your CMakeLists.txt in your question text)

You don't have any install(..) statements in your CMakeLists.txt.

As a .deb will only include artefacts that have actually been installed, it's completely logical that your .deb installed package does not have your nodes - they're just not included in the .deb.

You'll need to add install(..) statements.

Please refer to Building and installing C++ executables and perhaps Building and installing C++ libraries and headers in the Catkin documentation.

It works fine when I use catkin.

yes, and that is because you probably don't use catkin_make install, but instead rely on the devel space.

edit flag offensive delete link more

Comments

1

Note that this is not a ROS problem, but a generic CMake one (install(..) is a CMake command, not a Catkin one).

gvdhoorn gravatar image gvdhoorn  ( 2018-06-11 14:37:21 -0500 )edit

Once you add install() statements to your CMakeLists.txt, you can test that they work by doing catkin_make install, then source the install/setup.bash and test that your nodes and launch files still run correctly.

ahendrix gravatar image ahendrix  ( 2018-06-11 14:42:51 -0500 )edit

Thank you, I needed to uncomment the install options on the cMakeLists

billyDong gravatar image billyDong  ( 2018-08-21 04:22:50 -0500 )edit
0

answered 2021-12-02 06:59:16 -0500

Robo_guy gravatar image

I faced the same issue, later figured out that install() needs to be added in cmake file. For further information on how to add it, refer to this - https://medium.com/@freeleons/generat...

edit flag offensive delete link more

Comments

Please do not post link-only answers.

gvdhoorn gravatar image gvdhoorn  ( 2021-12-03 02:31:04 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-06-08 09:46:43 -0500

Seen: 918 times

Last updated: Jun 11 '18