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 6, 2024
1 parent 047d601 commit ea536cb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
12 changes: 7 additions & 5 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
# setup-ros@v0.6 is the last version supporting foxy (EOL)
# setup-ros@v0.7 is needed to support humble/iron/rolling
# setup-ros@v0.7 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/setup-ros@v0.6
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/setup-ros@v0.7
with:
Expand Down Expand Up @@ -92,8 +94,8 @@ jobs:
echo "================= ROSDEP UPDATE ====================="
# 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
#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
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ jobs:
strategy:
fail-fast: false
matrix:
ros_distro: [iron, humble]
ros_distro: [iron, humble, jazzy]
include:
- ros_distro: 'iron'
os: ubuntu-22.04
- ros_distro: 'humble'
os: ubuntu-22.04
- ros_distro: 'jazzy'
os: ubuntu-24.04

env:
ROS_DISTRO: ${{ matrix.ros_distro }}
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 ea536cb

Please sign in to comment.