Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate .deb from catkin workspace in ROS

Tags:

ros

deb

catkin

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

like image 467
Wennn Avatar asked May 16 '16 08:05

Wennn


2 Answers

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

like image 98
SubMachine Avatar answered Nov 11 '22 02:11

SubMachine


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.

like image 2
Vtik Avatar answered Nov 11 '22 03:11

Vtik