7

I can compile and install ROS package in the catkin workspace in ROS. How can I export the package in catkin workspace to a .deb file so I can install and use it on the other machines?

My ROS version is ROS Indigo and OS version is Ubuntu 14.04

Wennn
  • 119
  • 1
  • 7

3 Answers3

3

Here is a step-by-step guide of doing it using ROS bloom:

  1. Navigate to your package path

    cd /path/to/package

  2. Use ROS bloom to create the .deb file

    bloom-generate rosdebian --os-name ubuntu --ros-distro kinetic fakeroot debian/rules binary

* If your ROS distribution is different from Kinetic, replace kinetic with your distribution

  1. Copy the .deb file to the other machine, and in its folder type

    sudo dpkg -i packagename.deb

    this will install the package on that machine, and you are now able to use it like any other ROS package

kotakotakota
  • 731
  • 8
  • 26
SubMachine
  • 487
  • 3
  • 11
2

1 - I think the ROS build farm would be a good starting point and solution for that. You cannot create a .deb as you said but, you can create a source closed ROS packages

The ROS build farm is also designed to enable deploying a custom build farm. This can be useful to release closed-source packages, build for platforms and architectures not provided by the official ROS build farm, and/or customize any part of the process to specific needs.

Take a look here for a better overview.

2 - Another approach would be using a CMake install. Although this will require the same architecture and ROS Distro between both your platforms and a location that can be the same for both machines.

Define a CMAKE_INSTALL_PREFIX for some location like: /opt/your_ros_install.
Run sudo make install to allow installing there.
Copy the install directory from machine A to machine B, using scp or tar or some other technique.

To run your installed ROS packages on either machine: source /opt/your_ros_install/setup.bash.

Vtik
  • 3,073
  • 2
  • 23
  • 38
1

Take a look at this post: Generate .deb from ROS package
Use the following commands:

path-of-your-package$ bloom-generate rosdebian --os-name ubuntu --ros-distro kinetic

$fakeroot debian/rules binary
Sardar Usama
  • 19,536
  • 9
  • 36
  • 58
Jue Wang
  • 11
  • 2
  • You could improve your answer by formatting it (https://meta.stackexchange.com/questions/22186/how-do-i-format-my-code-blocks). Also I think Wennn is using ROS Indigo, so shouldn't your command contain `--ros-distro indigo`? – NOhs Aug 03 '17 at 17:13