Skip to content

Commit

Permalink
add iron to CMakeList.txt
Browse files Browse the repository at this point in the history
update readme
  • Loading branch information
SamerKhshiboun committed Jun 21, 2023
1 parent 0e89444 commit 79956fe
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 29 deletions.
21 changes: 6 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
strategy:
fail-fast: false
matrix:
ros_distro: [rolling, humble, galactic, foxy]
ros_distro: [rolling, iron, humble]
include:
- ros_distro: 'rolling'
os: ubuntu-22.04
- ros_distro: 'humble'
os: ubuntu-22.04
- ros_distro: 'iron'
os: ubuntu-22.04
- ros_distro: 'humble'
os: ubuntu-22.04

steps:

Expand All @@ -48,24 +48,15 @@ jobs:
cd ${{github.workspace}}/ros2/src/realsense-ros/scripts
./pr_check.sh
# Workaround - forcing cmake 3.23.0 instead of using latest cmake of GHA.
# cmake 3.24.0 is not compaitable with galactic/foxy/humble ament_cmake
# see: https://github.com/ament/ament_cmake/pull/395
# TODO: remove this step once ament_cmake for galactic/foxy/humble is released
- name: Setup cmake 3.23.0
uses: jwlawson/[email protected]
with:
cmake-version: '3.23.0'

- name: build ROS2
uses: ros-tooling/setup-ros@v0.3
uses: ros-tooling/setup-ros@v0.6
with:
required-ros-distributions: ${{ matrix.ros_distro }}

- name: Build RealSense SDK 2.0 from source
run: |
cd ${{github.workspace}}
git clone https://github.com/IntelRealSense/librealsense.git -b master
git clone https://github.com/IntelRealSense/librealsense.git -b development
cd librealsense
sudo mkdir build
cd build
Expand All @@ -75,7 +66,7 @@ jobs:
sudo make -j10
sudo make install
- name: Build
- name: Build RealSense ROS2 Wrapper
run: |
echo "source /opt/ros/${{ matrix.ros_distro }}/setup.bash" >> ${{github.workspace}}/.bashrc
source ${{github.workspace}}/.bashrc
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ jobs:
strategy:
fail-fast: false
matrix:
ros_distro: [humble, iron]
ros_distro: [humble]
include:
- ros_distro: 'humble'
os: ubuntu-22.04
- ros_distro: 'iron'
os: ubuntu-22.04

env:
ROS_DISTRO: ${{ matrix.ros_distro }}
Expand Down
17 changes: 6 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@


[![rolling][rolling-badge]][rolling]
[![iron][iron-badge]][iron]
[![humble][humble-badge]][humble]
[![foxy][foxy-badge]][foxy]
[![galactic][galactic-badge]][galactic]
[![ubuntu22][ubuntu22-badge]][ubuntu22]
[![ubuntu20][ubuntu20-badge]][ubuntu20]

Expand Down Expand Up @@ -89,10 +88,8 @@
</summary>

- #### Ubuntu 22.04:
- [ROS2 Iron](https://docs.ros.org/en/iron/Installation/Ubuntu-Install-Debians.html)
- [ROS2 Humble](https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html)
- #### Ubuntu 20.04:
- [ROS2 Foxy](https://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html)
- [ROS2 Galactic](https://docs.ros.org/en/galactic/Installation/Ubuntu-Install-Debians.html) (deprecated)

</details>

Expand Down Expand Up @@ -156,7 +153,7 @@

- Source environment
```bash
ROS_DISTRO=<YOUR_SYSTEM_ROS_DISTRO> # set your ROS_DISTRO: humble, galactic, foxy
ROS_DISTRO=<YOUR_SYSTEM_ROS_DISTRO> # set your ROS_DISTRO: iron, humble
source /opt/ros/$ROS_DISTRO/setup.bash
cd ~/ros2_ws
. install/local_setup.bash
Expand Down Expand Up @@ -470,7 +467,7 @@ Our ROS2 Wrapper node supports zero-copy communications if loaded in the same pr

You will need to launch a component container and launch our node as a component together with other component nodes. Further details on "Composing multiple nodes in a single process" can be found [here](https://docs.ros.org/en/rolling/Tutorials/Composition.html).

Further details on efficient intra-process communication can be found [here](https://docs.ros.org/en/foxy/Tutorials/Intra-Process-Communication.html#efficient-intra-process-communication).
Further details on efficient intra-process communication can be found [here](https://docs.ros.org/en/humble/Tutorials/Intra-Process-Communication.html#efficient-intra-process-communication).

### Example
#### Manually loading multiple components into the same process
Expand Down Expand Up @@ -513,10 +510,8 @@ ros2 launch realsense2_camera rs_intra_process_demo_launch.py intra_process_comm
[rolling]: https://docs.ros.org/en/rolling/index.html
[humble-badge]: https://img.shields.io/badge/-HUMBLE-orange?style=flat-square&logo=ros
[humble]: https://docs.ros.org/en/humble/index.html
[foxy-badge]: https://img.shields.io/badge/-FOXY-orange?style=flat-square&logo=ros
[foxy]: https://docs.ros.org/en/foxy/index.html
[galactic-badge]: https://img.shields.io/badge/-GALACTIC-orange?style=flat-square&logo=ros
[galactic]: https://docs.ros.org/en/galactic/index.html
[iron-badge]: https://img.shields.io/badge/-IRON-orange?style=flat-square&logo=ros
[iron]: https://docs.ros.org/en/iron/index.html
[ubuntu22-badge]: https://img.shields.io/badge/-UBUNTU%2022%2E04-blue?style=flat-square&logo=ubuntu&logoColor=white
[ubuntu22]: https://releases.ubuntu.com/jammy/
[ubuntu20-badge]: https://img.shields.io/badge/-UBUNTU%2020%2E04-blue?style=flat-square&logo=ubuntu&logoColor=white
Expand Down
4 changes: 4 additions & 0 deletions realsense2_camera/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ elseif("$ENV{ROS_DISTRO}" STREQUAL "humble")
message(STATUS "Build for ROS2 Humble")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHUMBLE")
set(SOURCES "${SOURCES}" src/ros_param_backend_foxy.cpp)
elseif("$ENV{ROS_DISTRO}" STREQUAL "iron")
message(STATUS "Build for ROS2 Iron")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DIRON")
set(SOURCES "${SOURCES}" src/ros_param_backend_foxy.cpp)
elseif("$ENV{ROS_DISTRO}" STREQUAL "rolling")
message(STATUS "Build for ROS2 Rolling")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DROLLING")
Expand Down

0 comments on commit 79956fe

Please sign in to comment.