From e24385bc79fabf51f768861bab6bf7d51f735d3d Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Fri, 10 Jan 2025 11:23:07 +0900 Subject: [PATCH 1/4] add ROS-O test --- .github/workflows/config.yml | 83 ++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 019f57f5a..562f4f0e1 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -193,3 +193,86 @@ jobs: NOT_TEST_INSTALL : ${{ matrix.NOT_TEST_INSTALL }} TEST_PKGS : ${{ matrix.TEST_PKGS }} BEFORE_SCRIPT : ${{ matrix.BEFORE_SCRIPT }} + + # ROS-O setup https://github.com/v4hn/ros-o-builder/blob/jammy-one/README.md#install-instructions + ros-o: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + include: + - DISTRO: ubuntu:22.04 + ROS_REPOSITORY_URL: https://raw.githubusercontent.com/v4hn/ros-o-builder/jammy-one/repository + + container: ${{ matrix.DISTRO }} + + env: + DEBIAN_FRONTEND : noninteractive + + steps: + - name: Chcekout Source + uses: actions/checkout@v3.0.2 + + - name: Setup ROS-O deb repository + run: | + set -x + apt update && apt install -qq -y ca-certificates + echo "deb [trusted=yes] ${{ matrix.ROS_REPOSITORY_URL }}/ ./" | 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. + test "${{ matrix.DISTRO }}" = "ubuntu:24.04" && 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 + ## + apt update + apt install -qq -y python3-rosdep2 + echo "yaml ${{ matrix.ROS_REPOSITORY_URL }}/local.yaml debian" | tee /etc/ros/rosdep/sources.list.d/1-ros-o-builder.list + rosdep update + + - name: Setup catkin-tools + run: | + set -x + # setup catkin tools + apt install -qq -y python3-pip + pip3 install catkin-tools + # setup build tools + apt install -qq -y cmake build-essential catkin ros-one-rosbash + + - name: override rosdep rule to use system euslisp + run: | + set -x + apt install -qq -y curl + curl -L https://github.com/mikefarah/yq/releases/download/v4.33.3/yq_linux_amd64 -o /usr/local/bin/yq + chmod a+x /usr/local/bin/yq + yq eval -n '.euslisp.ubuntu = "euslisp-dev" | .jskeus.ubuntu = "jskeus-dev"' | tee rosdep.yaml + echo "yaml file:///$(pwd)/rosdep.yaml" | tee /etc/ros/rosdep/sources.list.d/01-local.list + rosdep update + shell: bash + + - name: Setup Workspace + run: | + source /opt/ros/one/setup.bash + set -x + # setup workspace + mkdir -p ~/ws/src + cd ~/ws/src + ln -sf $GITHUB_WORKSPACE . + rosdep install -qq -r -y --from-path . --ignore-src || echo "OK" + shell: bash + + - name: Compile Packages + run: | + source /opt/ros/one/setup.bash + set -x + cd ~/ws/ + catkin build --no-status -sv ${{ matrix.CATKIN_OPTIONS }} ${{ matrix.CMAKE_OPTIONS }} + shell: bash + + - name: Test Packages + run: | + source /opt/ros/one/setup.bash + source ~/ws/devel/setup.bash + roscd roseus + set -x + catkin test --no-status -sv roseus + shell: bash From f4ed545e5e8d8337fb20f6e81f8b893ec9415d88 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Fri, 10 Jan 2025 13:39:33 +0900 Subject: [PATCH 2/4] system installed euslisp does not have EUSDIR, int this case, try to find 'irteusgl' under /usr/bin/ --- roseus/bin/roseus.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roseus/bin/roseus.in b/roseus/bin/roseus.in index a5a6871b1..837832325 100755 --- a/roseus/bin/roseus.in +++ b/roseus/bin/roseus.in @@ -3,6 +3,8 @@ set -e if [ "@APPLE@" = "1" ]; then EUSLISP_EXE=/usr/local/bin/irteusgl # osx +elif [ "$EUSDIR" = "" ]; then + EUSLISP_EXE=`find -L /usr/bin/*eus* -type f -name irteusgl` # fix find: File system loop detected; '/usr/bin/X\11' is part of the same file system loop as '/usr/bin'. else EUSLISP_EXE=`find -L $EUSDIR -type f -name irteusgl` # linux fi From 56598663fa33a5288661436666b184d3acd36edf Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Fri, 10 Jan 2025 05:03:19 +0000 Subject: [PATCH 3/4] ros::find-load-msg-path, skip 'euslisp' and 'jskeus' package for system installed euslisp --- roseus/euslisp/roseus.l | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roseus/euslisp/roseus.l b/roseus/euslisp/roseus.l index 11e4a6f2f..1c8834007 100644 --- a/roseus/euslisp/roseus.l +++ b/roseus/euslisp/roseus.l @@ -387,6 +387,10 @@ always the rank of list is 2" ;; ;; first look under "~A/roseus/${ROS_DISTRO}/${PKG}" and if not check CMAKE_PREFIX_PATH/share/roseus/ros/${PKG} (defun ros::find-load-msg-path (pkg) + (when (and (string= *eusdir* "/usr/share/euslisp/") (member pkg '("euslisp" "jskeus") :test #'string=)) + (warning-message 3 "on system installed euslisp, (ros::find-load-msg-path \"~A\") is skipped~%" + *eusdir* pkg) + (return-from ros::find-load-msg-path :no-msg-package)) (let ((dirs (list )) (ppath (unix::getenv "CMAKE_PREFIX_PATH")) (s 0) i) From 58af9bbe387cd5c6602ee69b1de05fd197d0f9e8 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Fri, 10 Jan 2025 05:31:51 +0000 Subject: [PATCH 4/4] CMakeLists.txt: get {euslisp,jskeus}_VERSION from dpkg-query --- roseus/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roseus/CMakeLists.txt b/roseus/CMakeLists.txt index 838439b40..faf46fb72 100644 --- a/roseus/CMakeLists.txt +++ b/roseus/CMakeLists.txt @@ -58,6 +58,13 @@ if(APPLE) elseif((NOT ${euslisp_FOUND}) AND (NOT ${jskeus_FOUND}) AND (EXISTS ${EUS_EXECUTABLE}) AND (EXISTS ${JSKEUS_EXECUTABLE}) AND (EXISTS /usr/share/euslisp/include)) set(euslisp_PACKAGE_PATH /usr/share/euslisp) set(euslisp_INCLUDE_DIRS /usr/share/euslisp/include) + message("-- Set euslisp_PACKAGE_PATH to ${euslisp_PACKAGE_PATH}, this might be system installed euslisp") + execute_process(COMMAND dpkg-query -W -f='\${Version}' euslisp + OUTPUT_VARIABLE euslisp_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) + string(REPLACE "'" "" euslisp_VERSION "${euslisp_VERSION}") + execute_process(COMMAND dpkg-query -W -f='\${Version}' jskeus + OUTPUT_VARIABLE jskeus_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) + string(REPLACE "'" "" jskeus_VERSION "${jskeus_VERSION}") else() find_package(euslisp REQUIRED) find_package(jskeus REQUIRED)