Skip to content

Commit

Permalink
remove cv_bridge from dependencies and add workflows for building and…
Browse files Browse the repository at this point in the history
… release (#1)

* remove cv_bridge from dependencies and add workflows for building and release

* change working directory of the workflow

* change container for running the building workflow

* change working-directory as local path

* add installation for ros-foxy-image-transport

* installation of realsense-camera-msgs and realsense2-description

* add required installation before fakeroot

* remove comma

* remove the installation of a few packages and try again

* change sensor-msg to sensor-msgs

* add installation of ros-foxy-tf2-ros

* add ros-foxy-geometry-msgs and ros-foxy-builtin-interfaces

* add path for opencv in CMakeLists.txt

* change the package name in changelog

* update release workflow
  • Loading branch information
JohnnyLiu2886 authored Apr 19, 2024
1 parent c846694 commit ed5748c
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 14 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Test build DEB package
on:
pull_request:
types:
- opened
- reopened
- synchronize
push:
branches:
- "clearbot/realsense2_camera"

jobs:
build-debian:
runs-on: ARM64
container: asia-docker.pkg.dev/clearbot-360312/clearbot-public/ros-foxy-cuda:latest
steps:
- uses: actions/checkout@v3
- name: Setup apt repo
env:
APTSERVER_USER: ${{ secrets.APTSERVER_USER }}
APTSERVER_PASSWORD: ${{ secrets.APTSERVER_PASSWORD }}
run: |
sudo apt update
sudo apt install -y wget software-properties-common
wget -qO - https://aptserver.clearbot.dev/pubkey | sudo apt-key add -
echo "machine https://aptserver.clearbot.dev\nlogin $APTSERVER_USER\npassword $APTSERVER_PASSWORD" >> /etc/apt/auth.conf.d/clearbot.conf
sudo add-apt-repository 'deb https://aptserver.clearbot.dev focal main'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE
sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" -u
working-directory: ./
- name: Install dependencies
run: |
sudo apt -y update
sudo apt install -y dh-make fakeroot opencv-libs opencv-main opencv-python opencv-dev libboost-all-dev ros-foxy-clearbot-cv-bridge ros-foxy-image-transport ros-foxy-realsense2-camera-msgs ros-foxy-realsense2-description ros-foxy-geometry-msgs ros-foxy-launch-ros librealsense2-utils librealsense2-dev ros-foxy-nav-msgs ros-foxy-rclcpp ros-foxy-rclcpp-components ros-foxy-realsense2-camera-msgs ros-foxy-sensor-msgs ros-foxy-tf2 ros-foxy-tf2-ros ros-foxy-ros-workspace ros-foxy-builtin-interfaces ros-foxy-diagnostic-updater
working-directory: ./
- name: fakeroot
run: fakeroot debian/rules binary
working-directory: ./
- name: Debian file
id: deb-file-name
run: |
cd .. && echo DEB_FILE="$(pwd)/$(find . -name "ros-foxy-clearbot-realsense2-camera*.deb" | sed -r 's/^.{2}//')" >> "$GITHUB_OUTPUT"
working-directory: ./
- name: Export deb file artifact
uses: actions/upload-artifact@v3
with:
name: built deb file
path: ${{ steps.deb-file-name.outputs.DEB_FILE }}
if-no-files-found: error
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release DEB package
on:
release:
types: [published]

jobs:
build-debian:
runs-on: ARM64
container: asia-docker.pkg.dev/clearbot-360312/clearbot-public/ros-foxy-cuda:latest
steps:
- uses: actions/checkout@v3
- name: Setup apt repo
env:
APTSERVER_USER: ${{ secrets.APTSERVER_USER }}
APTSERVER_PASSWORD: ${{ secrets.APTSERVER_PASSWORD }}
run: |
sudo apt update
sudo apt install -y wget software-properties-common curl
wget -qO - https://aptserver.clearbot.dev/pubkey | sudo apt-key add -
echo "machine https://aptserver.clearbot.dev\nlogin $APTSERVER_USER\npassword $APTSERVER_PASSWORD" >> /etc/apt/auth.conf.d/clearbot.conf
sudo add-apt-repository 'deb https://aptserver.clearbot.dev focal main'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE
sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" -u
working-directory: ./
- name: Install dependencies
run: |
sudo apt -y update
sudo apt install -y dh-make fakeroot opencv-libs opencv-main opencv-python opencv-dev libboost-all-dev ros-foxy-clearbot-cv-bridge ros-foxy-image-transport ros-foxy-realsense2-camera-msgs ros-foxy-realsense2-description ros-foxy-geometry-msgs ros-foxy-launch-ros librealsense2-utils librealsense2-dev ros-foxy-nav-msgs ros-foxy-rclcpp ros-foxy-rclcpp-components ros-foxy-realsense2-camera-msgs ros-foxy-sensor-msgs ros-foxy-tf2 ros-foxy-tf2-ros ros-foxy-ros-workspace ros-foxy-builtin-interfaces ros-foxy-diagnostic-updater
working-directory: ./
- name: fakeroot
run: fakeroot debian/rules binary
working-directory: ./
- name: Debian file
id: deb-file-name
run: |
cd .. && echo DEB_FILE="$(pwd)/$(find . -name "ros-foxy-clearbot-realsense2-camera*.deb" | sed -r 's/^.{2}//')" >> "$GITHUB_OUTPUT"
working-directory: ./
- name: Upload to aptserver
env:
APTSERVER_USER: ${{ secrets.APTSERVER_USER }}
APTSERVER_PASSWORD: ${{ secrets.APTSERVER_PASSWORD }}
FILENAME: ${{ steps.deb-file-name.outputs.DEB_FILE }}
run: cd .. && curl -X POST -u $APTSERVER_USER:$APTSERVER_PASSWORD -F file=@$FILENAME https://aptserver.clearbot.dev/api/files/clearbot-realsense2-camera
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ endif()

find_package(ament_cmake REQUIRED)
find_package(builtin_interfaces REQUIRED)
find_package(cv_bridge REQUIRED)
find_package(image_transport REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rclcpp_components REQUIRED)
Expand All @@ -109,6 +108,9 @@ endif()
#set(CMAKE_NO_SYSTEM_FROM_IMPORTED true)
include_directories(include)

find_package (OpenCV 4.5.5 REQUIRED)
include_directories ("/usr/include/opencv4/")

set(node_plugins "")

set(SOURCES
Expand Down Expand Up @@ -192,7 +194,6 @@ target_link_libraries(${PROJECT_NAME}
)

set(dependencies
cv_bridge
image_transport
rclcpp
rclcpp_components
Expand Down
12 changes: 6 additions & 6 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ros-foxy-realsense2-camera (4.51.1-1focal) focal; urgency=high
ros-foxy-clearbot-realsense2-camera (4.51.1-1focal) focal; urgency=high

* Fix crash when activating IMU & aligned depth together
* Fix rosbag device loading by preventing set_option to HDR/Gain/Exposure
Expand All @@ -15,14 +15,14 @@ ros-foxy-realsense2-camera (4.51.1-1focal) focal; urgency=high

-- LibRealSense ROS Team <[email protected]> Mon, 12 Sep 2022 21:00:00 -0000

ros-foxy-realsense2-camera (4.0.4-1focal) focal; urgency=high
ros-foxy-clearbot-realsense2-camera (4.0.4-1focal) focal; urgency=high

* fix required packages for building debians for ros2-beta branch
* Contributors: NirAz

-- LibRealSense ROS Team <[email protected]> Sat, 19 Mar 2022 22:00:00 -0000

ros-foxy-realsense2-camera (4.0.3-1focal) focal; urgency=high
ros-foxy-clearbot-realsense2-camera (4.0.3-1focal) focal; urgency=high

* Support intra-process zero-copy
* Update README
Expand All @@ -32,7 +32,7 @@ ros-foxy-realsense2-camera (4.0.3-1focal) focal; urgency=high

-- LibRealSense ROS Team <[email protected]> Tue, 15 Mar 2022 22:00:00 -0000

ros-foxy-realsense2-camera (4.0.2-1focal) focal; urgency=high
ros-foxy-clearbot-realsense2-camera (4.0.2-1focal) focal; urgency=high

* version 4.4.0 changed to 4.0.0 in CHANGELOG
* add frequency monitoring to /diagnostics topic.
Expand All @@ -47,7 +47,7 @@ ros-foxy-realsense2-camera (4.0.2-1focal) focal; urgency=high

-- Doron Hirshberg <[email protected]> Wed, 23 Feb 2022 22:00:00 -0000

ros-foxy-realsense2-camera (4.0.1-1focal) focal; urgency=high
ros-foxy-clearbot-realsense2-camera (4.0.1-1focal) focal; urgency=high

* fix reset issue when multiple devices are connected
* fix /rosout issue
Expand All @@ -62,7 +62,7 @@ ros-foxy-realsense2-camera (4.0.1-1focal) focal; urgency=high

-- Doron Hirshberg <[email protected]> Mon, 31 Jan 2022 22:00:00 -0000

ros-foxy-realsense2-camera (4.0.0-1focal) focal; urgency=high
ros-foxy-clearbot-realsense2-camera (4.0.0-1focal) focal; urgency=high

* changed parameters:
- "stereo_module", "l500_depth_sensor" are replaced by "depth_module"
Expand Down
8 changes: 4 additions & 4 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Source: ros-foxy-realsense2-camera
Source: ros-foxy-clearbot-realsense2-camera
Section: misc
Priority: optional
Maintainer: LibRealSense ROS Team <[email protected]>
Build-Depends: debhelper (>= 9.0.0), libeigen3-dev, ros-foxy-ament-cmake, ros-foxy-builtin-interfaces, ros-foxy-cv-bridge, ros-foxy-diagnostic-updater, ros-foxy-geometry-msgs, ros-foxy-image-transport, ros-foxy-librealsense2, ros-foxy-nav-msgs, ros-foxy-rclcpp, ros-foxy-rclcpp-components, ros-foxy-realsense2-camera-msgs, ros-foxy-ros-environment, ros-foxy-sensor-msgs, ros-foxy-std-msgs, ros-foxy-tf2, ros-foxy-tf2-ros, ros-foxy-ros-workspace
Build-Depends: debhelper (>= 9.0.0), libeigen3-dev, ros-foxy-ament-cmake, ros-foxy-builtin-interfaces, ros-foxy-clearbot-cv-bridge, ros-foxy-diagnostic-updater, ros-foxy-geometry-msgs, ros-foxy-image-transport, ros-foxy-librealsense2, ros-foxy-nav-msgs, ros-foxy-rclcpp, ros-foxy-rclcpp-components, ros-foxy-realsense2-camera-msgs, ros-foxy-ros-environment, ros-foxy-sensor-msgs, ros-foxy-std-msgs, ros-foxy-tf2, ros-foxy-tf2-ros, ros-foxy-ros-workspace
Homepage: http://www.ros.org/wiki/RealSense
Standards-Version: 3.9.2

Package: ros-foxy-realsense2-camera
Package: ros-foxy-clearbot-realsense2-camera
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libeigen3-dev, ros-foxy-builtin-interfaces, ros-foxy-cv-bridge, ros-foxy-diagnostic-updater, ros-foxy-geometry-msgs, ros-foxy-image-transport, ros-foxy-launch-ros, ros-foxy-librealsense2, ros-foxy-nav-msgs, ros-foxy-rclcpp, ros-foxy-rclcpp-components, ros-foxy-realsense2-camera-msgs, ros-foxy-sensor-msgs, ros-foxy-std-msgs, ros-foxy-tf2, ros-foxy-tf2-ros, ros-foxy-ros-workspace
Depends: ${shlibs:Depends}, ${misc:Depends}, libeigen3-dev, ros-foxy-builtin-interfaces, ros-foxy-clearbot-cv-bridge, ros-foxy-diagnostic-updater, ros-foxy-geometry-msgs, ros-foxy-image-transport, ros-foxy-launch-ros, ros-foxy-librealsense2, ros-foxy-nav-msgs, ros-foxy-rclcpp, ros-foxy-rclcpp-components, ros-foxy-realsense2-camera-msgs, ros-foxy-sensor-msgs, ros-foxy-std-msgs, ros-foxy-tf2, ros-foxy-tf2-ros, ros-foxy-ros-workspace
Description: RealSense camera package allowing access to Intel T265 Tracking module and SR300 and D400 3D cameras
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ override_dh_shlibdeps:
# in the install tree and source it. It will set things like
# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
if [ -f "/opt/ros/foxy/setup.sh" ]; then . "/opt/ros/foxy/setup.sh"; fi && \
dh_shlibdeps -l$(CURDIR)/debian/ros-foxy-realsense2-camera//opt/ros/foxy/lib/
dh_shlibdeps -l$(CURDIR)/debian/ros-foxy-clearbot-realsense2-camera//opt/ros/foxy/lib/

override_dh_auto_install:
# In case we're installing to a non-standard location, look for a setup.sh
Expand Down
1 change: 0 additions & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<buildtool_depend>ament_cmake</buildtool_depend>
<depend>eigen</depend>
<depend>builtin_interfaces</depend>
<depend>cv_bridge</depend>
<depend>image_transport</depend>
<depend>librealsense2</depend>
<depend>rclcpp</depend>
Expand Down

0 comments on commit ed5748c

Please sign in to comment.