From 722ae60e534891805774bb1550b947483b93eb18 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 13:46:55 +0300 Subject: [PATCH 01/32] Test debian build --- .github/workflows/upload-debians.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/upload-debians.yaml diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml new file mode 100644 index 00000000..661340bc --- /dev/null +++ b/.github/workflows/upload-debians.yaml @@ -0,0 +1,22 @@ +name: Build + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + build_debians: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + path: psdk_ros2 + - uses: actions/checkout@v4 + with: + repository: dji-sdk/Payload-SDK + ref: 3.5 + path: Payload-SDK + - name: ROS 2 Build Debian Package + uses: ichiro-its/ros2-build-debian-action@v0.1.0 + with: + ros2-distro: humble From bac3d71e03a6ab75eb1ef928253292ff834196a2 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 14:47:22 +0300 Subject: [PATCH 02/32] Test debian build --- .github/workflows/upload-debians.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml index 661340bc..25adf072 100644 --- a/.github/workflows/upload-debians.yaml +++ b/.github/workflows/upload-debians.yaml @@ -17,6 +17,11 @@ jobs: ref: 3.5 path: Payload-SDK - name: ROS 2 Build Debian Package - uses: ichiro-its/ros2-build-debian-action@v0.1.0 - with: - ros2-distro: humble + run: | + echo "yaml file:///rosdep.yaml" >> /etc/ros/rosdep/sources.list.d/50-my-packages.list + echo "psdk_interfaces:\n ubuntu: [ros-humble-psdk-interfaces]" >> /rosdep.yaml + apt update && apt install -y python3-pip dpkg-dev debhelper dh-python && pip3 install bloom + rosdep update + + + From d64c95d93d048b4c33bfdd4c0177c9e28162a199 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 14:49:07 +0300 Subject: [PATCH 03/32] Test debian build --- .github/workflows/upload-debians.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml index 25adf072..e666900e 100644 --- a/.github/workflows/upload-debians.yaml +++ b/.github/workflows/upload-debians.yaml @@ -18,10 +18,10 @@ jobs: path: Payload-SDK - name: ROS 2 Build Debian Package run: | + touch /etc/ros/rosdep/sources.list.d/50-my-packages.list echo "yaml file:///rosdep.yaml" >> /etc/ros/rosdep/sources.list.d/50-my-packages.list + touch /rosdep.yaml echo "psdk_interfaces:\n ubuntu: [ros-humble-psdk-interfaces]" >> /rosdep.yaml apt update && apt install -y python3-pip dpkg-dev debhelper dh-python && pip3 install bloom rosdep update - - From 716ef717c3cf4be1118e2a6c2604db8ef8171730 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 14:59:01 +0300 Subject: [PATCH 04/32] Test debian build --- .github/workflows/upload-debians.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml index e666900e..3a2bc606 100644 --- a/.github/workflows/upload-debians.yaml +++ b/.github/workflows/upload-debians.yaml @@ -18,10 +18,8 @@ jobs: path: Payload-SDK - name: ROS 2 Build Debian Package run: | - touch /etc/ros/rosdep/sources.list.d/50-my-packages.list + apt update && apt install -y python3-pip dpkg-dev debhelper dh-python && pip3 install rosdep bloom echo "yaml file:///rosdep.yaml" >> /etc/ros/rosdep/sources.list.d/50-my-packages.list - touch /rosdep.yaml echo "psdk_interfaces:\n ubuntu: [ros-humble-psdk-interfaces]" >> /rosdep.yaml - apt update && apt install -y python3-pip dpkg-dev debhelper dh-python && pip3 install bloom rosdep update From 773a6e46ce58299ff629bb83e384629a4c96de2e Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 15:00:42 +0300 Subject: [PATCH 05/32] Test debian build --- .github/workflows/upload-debians.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml index 3a2bc606..60772fc5 100644 --- a/.github/workflows/upload-debians.yaml +++ b/.github/workflows/upload-debians.yaml @@ -18,7 +18,7 @@ jobs: path: Payload-SDK - name: ROS 2 Build Debian Package run: | - apt update && apt install -y python3-pip dpkg-dev debhelper dh-python && pip3 install rosdep bloom + sudo apt update && sudo apt install -y python3-pip dpkg-dev debhelper dh-python && pip3 install rosdep bloom echo "yaml file:///rosdep.yaml" >> /etc/ros/rosdep/sources.list.d/50-my-packages.list echo "psdk_interfaces:\n ubuntu: [ros-humble-psdk-interfaces]" >> /rosdep.yaml rosdep update From 8f1e93e19237d6dab259f586446b015008949557 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 15:02:33 +0300 Subject: [PATCH 06/32] Test debian build --- .github/workflows/upload-debians.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml index 60772fc5..f5a8f368 100644 --- a/.github/workflows/upload-debians.yaml +++ b/.github/workflows/upload-debians.yaml @@ -19,7 +19,7 @@ jobs: - name: ROS 2 Build Debian Package run: | sudo apt update && sudo apt install -y python3-pip dpkg-dev debhelper dh-python && pip3 install rosdep bloom + rosdep update echo "yaml file:///rosdep.yaml" >> /etc/ros/rosdep/sources.list.d/50-my-packages.list echo "psdk_interfaces:\n ubuntu: [ros-humble-psdk-interfaces]" >> /rosdep.yaml - rosdep update From 8e17fd2905b9e5098e3284aa2075fc2aa2f8f194 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 15:04:03 +0300 Subject: [PATCH 07/32] Test debian build --- .github/workflows/upload-debians.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml index f5a8f368..1da11cce 100644 --- a/.github/workflows/upload-debians.yaml +++ b/.github/workflows/upload-debians.yaml @@ -19,7 +19,7 @@ jobs: - name: ROS 2 Build Debian Package run: | sudo apt update && sudo apt install -y python3-pip dpkg-dev debhelper dh-python && pip3 install rosdep bloom - rosdep update + sudo rosdep init echo "yaml file:///rosdep.yaml" >> /etc/ros/rosdep/sources.list.d/50-my-packages.list echo "psdk_interfaces:\n ubuntu: [ros-humble-psdk-interfaces]" >> /rosdep.yaml - + sudo rosdep update From 81c1cd2795d65433f44b7a60c91573072144f7f8 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 15:05:27 +0300 Subject: [PATCH 08/32] Test debian build --- .github/workflows/upload-debians.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml index 1da11cce..87cec805 100644 --- a/.github/workflows/upload-debians.yaml +++ b/.github/workflows/upload-debians.yaml @@ -19,7 +19,7 @@ jobs: - name: ROS 2 Build Debian Package run: | sudo apt update && sudo apt install -y python3-pip dpkg-dev debhelper dh-python && pip3 install rosdep bloom - sudo rosdep init + rosdep init echo "yaml file:///rosdep.yaml" >> /etc/ros/rosdep/sources.list.d/50-my-packages.list echo "psdk_interfaces:\n ubuntu: [ros-humble-psdk-interfaces]" >> /rosdep.yaml - sudo rosdep update + rosdep update From c0751ba7cbbff7f65a643bb45a2b95f69e0600a1 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 15:09:09 +0300 Subject: [PATCH 09/32] Test debian build --- .github/workflows/upload-debians.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml index 87cec805..fdcb840c 100644 --- a/.github/workflows/upload-debians.yaml +++ b/.github/workflows/upload-debians.yaml @@ -19,7 +19,7 @@ jobs: - name: ROS 2 Build Debian Package run: | sudo apt update && sudo apt install -y python3-pip dpkg-dev debhelper dh-python && pip3 install rosdep bloom - rosdep init + mkdir -p /etc/ros/rosdep/sources.list.d echo "yaml file:///rosdep.yaml" >> /etc/ros/rosdep/sources.list.d/50-my-packages.list echo "psdk_interfaces:\n ubuntu: [ros-humble-psdk-interfaces]" >> /rosdep.yaml rosdep update From 1abdb2bc819625e62de8028a02c1f269c3f90b53 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 15:12:53 +0300 Subject: [PATCH 10/32] Test debian build --- .github/workflows/upload-debians.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml index fdcb840c..5e307154 100644 --- a/.github/workflows/upload-debians.yaml +++ b/.github/workflows/upload-debians.yaml @@ -19,7 +19,7 @@ jobs: - name: ROS 2 Build Debian Package run: | sudo apt update && sudo apt install -y python3-pip dpkg-dev debhelper dh-python && pip3 install rosdep bloom - mkdir -p /etc/ros/rosdep/sources.list.d + sudo mkdir -p /etc/ros/rosdep/sources.list.d echo "yaml file:///rosdep.yaml" >> /etc/ros/rosdep/sources.list.d/50-my-packages.list echo "psdk_interfaces:\n ubuntu: [ros-humble-psdk-interfaces]" >> /rosdep.yaml rosdep update From af29de56a1995107a34462f3e3818bc721b48c68 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 15:15:03 +0300 Subject: [PATCH 11/32] Test debian build --- .github/workflows/upload-debians.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml index 5e307154..4baa857f 100644 --- a/.github/workflows/upload-debians.yaml +++ b/.github/workflows/upload-debians.yaml @@ -18,8 +18,8 @@ jobs: path: Payload-SDK - name: ROS 2 Build Debian Package run: | - sudo apt update && sudo apt install -y python3-pip dpkg-dev debhelper dh-python && pip3 install rosdep bloom - sudo mkdir -p /etc/ros/rosdep/sources.list.d + sudo apt update && sudo apt install -y python3-pip dpkg-dev debhelper dh-python && sudo pip3 install rosdep bloom + sudo rosdep init echo "yaml file:///rosdep.yaml" >> /etc/ros/rosdep/sources.list.d/50-my-packages.list echo "psdk_interfaces:\n ubuntu: [ros-humble-psdk-interfaces]" >> /rosdep.yaml rosdep update From cb84820b863451d1fbbb3fa81e05058f196222f5 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 15:16:46 +0300 Subject: [PATCH 12/32] Test debian build --- .github/workflows/upload-debians.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml index 4baa857f..547ec315 100644 --- a/.github/workflows/upload-debians.yaml +++ b/.github/workflows/upload-debians.yaml @@ -20,6 +20,6 @@ jobs: run: | sudo apt update && sudo apt install -y python3-pip dpkg-dev debhelper dh-python && sudo pip3 install rosdep bloom sudo rosdep init - echo "yaml file:///rosdep.yaml" >> /etc/ros/rosdep/sources.list.d/50-my-packages.list - echo "psdk_interfaces:\n ubuntu: [ros-humble-psdk-interfaces]" >> /rosdep.yaml - rosdep update + sudo echo "yaml file:///rosdep.yaml" >> /etc/ros/rosdep/sources.list.d/50-my-packages.list + sudo echo "psdk_interfaces:\n ubuntu: [ros-humble-psdk-interfaces]" >> /rosdep.yaml + sudo rosdep update From c7c02bb90dc3f3f2c9caf3cce3c25429ed815a19 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 15:19:26 +0300 Subject: [PATCH 13/32] Test debian build --- .github/workflows/upload-debians.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml index 547ec315..f1781b7e 100644 --- a/.github/workflows/upload-debians.yaml +++ b/.github/workflows/upload-debians.yaml @@ -20,6 +20,7 @@ jobs: run: | sudo apt update && sudo apt install -y python3-pip dpkg-dev debhelper dh-python && sudo pip3 install rosdep bloom sudo rosdep init - sudo echo "yaml file:///rosdep.yaml" >> /etc/ros/rosdep/sources.list.d/50-my-packages.list + echo "yaml file:///rosdep.yaml" >> 50-my-packages.list + sudo mv 50-my-packages.list /etc/ros/rosdep/sources.list.d sudo echo "psdk_interfaces:\n ubuntu: [ros-humble-psdk-interfaces]" >> /rosdep.yaml sudo rosdep update From f5a3408a4461fd8d7a684e54aece1e6997584c32 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 15:21:05 +0300 Subject: [PATCH 14/32] Test debian build --- .github/workflows/upload-debians.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml index f1781b7e..95ea3e88 100644 --- a/.github/workflows/upload-debians.yaml +++ b/.github/workflows/upload-debians.yaml @@ -22,5 +22,6 @@ jobs: sudo rosdep init echo "yaml file:///rosdep.yaml" >> 50-my-packages.list sudo mv 50-my-packages.list /etc/ros/rosdep/sources.list.d - sudo echo "psdk_interfaces:\n ubuntu: [ros-humble-psdk-interfaces]" >> /rosdep.yaml + echo "psdk_interfaces:\n ubuntu: [ros-humble-psdk-interfaces]" >> rosdep.yaml + sudo mv rosdep.yaml / sudo rosdep update From 768103f8e4d3d09cc41b43dfab3aa3330aa19658 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 15:27:54 +0300 Subject: [PATCH 15/32] Fix conflicts --- .github/workflows/upload-debians.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml index 95ea3e88..b39fb90b 100644 --- a/.github/workflows/upload-debians.yaml +++ b/.github/workflows/upload-debians.yaml @@ -18,10 +18,17 @@ jobs: path: Payload-SDK - name: ROS 2 Build Debian Package run: | - sudo apt update && sudo apt install -y python3-pip dpkg-dev debhelper dh-python && sudo pip3 install rosdep bloom + sudo apt update && sudo apt install -y python3-pip dpkg-dev debhelper dh-python libopus-dev ffmpeg libavcodec-dev libavformat-dev libavfilter-dev + ln -snf /usr/lib/x86_64-linux-gnu/libopus.a /usr/local/lib + sudo pip3 install rosdep bloom sudo rosdep init echo "yaml file:///rosdep.yaml" >> 50-my-packages.list sudo mv 50-my-packages.list /etc/ros/rosdep/sources.list.d echo "psdk_interfaces:\n ubuntu: [ros-humble-psdk-interfaces]" >> rosdep.yaml sudo mv rosdep.yaml / sudo rosdep update + cd psdk_ros2/psdk_interfaces + bloom-generate rosdebian --ros-distro humble + debian/rules "binary --parallel --dpkg-shlibdeps-params=--ignore-missing-info" + ls .. + \ No newline at end of file From 4d13bd23d7d77057114a0c93fd058d3658d29335 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 15:30:00 +0300 Subject: [PATCH 16/32] Fix conflicts --- .github/workflows/upload-debians.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml index b39fb90b..ee2aaf0c 100644 --- a/.github/workflows/upload-debians.yaml +++ b/.github/workflows/upload-debians.yaml @@ -19,7 +19,7 @@ jobs: - name: ROS 2 Build Debian Package run: | sudo apt update && sudo apt install -y python3-pip dpkg-dev debhelper dh-python libopus-dev ffmpeg libavcodec-dev libavformat-dev libavfilter-dev - ln -snf /usr/lib/x86_64-linux-gnu/libopus.a /usr/local/lib + sudo ln -snf /usr/lib/x86_64-linux-gnu/libopus.a /usr/local/lib sudo pip3 install rosdep bloom sudo rosdep init echo "yaml file:///rosdep.yaml" >> 50-my-packages.list @@ -31,4 +31,3 @@ jobs: bloom-generate rosdebian --ros-distro humble debian/rules "binary --parallel --dpkg-shlibdeps-params=--ignore-missing-info" ls .. - \ No newline at end of file From f074f72fa1a81bf897227d1aeffd9c77c9db5699 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 15:34:32 +0300 Subject: [PATCH 17/32] Test debian build --- .github/workflows/upload-debians.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml index ee2aaf0c..552e55ad 100644 --- a/.github/workflows/upload-debians.yaml +++ b/.github/workflows/upload-debians.yaml @@ -28,6 +28,6 @@ jobs: sudo mv rosdep.yaml / sudo rosdep update cd psdk_ros2/psdk_interfaces - bloom-generate rosdebian --ros-distro humble - debian/rules "binary --parallel --dpkg-shlibdeps-params=--ignore-missing-info" + sudo bloom-generate rosdebian --ros-distro humble + sudo debian/rules "binary --parallel --dpkg-shlibdeps-params=--ignore-missing-info" ls .. From 9cee092ec94a038d2e5f1f6a02d64b6af186efb6 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 16:07:18 +0300 Subject: [PATCH 18/32] Test debian build --- .github/workflows/upload-debians.yaml | 15 ++-------- debian/50-my-packages.list | 1 + debian/create_debians.sh | 41 +++++++++++++++++++++++++++ debian/rosdep.yaml | 4 +++ 4 files changed, 48 insertions(+), 13 deletions(-) create mode 100644 debian/50-my-packages.list create mode 100755 debian/create_debians.sh create mode 100644 debian/rosdep.yaml diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml index 552e55ad..e27e1081 100644 --- a/.github/workflows/upload-debians.yaml +++ b/.github/workflows/upload-debians.yaml @@ -18,16 +18,5 @@ jobs: path: Payload-SDK - name: ROS 2 Build Debian Package run: | - sudo apt update && sudo apt install -y python3-pip dpkg-dev debhelper dh-python libopus-dev ffmpeg libavcodec-dev libavformat-dev libavfilter-dev - sudo ln -snf /usr/lib/x86_64-linux-gnu/libopus.a /usr/local/lib - sudo pip3 install rosdep bloom - sudo rosdep init - echo "yaml file:///rosdep.yaml" >> 50-my-packages.list - sudo mv 50-my-packages.list /etc/ros/rosdep/sources.list.d - echo "psdk_interfaces:\n ubuntu: [ros-humble-psdk-interfaces]" >> rosdep.yaml - sudo mv rosdep.yaml / - sudo rosdep update - cd psdk_ros2/psdk_interfaces - sudo bloom-generate rosdebian --ros-distro humble - sudo debian/rules "binary --parallel --dpkg-shlibdeps-params=--ignore-missing-info" - ls .. + mv psdk_ros2/debians/create_debians.sh . + sudo ./create_debians.sh diff --git a/debian/50-my-packages.list b/debian/50-my-packages.list new file mode 100644 index 00000000..93e95b82 --- /dev/null +++ b/debian/50-my-packages.list @@ -0,0 +1 @@ +yaml file:///rosdep.yaml diff --git a/debian/create_debians.sh b/debian/create_debians.sh new file mode 100755 index 00000000..14b5db6a --- /dev/null +++ b/debian/create_debians.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +sudo apt update && sudo apt install -y python3-pip dpkg-dev debhelper dh-python libopus-dev ffmpeg libavcodec-dev libavformat-dev libavfilter-dev +sudo ln -snf /usr/lib/x86_64-linux-gnu/libopus.a /usr/local/lib +sudo pip3 install rosdep bloom +sudo rosdep init +sudo mv psdk_ros2/psdk/debians/50-my-packages.list /etc/ros/rosdep/sources.list.d +sudo mv psdk_ros2/psdk/debians/rosdep.yaml / + +# store the current dir +CUR_DIR=$(pwd) + +# Update ROS deps +sudo rosdep update + +PACKAGE_LIST=( + psdk_ros2/psdk_interfaces \ + psdk_ros2/psdk_wrapper +) + +for PACKAGE in ${PACKAGE_LIST[@]}; do + echo "" + echo "Creating debian for $PACKAGE..." + + # We have to go to the ROS package parent directory + cd $PACKAGE; + bloom-generate rosdebian --ros-distro humble + debian/rules "binary --parallel --dpkg-shlibdeps-params=--ignore-missing-info" + + cd .. + DEB_FILE=$(find *.deb); + if ! [[ $? -eq 0 ]]; then + exit 1 + fi + dpkg -i $DEB_FILE + rm *.deb *.ddeb + cd $CUR_DIR + +done + +echo "Complete!" diff --git a/debian/rosdep.yaml b/debian/rosdep.yaml new file mode 100644 index 00000000..0b2e9b39 --- /dev/null +++ b/debian/rosdep.yaml @@ -0,0 +1,4 @@ +psdk_wrapper: + ubuntu: [ros-humble-psdk-wrapper] +psdk_interfaces: + ubuntu: [ros-humble-psdk-interfaces] From 19a3676a9ce8d268555daa8d43a2bd93e135106b Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 16:08:48 +0300 Subject: [PATCH 19/32] Test debian build --- .github/workflows/upload-debians.yaml | 2 +- debian/create_debians.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml index e27e1081..6b1746d1 100644 --- a/.github/workflows/upload-debians.yaml +++ b/.github/workflows/upload-debians.yaml @@ -18,5 +18,5 @@ jobs: path: Payload-SDK - name: ROS 2 Build Debian Package run: | - mv psdk_ros2/debians/create_debians.sh . + mv psdk_ros2/debian/create_debians.sh . sudo ./create_debians.sh diff --git a/debian/create_debians.sh b/debian/create_debians.sh index 14b5db6a..fbea0691 100755 --- a/debian/create_debians.sh +++ b/debian/create_debians.sh @@ -4,8 +4,8 @@ sudo apt update && sudo apt install -y python3-pip dpkg-dev debhelper dh-python sudo ln -snf /usr/lib/x86_64-linux-gnu/libopus.a /usr/local/lib sudo pip3 install rosdep bloom sudo rosdep init -sudo mv psdk_ros2/psdk/debians/50-my-packages.list /etc/ros/rosdep/sources.list.d -sudo mv psdk_ros2/psdk/debians/rosdep.yaml / +sudo mv psdk_ros2/psdk/debian/50-my-packages.list /etc/ros/rosdep/sources.list.d +sudo mv psdk_ros2/psdk/debian/rosdep.yaml / # store the current dir CUR_DIR=$(pwd) From f978195520e2ea90998f1d3442c7cc910c9160a4 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 16:11:59 +0300 Subject: [PATCH 20/32] Test debian build --- debian/create_debians.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/create_debians.sh b/debian/create_debians.sh index fbea0691..34c210bc 100755 --- a/debian/create_debians.sh +++ b/debian/create_debians.sh @@ -24,8 +24,8 @@ for PACKAGE in ${PACKAGE_LIST[@]}; do # We have to go to the ROS package parent directory cd $PACKAGE; - bloom-generate rosdebian --ros-distro humble - debian/rules "binary --parallel --dpkg-shlibdeps-params=--ignore-missing-info" + sudo bloom-generate rosdebian --ros-distro humble + sudo debian/rules "binary --parallel --dpkg-shlibdeps-params=--ignore-missing-info" cd .. DEB_FILE=$(find *.deb); From d84fdd40752ef0722cbd5ac457a3c10b33147f6e Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 16:13:57 +0300 Subject: [PATCH 21/32] Test debian build --- debian/create_debians.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/create_debians.sh b/debian/create_debians.sh index 34c210bc..fecdc026 100755 --- a/debian/create_debians.sh +++ b/debian/create_debians.sh @@ -25,7 +25,7 @@ for PACKAGE in ${PACKAGE_LIST[@]}; do # We have to go to the ROS package parent directory cd $PACKAGE; sudo bloom-generate rosdebian --ros-distro humble - sudo debian/rules "binary --parallel --dpkg-shlibdeps-params=--ignore-missing-info" + debian/rules "binary --parallel --dpkg-shlibdeps-params=--ignore-missing-info" cd .. DEB_FILE=$(find *.deb); From 39832313b99a1b488d4a17233bdd8fafa8ffb4b6 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 16:17:22 +0300 Subject: [PATCH 22/32] Test debian build --- debian/create_debians.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/create_debians.sh b/debian/create_debians.sh index fecdc026..39837002 100755 --- a/debian/create_debians.sh +++ b/debian/create_debians.sh @@ -25,6 +25,7 @@ for PACKAGE in ${PACKAGE_LIST[@]}; do # We have to go to the ROS package parent directory cd $PACKAGE; sudo bloom-generate rosdebian --ros-distro humble + ls debian/rules "binary --parallel --dpkg-shlibdeps-params=--ignore-missing-info" cd .. From 7ed74ae806d9e62bd2f82949129b7940a16b82ac Mon Sep 17 00:00:00 2001 From: vicmassy Date: Fri, 12 Jan 2024 16:18:55 +0300 Subject: [PATCH 23/32] Test debian build --- debian/create_debians.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/create_debians.sh b/debian/create_debians.sh index 39837002..5e7fb32f 100755 --- a/debian/create_debians.sh +++ b/debian/create_debians.sh @@ -25,7 +25,7 @@ for PACKAGE in ${PACKAGE_LIST[@]}; do # We have to go to the ROS package parent directory cd $PACKAGE; sudo bloom-generate rosdebian --ros-distro humble - ls + ls debian debian/rules "binary --parallel --dpkg-shlibdeps-params=--ignore-missing-info" cd .. From 6a8f570e78fb731bcd3d5e33537e4d86a4d61c34 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Mon, 15 Jan 2024 09:53:32 +0300 Subject: [PATCH 24/32] Use custom action --- .github/workflows/upload-debians.yaml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml index 6b1746d1..39387949 100644 --- a/.github/workflows/upload-debians.yaml +++ b/.github/workflows/upload-debians.yaml @@ -16,7 +16,14 @@ jobs: repository: dji-sdk/Payload-SDK ref: 3.5 path: Payload-SDK - - name: ROS 2 Build Debian Package - run: | - mv psdk_ros2/debian/create_debians.sh . - sudo ./create_debians.sh + - name: Generate debians + uses: umdlife/umd_workflows/create-debian-action@feat/debians + with: + ros_distro: "humble" + path_custom_resources: "psdk_ros2/debian/rosdep.yaml" + list_packages: "psdk_ros2/psdk_interfaces \npsdk_ros2/psdk_wrapper" + list_binaries: "libopus-dev ffmpeg libavcodec-dev libavformat-dev libavfilter-dev" + # - name: ROS 2 Build Debian Package + # run: | + # mv psdk_ros2/debian/create_debians.sh . + # sudo ./create_debians.sh From 5eec423a7259c65fa26c65208fde35deb0bf0c34 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Mon, 15 Jan 2024 10:04:57 +0300 Subject: [PATCH 25/32] rosdep update --- .github/workflows/upload-debians.yaml | 22 +++++++++++----------- debian/create_debians.sh | 14 ++++++++++---- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml index 39387949..186f61e2 100644 --- a/.github/workflows/upload-debians.yaml +++ b/.github/workflows/upload-debians.yaml @@ -16,14 +16,14 @@ jobs: repository: dji-sdk/Payload-SDK ref: 3.5 path: Payload-SDK - - name: Generate debians - uses: umdlife/umd_workflows/create-debian-action@feat/debians - with: - ros_distro: "humble" - path_custom_resources: "psdk_ros2/debian/rosdep.yaml" - list_packages: "psdk_ros2/psdk_interfaces \npsdk_ros2/psdk_wrapper" - list_binaries: "libopus-dev ffmpeg libavcodec-dev libavformat-dev libavfilter-dev" - # - name: ROS 2 Build Debian Package - # run: | - # mv psdk_ros2/debian/create_debians.sh . - # sudo ./create_debians.sh + # - name: Generate debians + # uses: umdlife/umd_workflows/create-debian-action@feat/debians + # with: + # ros_distro: "humble" + # path_custom_resources: "psdk_ros2/debian/rosdep.yaml" + # list_packages: "psdk_ros2/psdk_interfaces \npsdk_ros2/psdk_wrapper" + # list_binaries: "libopus-dev ffmpeg libavcodec-dev libavformat-dev libavfilter-dev" + - name: ROS 2 Build Debian Package + run: | + mv psdk_ros2/debian/create_debians.sh . + sudo ./create_debians.sh diff --git a/debian/create_debians.sh b/debian/create_debians.sh index 5e7fb32f..596406a0 100755 --- a/debian/create_debians.sh +++ b/debian/create_debians.sh @@ -1,12 +1,18 @@ #!/bin/bash -sudo apt update && sudo apt install -y python3-pip dpkg-dev debhelper dh-python libopus-dev ffmpeg libavcodec-dev libavformat-dev libavfilter-dev +apt update +apt install -y --no-install-recommends python3-pip dpkg-dev debhelper dh-python libopus-dev ffmpeg libavcodec-dev libavformat-dev libavfilter-dev sudo ln -snf /usr/lib/x86_64-linux-gnu/libopus.a /usr/local/lib sudo pip3 install rosdep bloom sudo rosdep init sudo mv psdk_ros2/psdk/debian/50-my-packages.list /etc/ros/rosdep/sources.list.d sudo mv psdk_ros2/psdk/debian/rosdep.yaml / +rosdep keys --from-paths . --ignore-src --rosdistro humble | \ + xargs rosdep resolve --rosdistro humble | \ + awk '/#apt/{getline; print}' > ./rosdep_requirements.txt +apt install -y --no-install-recommends $(cat ./rosdep_requirements.txt) + # store the current dir CUR_DIR=$(pwd) @@ -14,8 +20,8 @@ CUR_DIR=$(pwd) sudo rosdep update PACKAGE_LIST=( - psdk_ros2/psdk_interfaces \ - psdk_ros2/psdk_wrapper + psdk_ros2/psdk_interfaces \ + psdk_ros2/psdk_wrapper ) for PACKAGE in ${PACKAGE_LIST[@]}; do @@ -24,7 +30,7 @@ for PACKAGE in ${PACKAGE_LIST[@]}; do # We have to go to the ROS package parent directory cd $PACKAGE; - sudo bloom-generate rosdebian --ros-distro humble + bloom-generate rosdebian --ros-distro humble ls debian debian/rules "binary --parallel --dpkg-shlibdeps-params=--ignore-missing-info" From 1eec1985b90c2763d4fd7239f9b9c07854c27d6e Mon Sep 17 00:00:00 2001 From: vicmassy Date: Mon, 15 Jan 2024 10:08:05 +0300 Subject: [PATCH 26/32] rosdep update --- debian/create_debians.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/debian/create_debians.sh b/debian/create_debians.sh index 596406a0..cd3539f5 100755 --- a/debian/create_debians.sh +++ b/debian/create_debians.sh @@ -2,22 +2,22 @@ apt update apt install -y --no-install-recommends python3-pip dpkg-dev debhelper dh-python libopus-dev ffmpeg libavcodec-dev libavformat-dev libavfilter-dev -sudo ln -snf /usr/lib/x86_64-linux-gnu/libopus.a /usr/local/lib -sudo pip3 install rosdep bloom -sudo rosdep init -sudo mv psdk_ros2/psdk/debian/50-my-packages.list /etc/ros/rosdep/sources.list.d -sudo mv psdk_ros2/psdk/debian/rosdep.yaml / - -rosdep keys --from-paths . --ignore-src --rosdistro humble | \ - xargs rosdep resolve --rosdistro humble | \ - awk '/#apt/{getline; print}' > ./rosdep_requirements.txt -apt install -y --no-install-recommends $(cat ./rosdep_requirements.txt) +ln -snf /usr/lib/x86_64-linux-gnu/libopus.a /usr/local/lib +pip3 install rosdep bloom +rosdep init +mv psdk_ros2/psdk/debian/50-my-packages.list /etc/ros/rosdep/sources.list.d +mv psdk_ros2/psdk/debian/rosdep.yaml / # store the current dir CUR_DIR=$(pwd) # Update ROS deps -sudo rosdep update +rosdep update + +rosdep keys --from-paths . --ignore-src --rosdistro humble | \ + xargs rosdep resolve --rosdistro humble | \ + awk '/#apt/{getline; print}' > ./rosdep_requirements.txt +apt install -y --no-install-recommends $(cat ./rosdep_requirements.txt) PACKAGE_LIST=( psdk_ros2/psdk_interfaces \ From d588f5fa57ce83317cc8e62969c10d01f916c4eb Mon Sep 17 00:00:00 2001 From: vicmassy Date: Mon, 15 Jan 2024 10:12:18 +0300 Subject: [PATCH 27/32] rosdep update --- debian/create_debians.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/debian/create_debians.sh b/debian/create_debians.sh index cd3539f5..78d22d4d 100755 --- a/debian/create_debians.sh +++ b/debian/create_debians.sh @@ -1,12 +1,27 @@ #!/bin/bash +locale # check for UTF-8 + +apt update && apt install locales +locale-gen en_US en_US.UTF-8 +update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 +export LANG=en_US.UTF-8 + +apt install software-properties-common +add-apt-repository universe + +apt update && apt install curl -y +curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg + +echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null + apt update apt install -y --no-install-recommends python3-pip dpkg-dev debhelper dh-python libopus-dev ffmpeg libavcodec-dev libavformat-dev libavfilter-dev ln -snf /usr/lib/x86_64-linux-gnu/libopus.a /usr/local/lib pip3 install rosdep bloom rosdep init -mv psdk_ros2/psdk/debian/50-my-packages.list /etc/ros/rosdep/sources.list.d -mv psdk_ros2/psdk/debian/rosdep.yaml / +mv psdk_ros2/debian/50-my-packages.list /etc/ros/rosdep/sources.list.d +mv psdk_ros2/debian/rosdep.yaml / # store the current dir CUR_DIR=$(pwd) From d770289c9e7d83107efd4ffc06286cbd13c42e88 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Mon, 15 Jan 2024 10:25:12 +0300 Subject: [PATCH 28/32] rosdep update --- debian/create_debians.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/debian/create_debians.sh b/debian/create_debians.sh index 78d22d4d..be5c3cbf 100755 --- a/debian/create_debians.sh +++ b/debian/create_debians.sh @@ -16,9 +16,9 @@ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-a apt update -apt install -y --no-install-recommends python3-pip dpkg-dev debhelper dh-python libopus-dev ffmpeg libavcodec-dev libavformat-dev libavfilter-dev +apt install -y --no-install-recommends python3-pip python3-bloom python3-catkin-pkg dpkg-dev debhelper dh-python libopus-dev ffmpeg libavcodec-dev libavformat-dev libavfilter-dev ln -snf /usr/lib/x86_64-linux-gnu/libopus.a /usr/local/lib -pip3 install rosdep bloom +pip3 install rosdep rosdep init mv psdk_ros2/debian/50-my-packages.list /etc/ros/rosdep/sources.list.d mv psdk_ros2/debian/rosdep.yaml / @@ -46,7 +46,6 @@ for PACKAGE in ${PACKAGE_LIST[@]}; do # We have to go to the ROS package parent directory cd $PACKAGE; bloom-generate rosdebian --ros-distro humble - ls debian debian/rules "binary --parallel --dpkg-shlibdeps-params=--ignore-missing-info" cd .. From 3373c5f7a63229bddb2ace4e3bde92cf5facee58 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Mon, 15 Jan 2024 10:33:25 +0300 Subject: [PATCH 29/32] rosdep update --- debian/create_debians.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/create_debians.sh b/debian/create_debians.sh index be5c3cbf..ec79dced 100755 --- a/debian/create_debians.sh +++ b/debian/create_debians.sh @@ -16,7 +16,7 @@ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-a apt update -apt install -y --no-install-recommends python3-pip python3-bloom python3-catkin-pkg dpkg-dev debhelper dh-python libopus-dev ffmpeg libavcodec-dev libavformat-dev libavfilter-dev +apt install -y --no-install-recommends python3-pip python3-bloom python3-catkin-pkg dpkg-dev debhelper dh-python libopus-dev ffmpeg libavcodec-dev libavformat-dev libavfilter-dev libusb-1.0-0-dev ln -snf /usr/lib/x86_64-linux-gnu/libopus.a /usr/local/lib pip3 install rosdep rosdep init From 32f29d833b6229da4feb6ce96565a7cb64bd88c6 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Mon, 15 Jan 2024 11:04:00 +0300 Subject: [PATCH 30/32] rosdep update --- .github/workflows/upload-debians.yaml | 15 ++++++++------- debian/create_debians.sh | 4 ++++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml index 186f61e2..95bb5304 100644 --- a/.github/workflows/upload-debians.yaml +++ b/.github/workflows/upload-debians.yaml @@ -16,14 +16,15 @@ jobs: repository: dji-sdk/Payload-SDK ref: 3.5 path: Payload-SDK - # - name: Generate debians - # uses: umdlife/umd_workflows/create-debian-action@feat/debians - # with: - # ros_distro: "humble" - # path_custom_resources: "psdk_ros2/debian/rosdep.yaml" - # list_packages: "psdk_ros2/psdk_interfaces \npsdk_ros2/psdk_wrapper" - # list_binaries: "libopus-dev ffmpeg libavcodec-dev libavformat-dev libavfilter-dev" - name: ROS 2 Build Debian Package + id: build run: | mv psdk_ros2/debian/create_debians.sh . sudo ./create_debians.sh + ls . + - uses: d1ceward/draft-assets-release-action@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + files: | + ${{ steps.build.outputs.INTERFACES_DEB }} + ${{ steps.build.outputs.WRAPPER_DEB }} diff --git a/debian/create_debians.sh b/debian/create_debians.sh index ec79dced..9a2388a5 100755 --- a/debian/create_debians.sh +++ b/debian/create_debians.sh @@ -54,9 +54,13 @@ for PACKAGE in ${PACKAGE_LIST[@]}; do exit 1 fi dpkg -i $DEB_FILE + cp $DEB_FILE $CUR_DIR rm *.deb *.ddeb cd $CUR_DIR done +echo "INTERFACES_DEB=$(find *interfaces*.deb)" >> $GITHUB_OUTPUT +echo "WRAPPER_DEB=$(find *wrapper*.deb)" >> $GITHUB_OUTPUT + echo "Complete!" From 6b157742225b6933b220d2267cec815806f3b912 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Mon, 15 Jan 2024 11:16:44 +0300 Subject: [PATCH 31/32] Final version --- .github/workflows/upload-debians.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/upload-debians.yaml b/.github/workflows/upload-debians.yaml index 95bb5304..bc552052 100644 --- a/.github/workflows/upload-debians.yaml +++ b/.github/workflows/upload-debians.yaml @@ -1,8 +1,8 @@ -name: Build - -on: - pull_request: - types: [opened, synchronize, reopened] +name: Build Debians +on: + push: + tags: + - 'v*' jobs: build_debians: From 8dab14af993e6d9707a8d8b42162d4631864b4d9 Mon Sep 17 00:00:00 2001 From: vicmassy Date: Mon, 15 Jan 2024 11:35:38 +0300 Subject: [PATCH 32/32] Fix library versions --- docs/requirements.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 2575df69..9d324a65 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,11 @@ -exhale +sphinx==4.5.0 +breathe==4.32.0 +exhale==0.3.6 myst_parser -breathe -sphinx_rtd_theme \ No newline at end of file +sphinx_rtd_theme +sphinxcontrib-applehelp<=1.0.7 +sphinxcontrib-devhelp<=1.0.5 +sphinxcontrib-jsmath<=1.0.1 +sphinxcontrib_htmlhelp<=2.0.4 +sphinxcontrib-serializinghtml<=1.1.9 +sphinxcontrib-qthelp<=1.0.6