Skip to content

Commit

Permalink
Use pre-made docker images for CI, use ROS Noetic, Humble and Jazzy (…
Browse files Browse the repository at this point in the history
…remove Melodic and Foxy) (#63)

* Use pre-made docker images for CI, use ROS Noetic, Humble and Jazzy (remove Melodic and Foxy)
  • Loading branch information
flipflip8952 authored Jul 29, 2024
1 parent 0a1e54e commit 1629bb7
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 133 deletions.
114 changes: 48 additions & 66 deletions .github/workflows/build_test_ros.yml
Original file line number Diff line number Diff line change
@@ -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
106 changes: 49 additions & 57 deletions .github/workflows/build_test_ros2.yml
Original file line number Diff line number Diff line change
@@ -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/
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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).

Expand Down Expand Up @@ -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`.

Expand Down
7 changes: 1 addition & 6 deletions fixposition_driver_ros2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 1629bb7

Please sign in to comment.