Generate .deb from ROS package
Hi to all,
I would like to generate a ".deb" file to share my ROS code with other. I have heard about Bloom and another ways to generate ".deb" files. However, this is not a good solution for me, I only need a local manner to generate a ".deb" file to obfuscate my source code and thereby, my colleague could install and use it in his computer, without see the source. I only need to share my code with my colleague, no with the ROS community, because it is a very concrete (ad hoc) source code, is not valid for the rest of community.
Is there a "ROS" manner to compile my ROS package in a .deb file?
Edit (by @William):
The first step is correct, it generates a debian
folder with rules and another files.
$ cd path/to/your/catkin/package $ bloom-generate rosdebian --os-name ubuntu --os-version trusty --ros-distro indigo
Then, when i try to use the second command:
$ fakeroot debian/rules binary
I have problems with CMakeList.txt.
-- Found gtest sources under '/usr/src/gtest': gtests will be built -- catkin 0.5.86 CMake Error at /opt/ros/groovy/share/catkin/cmake/catkinConfig.cmake:72 (find_package): Could not find a configuration file for package roscpp. Set roscpp_DIR to the directory containing a CMake configuration file for roscpp. The file will have one of the following names: roscppConfig.cmake roscpp-config.cmake Call Stack (most recent call first): CMakeLists.txt:7 (find_package) CMake Error at /opt/ros/groovy/share/catkin/cmake/catkinConfig.cmake:72 (find_package): Could not find a configuration file for package message_generation. Set message_generation_DIR to the directory containing a CMake configuration file for message_generation. The file will have one of the following names: message_generationConfig.cmake message_generation-config.cmake Call Stack (most recent call first): CMakeLists.txt:7 (find_package) CMake Error at CMakeLists.txt:26 (add_message_files): Unknown CMake command "add_message_files". -- Configuring incomplete, errors occurred! dh_auto_configure: cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DCATKIN_BUILD_BINARY_PACKAGE=1 -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PREFIX_PATH=/usr returned exit code 1 make[1]: *** [override_dh_auto_configure] Error 2 make: *** [binary] Error 2
The compiler, among other errors, does not recognize "add_message_files" command. Any idea?
Thank you very much for your help ;)
I am trying with a lot of configurations, but it doesn't work. I am sure that the solution is very simple. I attach my CMakelist.txt and package.xml, order that you may check the files.
CMakelist.txt
cmake_minimum_required(VERSION 2.8.3)
project(br_modbus)
## 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 message_generation std_msgs genmsg)
## 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
# catkin_python_setup()
#######################################
## Declare ROS messages and services ##
#######################################
## Generate messages in the 'msg' folder
add_message_files(
FILES
BrInputStatus.msg
)
## Generate services in the 'srv' folder
add_service_files(
FILES
setOutput.srv
setOutputEmpty.srv
setOutputString.srv
getOutput.srv
)
## Generate added messages ...