From 161d218c5a21107bc98504f099ffcdca8c12cfce Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Wed, 16 Apr 2025 13:03:24 +0900 Subject: [PATCH 1/3] CI: add ROS-O testing on arm --- .github/workflows/config.yml | 47 ++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 3217fa938..8f0795cf1 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -205,26 +205,19 @@ jobs: run: | rm -fr ${{ matrix.ROS_DISTRO }}-${{ github.run_number }}-${{ github.run_attempt }}-${{ github.run_id }} || echo "OK" + # ROS-O setup for v4hn https://github.com/v4hn/ros-o-builder/blob/jammy-one/README.md#install-instructions # ROS-O setup for techfak https://ros.packages.techfak.net/ # note that v4hn uses ROS_DISTRO=one and techfak uses ROS_DISTRO ros-o: - runs-on: ubuntu-latest - strategy: fail-fast: false matrix: - include: - - DISTRO: ubuntu:22.04 - ROS_ONE_VARIANT: v4hn - ROS_REPOSITORY_URL: "deb [trusted=yes] https://raw.githubusercontent.com/v4hn/ros-o-builder/jammy-one/repository ./" - ROSDEP_PACKAGE_MAPPING: "yaml https://raw.githubusercontent.com/v4hn/ros-o-builder/jammy-one/repository/local.yaml debian" - - DISTRO: ubuntu:24.04 - ROS_ONE_VARIANT: techfak - ROS_REPOSITORY_URL: "deb [trusted=yes] https://ros.packages.techfak.net noble-testing main" - ROSDEP_PACKAGE_MAPPING: "yaml https://ros.packages.techfak.net/ros-one.yaml ubuntu" + DEB_DISTRO: [22.04, 24.04] + ARCH: [x64, arm64] + ROS_ONE_VARIANT: [techfak] - container: ${{ matrix.DISTRO }} + runs-on: ${{ matrix.ARCH == 'x64' && format('ubuntu-{0}', matrix.DEB_DISTRO) || (matrix.ARCH == 'arm64' && format('ubuntu-{0}-arm', matrix.DEB_DISTRO) || format('ubuntu-{0}', matrix.DEB_DISTRO)) }} env: DEBIAN_FRONTEND : noninteractive @@ -236,23 +229,31 @@ jobs: - name: Setup ROS-O deb repository run: | set -x - apt update && apt install -qq -y ca-certificates git - echo ${{ matrix.ROS_REPOSITORY_URL }} | tee /etc/apt/sources.list.d/ros-o-builder.list + sudo apt update && sudo apt install -qq -y ca-certificates git + if [[ "${{ matrix.DEB_DISTRO }}" == "22.04" ]]; then export CODE_NAME="jammy"; fi + if [[ "${{ matrix.DEB_DISTRO }}" == "24.04" ]]; then export CODE_NAME="noble"; fi + echo "deb [trusted=yes] https://ros.packages.techfak.net $CODE_NAME-testing main" | sudo tee /etc/apt/sources.list.d/ros-o-builder.list ## # https://github.com/v4hn/ros-deb-builder-action/blob/b7c0ed93fde3a86b5b1027bf8f7145cad6067c90/prepare.sh#L27-L28 # Canonical dropped the Debian ROS packages from 24.04 for political reasons. Wow. if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "v4hn" && "${{ matrix.DISTRO }}" == "ubuntu:24.04" ]]; then apt install -y software-properties-common retry && retry -d 50,10,30,300 -t 12 add-apt-repository -y ppa:v-launchpad-jochen-sprickerhof-de/ros; fi ## - apt update + sudo apt update if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "v4hn" ]]; then - apt install -qq -y python3-rosdep2 + sudo apt install -qq -y python3-rosdep2 fi if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "techfak" ]]; then # Do not install python3-rosdep2, which is an outdated version of rosdep shipped via the Ubuntu repositories (instead of ROS)! - apt install -qq -y python3-rosdep - rosdep init + sudo apt install -qq -y python3-rosdep + sudo rosdep init + fi + if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "v4hn" ]]; then + export ROSDEP_PACKAGE_MAPPING="yaml https://raw.githubusercontent.com/v4hn/ros-o-builder/jammy-one/repository/local.yaml debian" + fi + if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "techfak" ]]; then + export ROSDEP_PACKAGE_MAPPING="yaml https://ros.packages.techfak.net/ros-one.yaml ubuntu" fi - echo ${{ matrix.ROSDEP_PACKAGE_MAPPING }} | tee /etc/ros/rosdep/sources.list.d/1-ros-o-builder.list + echo $ROSDEP_PACKAGE_MAPPING | sudo tee /etc/ros/rosdep/sources.list.d/1-ros-o-builder.list rosdep update shell: bash @@ -260,16 +261,16 @@ jobs: run: | set -x # setup catkin tools - apt install -qq -y python3-pip + sudo apt install -qq -y python3-pip if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "v4hn" ]]; then pip3 install catkin-tools==0.9.4 - apt install -qq -y catkin + sudo apt install -qq -y catkin fi if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "techfak" ]]; then - apt install -qq -y ros-one-catkin python3-catkin-tools + sudo apt install -qq -y ros-one-catkin python3-catkin-tools fi # setup build tools - apt install -qq -y cmake build-essential ros-one-rosbash + sudo apt install -qq -y cmake build-essential ros-one-rosbash shell: bash - name: Setup Workspace From d03d49f45bf041fd3cd70b734445e1c55814d1fd Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Thu, 17 Apr 2025 12:34:51 +0900 Subject: [PATCH 2/3] CI: use ros-one-catkin-virtualenv --- .github/workflows/config.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 8f0795cf1..e69f3bb26 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -280,10 +280,6 @@ jobs: # setup workspace mkdir -p ~/ws/src cd ~/ws/src - if [[ "${{ matrix.ROS_ONE_VARIANT }}" == "techfak" ]]; then - # TODO: remove these lines and uncomment https://github.com/ubi-agni/ros-builder-action/blob/191fab06004ad5784c28cf2ba2b18f6d163a860d/ros-one.repos#L1089 - git clone https://github.com/locusrobotics/catkin_virtualenv.git - fi ln -sf $GITHUB_WORKSPACE . rosdep install -qq -r -y --from-path . --ignore-src || echo "OK" # check all system packages are able to install, because ROS-O build deb files that needs all packages From 47c2887fc5b565a557aa35fdfc04b35925ca20bf Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Thu, 17 Apr 2025 11:41:50 +0900 Subject: [PATCH 3/3] sesami_ros: add requirements.in.python3.12, for arm64 22.04/24.04 --- sesame_ros/CMakeLists.txt | 19 +++++++++++++++---- ...quirements.txt => requirements.in.python2} | 0 sesame_ros/requirements.in.python3.12 | 14 ++++++++++++++ 3 files changed, 29 insertions(+), 4 deletions(-) rename sesame_ros/{requirements.txt => requirements.in.python2} (100%) create mode 100644 sesame_ros/requirements.in.python3.12 diff --git a/sesame_ros/CMakeLists.txt b/sesame_ros/CMakeLists.txt index f9ac9a4ae..d03db9110 100644 --- a/sesame_ros/CMakeLists.txt +++ b/sesame_ros/CMakeLists.txt @@ -22,21 +22,36 @@ catkin_package( if($ENV{ROS_DISTRO} STREQUAL "kinetic" OR $ENV{ROS_DISTRO} STREQUAL "melodic") catkin_generate_virtualenv( + INPUT_REQUIREMENTS requirements.in.python2 PYTHON_INTERPRETER python2 CHECK_VENV FALSE ) elseif("$ENV{ROS_DISTRO}" STREQUAL "indigo") file(DOWNLOAD http://curl.haxx.se/ca/cacert.pem ${CMAKE_BINARY_DIR}/cacert.pem) catkin_generate_virtualenv( + INPUT_REQUIREMENTS requirements.in.python2 PYTHON_INTERPRETER python2 # https://stackoverflow.com/questions/25981703/pip-install-fails-with-connection-error-ssl-certificate-verify-failed EXTRA_PIP_ARGS -vvv --cert=${CMAKE_BINARY_DIR}/cacert.pem ) else() +find_package(Python3 QUIET COMPONENTS Interpreter) +if(Python3_FOUND) + message(STATUS "Found Python: ${Python3_EXECUTABLE}") + message(STATUS "Python Version: ${Python3_VERSION}") +endif() +if((NOT Python3_FOUND) OR (Python3_VERSION VERSION_LESS "3.10")) catkin_generate_virtualenv( + INPUT_REQUIREMENTS requirements.in.python2 PYTHON_INTERPRETER python3 CHECK_VENV FALSE ) +else() + catkin_generate_virtualenv( + INPUT_REQUIREMENTS requirements.in.python3.12 + PYTHON_INTERPRETER python3 + ) +endif() endif() include_directories() @@ -46,10 +61,6 @@ catkin_install_python( PROGRAMS ${PYTHON_SCRIPT_FILES} DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) -install(FILES requirements.txt - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} -) - if(CATKIN_ENABLE_TESTING) find_package(rostest REQUIRED) add_rostest(test/test_rospy_node.test diff --git a/sesame_ros/requirements.txt b/sesame_ros/requirements.in.python2 similarity index 100% rename from sesame_ros/requirements.txt rename to sesame_ros/requirements.in.python2 diff --git a/sesame_ros/requirements.in.python3.12 b/sesame_ros/requirements.in.python3.12 new file mode 100644 index 000000000..3b99d6502 --- /dev/null +++ b/sesame_ros/requirements.in.python3.12 @@ -0,0 +1,14 @@ +asn1crypto==1.3.0 +certifi==2020.6.20 +chardet==3.0.4 +cryptography==3.4.8 +enum34==1.1.10 +idna==2.7 +ipaddress==1.0.23 +ndg-httpsclient==0.5.1 +pyasn1==0.4.8 +pycparser==2.20 +pyOpenSSL==17.5.0 +requests==2.20.0 +six==1.15.0 +urllib3==1.24.2