Skip to content

Commit

Permalink
Merge branch 'ros2-development' into ros2-hkr
Browse files Browse the repository at this point in the history
  • Loading branch information
SamerKhshiboun committed May 12, 2024
2 parents 31ec61f + bb039b5 commit cc50b27
Show file tree
Hide file tree
Showing 14 changed files with 437 additions and 37 deletions.
42 changes: 34 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,24 @@ jobs:
strategy:
fail-fast: false
matrix:
ros_distro: [rolling, iron, humble]
ros_distro: [rolling, iron, humble, foxy]
include:
- ros_distro: 'rolling'
os: ubuntu-22.04
- ros_distro: 'iron'
os: ubuntu-22.04
- ros_distro: 'humble'
os: ubuntu-22.04
- ros_distro: 'foxy'
os: ubuntu-20.04

steps:

- name: Setup ROS2 Workspace
run: |
mkdir -p ${{github.workspace}}/ros2/src
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: 'ros2/src/realsense-ros'

Expand All @@ -50,13 +52,27 @@ jobs:
cd ${{github.workspace}}/ros2/src/realsense-ros/scripts
./pr_check.sh
- name: build ROS2
# [email protected] is the last version supporting foxy (EOL)
# [email protected] is needed to support humble/iron/rolling
# so, seperating steps with if conditions
- name: build ROS2 for foxy
if: ${{ matrix.ros_distro == 'foxy' }}
uses: ros-tooling/[email protected]
with:
required-ros-distributions: ${{ matrix.ros_distro }}
- name: build ROS2 for humble/iron/rolling
if: ${{ matrix.ros_distro != 'foxy' }}
uses: ros-tooling/[email protected]
with:
required-ros-distributions: ${{ matrix.ros_distro }}

- name: Build RealSense SDK 2.0 from source
- name: Build RealSense SDK 2.0 (development branch) from source
run: |
# libusb-1.0-0-dev is needed for librealsense build in ubuntu 20.04
# This apt install command will be ignored in ubuntu 22.04 as libusb-1.0-0-dev already installed there
sudo apt install -y libusb-1.0-0-dev
cd ${{github.workspace}}
git clone https://github.com/IntelRealSense/librealsense.git -b development
cd librealsense
Expand All @@ -68,13 +84,17 @@ jobs:
sudo make -j10
sudo make install
- name: Build RealSense ROS2 Wrapper
run: |
- name: Build RealSense ROS2 Wrapper from source
run: |
echo "source /opt/ros/${{ matrix.ros_distro }}/setup.bash" >> ${{github.workspace}}/.bashrc
source ${{github.workspace}}/.bashrc
cd ${{github.workspace}}/ros2
echo "================= ROSDEP UPDATE ====================="
rosdep update --rosdistro ${{ matrix.ros_distro }}
# temp fix for rolling sources.. TODO: track when we can remove the two commands below
# see https://discourse.ros.org/t/psa-rolling-ci-or-docker-build-fix-from-rosdep-errors-in-24-04-transition/36902
sudo sed -i "s|ros\/rosdistro\/master|ros\/rosdistro\/rolling\/2024-02-28|" /etc/ros/rosdep/sources.list.d/20-default.list
export ROSDISTRO_INDEX_URL=https://raw.githubusercontent.com/ros/rosdistro/rolling/2024-02-28/index-v4.yaml
rosdep update --rosdistro ${{ matrix.ros_distro }} --include-eol-distros
echo "================= ROSDEP INSTALL ===================="
rosdep install -i --reinstall --from-path src --rosdistro ${{ matrix.ros_distro }} --skip-keys=librealsense2 -y
echo "================== COLCON BUILD ======================"
Expand Down Expand Up @@ -103,10 +123,16 @@ jobs:
cd ${{github.workspace}}/ros2
source ${{github.workspace}}/.bashrc
. install/local_setup.bash
# the next command might be needed for foxy distro, since this package is not installed
# by default in ubuntu 20.04. For other distro, the apt install command will be ignored.
sudo apt install -y ros-${{matrix.ros_distro}}-sensor-msgs-py
python3 src/realsense-ros/realsense2_camera/scripts/rs2_test.py non_existent_file
# don't run integration tests for foxy since some testing dependecies packages like
# tf_ros_py are not avaialble
# TODO: check when we can run integration tests on rolling
- name: Run integration tests
if: ${{ matrix.ros_distro != 'rolling'}}
if: ${{ matrix.ros_distro != 'rolling' && matrix.ros_distro != 'foxy' }}
run: |
cd ${{github.workspace}}/ros2
source ${{github.workspace}}/.bashrc
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ jobs:
BASEDIR: ${{ github.workspace }}/.work

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: industrial_ci
uses: ros-industrial/industrial_ci@master
7 changes: 7 additions & 0 deletions Intel Copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright (2017-2024), Intel Corporation.
This "Software" is furnished under license and may only be used or copied in accordance with the terms of that license.
No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted by this document.
The Software is subject to change without notice, and should not be construed as a commitment by Intel Corporation to market, license, sell or support any product or technology.
Unless otherwise provided for in the license under which this Software is provided, the Software is provided AS IS, with no warranties of any kind, express or implied.
Except as expressly permitted by the Software license, neither Intel Corporation nor its suppliers assumes any responsibility or liability for any errors or inaccuracies that may appear herein.
Except as expressly permitted by the Software license, no part of the Software may be reproduced, stored in a retrieval system, transmitted in any form, or distributed by any means without the express written consent of Intel Corporation.
4 changes: 0 additions & 4 deletions NOTICE

This file was deleted.

Loading

0 comments on commit cc50b27

Please sign in to comment.