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

Revision history [back]

Yes, of course. The easiest is to generate debian packages using bloom. Then users can simply install them on their computer as normal package. There are many informations about this in ROS wiki and industrial_ci supports also some pre-release checks which are good to do before you generate packages.

Here is an part of the script how we do this in a project using GH-Actions to automatically generate packages. The commands are actually bash-compatible, so you should be able to replicate things locally.

- name: Industial CI build
  uses: 'ros-industrial/industrial_ci@master'

- name: Install deployment dependencies  # other dependencies should be already installed by industrial_ci
  run: |
    sudo DEBIAN_FRONTEND=noninteractive apt -y install python3-catkin-tools fakeroot python3-argcomplete python3-bloom dh-make

- name: Generate DEBs
  env:
    PACKAGE_SOURCE_DIR: ${{ env.BASEDIR }}/target_ws/src/PACKAGE/
  run: |
    ls -al ${{ env.BASEDIR }}
    ls -al ${{ env.BASEDIR }}/target_ws/src/PACKAGE
    source ${{ env.BASEDIR }}/target_ws/install/setup.bash

    cd ${{ env.BASEDIR }}

    bloom-generate rosdebian --os-name ubuntu --os-version ${{ env.OS_CODE_NAME }} --ros-distro ${{ env.ROS_DISTRO }} ${{ env.PACKAGE_SOURCE_DIR }}
    mv debian ${{ env.PACKAGE_SOURCE_DIR }}
    cd ${{ env.PACKAGE_SOURCE_DIR }}
    echo "Building debian package"
    fakeroot debian/rules binary

    rm -r obj-x86_64-linux-gnu
    rm -r debian

    cd ${{ env.PACKAGE_SOURCE_DIR }}/..
    echo "All generated packages: "
    ls -al ros-${ROS_DISTRO}-*deb
    deb_name_original=`ls ros-${ROS_DISTRO}-*amd64.deb`
    deb_name="${deb_name_original:0:${#deb_name_original}-4}"
    deb_name="${deb_name}.deb"
    mv $deb_name_original $deb_name
    echo "Current generated deb is: $deb_name"
    ls -al ros-${ROS_DISTRO}-*deb

    # Install PACKAGE dependencies and test install the package
    sudo DEBIAN_FRONTEND=noninteractive apt -y install ./$deb_name
    sudo DEBIAN_FRONTEND=noninteractive apt --fix-broken -y install
    sudo DEBIAN_FRONTEND=noninteractive apt -y install ./$deb_name

    sudo apt remove -y ros-${ROS_DISTRO}-package