Skip to content

Commit

Permalink
PR #11100 from Tamir91: Add ROS2 build step for LibRealSense
Browse files Browse the repository at this point in the history
  • Loading branch information
Nir-Az committed Nov 17, 2022
2 parents 8dfd121 + 5cb6a78 commit 3902001
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 4 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/build-ROS2-package-CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: build_lrs_ROS2_package

on:
push:
branches: ['**']
pull_request:
branches: ['**']

jobs:

build_lrs_ros2_package:
runs-on: ubuntu-latest
strategy:
matrix:
ros_distribution:
- foxy
- galactic
- humble
- rolling

include:
# Foxy Fitzroy
- docker_image: ubuntu:focal
ros_distribution: foxy

# Galactic Geochelone
- docker_image: ubuntu:focal
ros_distribution: galactic

# Humble Hawksbill
- docker_image: ubuntu:jammy
ros_distribution: humble

# Rolling Ridley
- docker_image: ubuntu:jammy
ros_distribution: rolling

container:
image: ${{ matrix.docker_image }}
steps:

- name: setup ROS environment
uses: ros-tooling/setup-ros@v0.4
with:
required-ros-distributions: ${{ matrix.ros_distribution }}

- name: build librealsense ROS 2
uses: ros-tooling/action-ros-ci@v0.2
with:
target-ros2-distro: ${{ matrix.ros_distribution }}
skip-tests: true
colcon-defaults: | # We align the build flags to the librealsense2 ROS2 release build.
{
"build": {
"cmake-args": [
"-DBUILD_GRAPHICAL_EXAMPLES=OFF",
"-DBUILD_EXAMPLES=OFF"
]
}
}
8 changes: 4 additions & 4 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0"?>

<!-- This file is only used to enable the building librealsense2 -->
<!-- as a debian package for use with ROS (http://ros.org) -->
<!-- via catkin_make (which invokes cmake) -->
<!-- as a debian package for use with ROS 2 (http://ros.org) -->
<!-- via ament_cmake (which invokes cmake) -->

<package format="2">
<name>librealsense2</name>
Expand All @@ -20,7 +20,7 @@

<license>Apache License, Version 2.0</license>

<buildtool_depend>catkin</buildtool_depend>
<buildtool_depend>ament_cmake</buildtool_depend>

<build_depend>pkg-config</build_depend>

Expand All @@ -31,6 +31,6 @@
<build_depend>udev</build_depend>

<export>
<build_type>cmake</build_type>
<build_type>ament_cmake</build_type>
</export>
</package>

0 comments on commit 3902001

Please sign in to comment.