-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ros2-development' into ros2-hkr
- Loading branch information
Showing
14 changed files
with
437 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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' | ||
|
||
|
@@ -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 | ||
|
@@ -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 ======================" | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
Oops, something went wrong.