Skip to content

Commit

Permalink
Jazzy support
Browse files Browse the repository at this point in the history
  • Loading branch information
Arun-Prasad-V committed Jun 7, 2024
1 parent 047d601 commit 4c66b3c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ros_distro: [rolling, iron, humble, foxy]
ros_distro: [rolling, iron, humble, foxy, jazzy]
include:
- ros_distro: 'rolling'
os: ubuntu-22.04
Expand All @@ -35,6 +35,8 @@ jobs:
os: ubuntu-22.04
- ros_distro: 'foxy'
os: ubuntu-20.04
- ros_distro: 'jazzy'
os: ubuntu-24.04

steps:

Expand All @@ -53,14 +55,14 @@ jobs:
./pr_check.sh
# [email protected] is the last version supporting foxy (EOL)
# [email protected] is needed to support humble/iron/rolling
# [email protected] is needed to support humble/iron/rolling/jazzy
# 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
- name: build ROS2 for humble/iron/rolling/jazzy
if: ${{ matrix.ros_distro != 'foxy' }}
uses: ros-tooling/[email protected]
with:
Expand Down Expand Up @@ -93,12 +95,12 @@ jobs:
# 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
export ROSDISTRO_INDEX_URL=https://raw.githubusercontent.com/ros/rosdistro/rolling/2024-04-30/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 ======================"
colcon build --cmake-args '-DBUILD_TOOLS=ON'
colcon build --cmake-args '-DBUILD_TOOLS=ON' --no-warn-unused-cli
## This step is commented out since we don't use rosbag files in "Run Tests" step below.
## Please uncomment when "Run Tests" step is fixed to run all tests.
Expand All @@ -114,9 +116,13 @@ jobs:

- name: Install Packages For Tests
run: |
sudo apt install python3-venv
python3 -m venv .venv
source .venv/bin/activate
sudo apt-get install python3-pip
pip3 install numpy --upgrade
pip3 install numpy-quaternion tqdm
pip3 install numpy-quaternion tqdm pyyaml
- name: Run Tests
run: |
Expand All @@ -126,7 +132,8 @@ jobs:
# 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
source ../.venv/bin/activate
../.venv/bin/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
Expand Down
6 changes: 5 additions & 1 deletion realsense2_camera/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Intel Corporation. All Rights Reserved.
# Copyright 2024 Intel Corporation. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -170,6 +170,10 @@ elseif("$ENV{ROS_DISTRO}" STREQUAL "rolling")
message(STATUS "Build for ROS2 Rolling")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DROLLING")
set(SOURCES "${SOURCES}" src/ros_param_backend.cpp)
elseif("$ENV{ROS_DISTRO}" STREQUAL "jazzy")
message(STATUS "Build for ROS2 Jazzy")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DJAZZY")
set(SOURCES "${SOURCES}" src/ros_param_backend.cpp)
else()
message(FATAL_ERROR "Unsupported ROS Distribution: " "$ENV{ROS_DISTRO}")
endif()
Expand Down

0 comments on commit 4c66b3c

Please sign in to comment.