From 1629bb7766040c6888a2aede910b4958af57dd99 Mon Sep 17 00:00:00 2001 From: flipflip <144994269+flipflip8952@users.noreply.github.com> Date: Mon, 29 Jul 2024 11:44:29 +0000 Subject: [PATCH] Use pre-made docker images for CI, use ROS Noetic, Humble and Jazzy (remove Melodic and Foxy) (#63) * Use pre-made docker images for CI, use ROS Noetic, Humble and Jazzy (remove Melodic and Foxy) --- .github/workflows/build_test_ros.yml | 114 +++++++++++-------------- .github/workflows/build_test_ros2.yml | 106 +++++++++++------------ CHANGELOG.md | 5 ++ README.md | 8 +- fixposition_driver_ros2/CMakeLists.txt | 7 +- 5 files changed, 107 insertions(+), 133 deletions(-) diff --git a/.github/workflows/build_test_ros.yml b/.github/workflows/build_test_ros.yml index 026253b..53b0a31 100644 --- a/.github/workflows/build_test_ros.yml +++ b/.github/workflows/build_test_ros.yml @@ -1,66 +1,48 @@ -name: Build and Test with ROS1 - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - build: - name: ${{ matrix.config.name }} - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - config: - - name: "melodic" - container: - image: "osrf/ros:melodic-desktop-full" - env: - ROS_DISTRO: melodic - - name: "noetic" - container: - image: "osrf/ros:noetic-desktop-full" - env: - ROS_DISTRO: noetic - - container: ${{ matrix.config.container }} - - defaults: - run: - shell: bash - - steps: - - uses: actions/checkout@v3 - with: - path: src/fixposition_driver - - name: Checkout Deps - uses: actions/checkout@v3 - with: - repository: fixposition/fixposition_gnss_tf - path: src/fixposition_gnss_tf - - name: Set up Deps - run: | - sudo apt-get update - sudo apt-get install -y libeigen3-dev libyaml-cpp-dev libgtest-dev python3-osrf-pycommon python3-catkin-tools - - name: Install Gtest - if: matrix.config.container.image == 'osrf/ros:melodic-desktop-full' - run: | - cd /usr/src/gtest - sudo cmake . - sudo make - sudo make install - - name: Ignore ROS2 node - run: | - touch src/fixposition_driver/fixposition_driver_ros2/CATKIN_IGNORE - touch src/fixposition_driver/fixposition_odometry_converter_ros2/CATKIN_IGNORE - - name: Init Workspace - run: | - catkin init - - name: Build and Test - run: | - source /opt/ros/$ROS_DISTRO/setup.bash - catkin build fixposition_driver_lib fixposition_driver_ros1 fixposition_odometry_converter_ros1 --force-cmake -DBUILD_TESTING=ON - catkin run_tests +name: Build and Test with ROS1 + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + name: ${{ matrix.config.name }} + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + config: + - name: "noetic" + container: + image: "ghcr.io/fixposition/fixposition-sdk:noetic-ci" + + container: ${{ matrix.config.container }} + + defaults: + run: + shell: bash + + steps: + - uses: actions/checkout@v4 + with: + path: src/fixposition_driver + - name: Checkout Deps + uses: actions/checkout@v4 + with: + repository: fixposition/fixposition_gnss_tf + path: src/fixposition_gnss_tf + - name: Ignore ROS2 node + run: | + touch src/fixposition_driver/fixposition_driver_ros2/CATKIN_IGNORE + touch src/fixposition_driver/fixposition_odometry_converter_ros2/CATKIN_IGNORE + - name: Init Workspace + run: | + catkin init + - name: Build and Test + run: | + source /opt/ros/$ROS_DISTRO/setup.bash + catkin build fixposition_driver_lib fixposition_driver_ros1 fixposition_odometry_converter_ros1 --force-cmake -DBUILD_TESTING=ON + catkin run_tests diff --git a/.github/workflows/build_test_ros2.yml b/.github/workflows/build_test_ros2.yml index 0111191..e593dee 100644 --- a/.github/workflows/build_test_ros2.yml +++ b/.github/workflows/build_test_ros2.yml @@ -1,57 +1,49 @@ -name: Build and Test with ROS2 - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - build: - name: ${{ matrix.config.name }} - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - config: - - name: "humble" - container: - image: "osrf/ros:humble-desktop-full" - env: - ROS_DISTRO: humble - - name: "foxy" - container: - image: "osrf/ros:foxy-desktop" - env: - ROS_DISTRO: foxy - - container: ${{ matrix.config.container }} - - defaults: - run: - shell: bash - - steps: - - uses: actions/checkout@v3 - with: - path: src/fixposition_driver - - name: Checkout Deps - uses: actions/checkout@v3 - with: - repository: fixposition/fixposition_gnss_tf - path: src/fixposition_gnss_tf - - name: Set up Deps - run: | - sudo apt-get update - sudo apt-get install -y libeigen3-dev libyaml-cpp-dev libgtest-dev python3-osrf-pycommon - - name: Ignore ROS1 node - run: | - touch src/fixposition_driver/fixposition_driver_ros1/COLCON_IGNORE - touch src/fixposition_driver/fixposition_odometry_converter_ros1/COLCON_IGNORE - - name: Build and Test - run: | - source /opt/ros/$ROS_DISTRO/setup.bash - colcon build --packages-up-to fixposition_driver_ros2 --cmake-args -DBUILD_TESTING=ON - colcon test --packages-up-to fixposition_driver_ros2 - colcon test-result --test-result-base build/fixposition_gnss_tf/ +name: Build and Test with ROS2 + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + name: ${{ matrix.config.name }} + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + config: + - name: "humble" + container: + image: "ghcr.io/fixposition/fixposition-sdk:humble-ci" + - name: "jazzy" + container: + image: "ghcr.io/fixposition/fixposition-sdk:jazzy-ci" + + container: ${{ matrix.config.container }} + + defaults: + run: + shell: bash + + steps: + - uses: actions/checkout@v4 + with: + path: src/fixposition_driver + - name: Checkout Deps + uses: actions/checkout@v4 + with: + repository: fixposition/fixposition_gnss_tf + path: src/fixposition_gnss_tf + - name: Ignore ROS1 node + run: | + touch src/fixposition_driver/fixposition_driver_ros1/COLCON_IGNORE + touch src/fixposition_driver/fixposition_odometry_converter_ros1/COLCON_IGNORE + - name: Build and Test + run: | + source /opt/ros/$ROS_DISTRO/setup.bash + colcon build --packages-up-to fixposition_driver_ros2 --cmake-args -DBUILD_TESTING=ON + colcon test --packages-up-to fixposition_driver_ros2 + colcon test-result --test-result-base build/fixposition_gnss_tf/ diff --git a/CHANGELOG.md b/CHANGELOG.md index e63ae65..4ae0c49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ _For questions about compatibility, please contact Fixpositions Support support@fixposition.com_ +## x.x.x + + - Remove support and CI for ROS 1 Melodic and ROS 2 Dashing/Eloquent/Foxy/Galactic + - Do CI for Noetic, Humble and Jazzy + ## [6.1.3](https://github.com/fixposition/fixposition_driver/releases/tag/6.1.3) - Improve README diff --git a/README.md b/README.md index 2cb0711..14c10f8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Fixposition ROS Driver -- [ROS1 melodic / noetic ![](./../../actions/workflows/build_test_ros.yml/badge.svg)](./../../actions/workflows/build_test_ros.yml) -- [ROS2 foxy / humble ![](./../../actions/workflows/build_test_ros2.yml/badge.svg)](./../../actions/workflows/build_test_ros2.yml) +- [ROS1 Noetic ![](./../../actions/workflows/build_test_ros.yml/badge.svg)](./../../actions/workflows/build_test_ros.yml) +- [ROS2 Humble / Jazzy ![](./../../actions/workflows/build_test_ros2.yml/badge.svg)](./../../actions/workflows/build_test_ros2.yml) [ROS](https://www.ros.org/) (both ROS1 and ROS2) Driver for [Fixposition Vision-RTK 2](https://www.fixposition.com/product). @@ -122,11 +122,11 @@ Then source your environment after the build: > [!NOTE] > ROS2, unlike ROS1, by default uses a `install` directory in the workspace. So when you do `ros2 launch xxx`, the configuration and launch files are taken from the `install` and not directly from the `src` directory. -> +> > If you want to modify the parameters in the YAML files. You can: > - Modify the YAML file in the `src` directory and then re-run `colcon build --packages-up-to fixposition_driver_ros2` to update them into the `install` directory. > -> or +> or > - Modify the YAML file in `install`. However, the next time you do `colcon build` they will be overriden by the files in `src`. diff --git a/fixposition_driver_ros2/CMakeLists.txt b/fixposition_driver_ros2/CMakeLists.txt index dc3f7f5..e45fa3e 100644 --- a/fixposition_driver_ros2/CMakeLists.txt +++ b/fixposition_driver_ros2/CMakeLists.txt @@ -69,16 +69,11 @@ add_executable( src/data_to_ros2.cpp ) -if($ENV{ROS_DISTRO} MATCHES "humble|rolling") +if($ENV{ROS_DISTRO} MATCHES "humble|jazzy|rolling") rosidl_get_typesupport_target( cpp_typesupport_target ${PROJECT_NAME} "rosidl_typesupport_cpp" ) -elseif($ENV{ROS_DISTRO} MATCHES "galactic|foxy|eloquent|dashing") - rosidl_target_interfaces( - ${PROJECT_NAME}_exec - ${PROJECT_NAME} "rosidl_typesupport_cpp" - ) else() message(FATAL_ERROR "Unsupported ROS_DISTRO") endif()