Skip to content

Commit

Permalink
Add Iron CI (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
roncapat authored Nov 16, 2023
1 parent 41e7c2e commit ee50d14
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 11 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/iron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Ubuntu 22.04 Iron Build

on:
pull_request:
push:
branches:
- iron

jobs:
Build:
runs-on: self-hosted
container:
image: osrf/ros:iron-desktop-full-jammy

steps:
- name: Update
run: apt update

- name: Install PIP
run: apt install -y python3-pip lcov

- name: Install colcon tools
run: python3 -m pip install colcon-lcov-result colcon-coveragepy-result

- name: Run Tests
uses: ros-tooling/action-ros-ci@0.3.5
with:
target-ros2-distro: iron
import-token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Logs
uses: actions/upload-artifact@v1
with:
name: colcon-logs
path: ros_ws/log
if: always()
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ jobs:
run: python3 -m pip install colcon-lcov-result colcon-coveragepy-result

- name: Run Tests
uses: ros-tooling/action-ros-ci@0.2.7
uses: ros-tooling/action-ros-ci@0.3.5
with:
ref: main
target-ros2-distro: humble
import-token: ${{ secrets.GITHUB_TOKEN }}

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# ROS2 Native Adapters

[![Ubuntu 22.04 Humble Build](https://github.com/roncapat/ros2_native_adapters/actions/workflows/main.yml/badge.svg)](https://github.com/roncapat/ros2_native_adapters/actions/workflows/main.yml)
[![Ubuntu 22.04 Iron Build](https://github.com/roncapat/ros2_native_adapters/actions/workflows/iron.yml/badge.svg)](https://github.com/roncapat/ros2_native_adapters/actions/workflows/iron.yml)

This package provides the following ROS2 type adaptations:

| Adapted Message | Native wrapper | Underlying native class | Header |
Expand Down
10 changes: 5 additions & 5 deletions src/SensorMsgImage_CvMat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ Copyright 2023 Patrick Roncagliolo, Antonino Bongiovanni

StampedImage_CV::StampedImage_CV(const StampedImage_CV & other)
{
//RCLCPP_WARN(rclcpp::get_logger("Image Adapter"), "Copy constructor called");
// RCLCPP_WARN(rclcpp::get_logger("Image Adapter"), "Copy constructor called");
this->header = other.header;
this->mat = other.mat.clone();
}

StampedImage_CV::StampedImage_CV(StampedImage_CV && other)
{
//RCLCPP_WARN(rclcpp::get_logger("Image Adapter"), "Move constructor called");
// RCLCPP_WARN(rclcpp::get_logger("Image Adapter"), "Move constructor called");
this->header = std::move(other.header);
this->mat = std::move(other.mat);
}

StampedImage_CV & StampedImage_CV::operator=(const StampedImage_CV & other)
{
//RCLCPP_WARN(rclcpp::get_logger("Image Adapter"), "Assignment operator called");
// RCLCPP_WARN(rclcpp::get_logger("Image Adapter"), "Assignment operator called");
if (this == &other) {return *this;}

this->header = other.header;
Expand All @@ -36,7 +36,7 @@ StampedImage_CV & StampedImage_CV::operator=(const StampedImage_CV & other)
void rclcpp::TypeAdapter<StampedImage_CV, sensor_msgs::msg::Image>::convert_to_ros_message(
const custom_type & source, ros_message_type & destination)
{
//RCLCPP_WARN(rclcpp::get_logger("Image Adapter"), "Conversion to message");
// RCLCPP_WARN(rclcpp::get_logger("Image Adapter"), "Conversion to message");

int cv_type {source.mat.type()};
std::string encoding {};
Expand Down Expand Up @@ -95,7 +95,7 @@ void rclcpp::TypeAdapter<StampedImage_CV, sensor_msgs::msg::Image>::convert_to_r
void rclcpp::TypeAdapter<StampedImage_CV, sensor_msgs::msg::Image>::convert_to_custom(
const ros_message_type & source, custom_type & destination)
{
//RCLCPP_WARN(rclcpp::get_logger("Image Adapter"), "Conversion from message");
// RCLCPP_WARN(rclcpp::get_logger("Image Adapter"), "Conversion from message");

destination.header = source.header;
destination.mat = std::move(cv_bridge::toCvCopy(source, source.encoding)->image);
Expand Down
10 changes: 5 additions & 5 deletions src/SensorMsgPointCloud2_PCLPointCloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ Copyright 2023 Patrick Roncagliolo

StampedPointCloud_PCL::StampedPointCloud_PCL(const StampedPointCloud_PCL & other)
{
//RCLCPP_WARN(rclcpp::get_logger("PointCloud2 Adapter"), "Copy constructor called");
// RCLCPP_WARN(rclcpp::get_logger("PointCloud2 Adapter"), "Copy constructor called");
// raise(SIGTRAP);
this->header = other.header;
this->cloud = other.cloud;
}

StampedPointCloud_PCL::StampedPointCloud_PCL(StampedPointCloud_PCL && other)
{
//RCLCPP_WARN(rclcpp::get_logger("PointCloud2 Adapter"), "Move constructor called");
// RCLCPP_WARN(rclcpp::get_logger("PointCloud2 Adapter"), "Move constructor called");
// raise(SIGTRAP);
this->header = std::move(other.header);
this->cloud = std::move(other.cloud);
}

StampedPointCloud_PCL & StampedPointCloud_PCL::operator=(const StampedPointCloud_PCL & other)
{
//RCLCPP_WARN(rclcpp::get_logger("PointCloud2 Adapter"), "Assignment operator called");
// RCLCPP_WARN(rclcpp::get_logger("PointCloud2 Adapter"), "Assignment operator called");
// raise(SIGTRAP);
if (this == &other) {return *this;}
this->header = other.header;
Expand Down Expand Up @@ -67,7 +67,7 @@ void rclcpp::TypeAdapter<StampedPointCloud_PCL,
const StampedPointCloud_PCL & source,
sensor_msgs::msg::PointCloud2 & destination)
{
//RCLCPP_WARN(rclcpp::get_logger("PointCloud2 Adapter"), "Conversion to message");
// RCLCPP_WARN(rclcpp::get_logger("PointCloud2 Adapter"), "Conversion to message");
// raise(SIGTRAP);

std::visit([&](auto && cloud) {pcl::toROSMsg(cloud, destination);}, source.cloud);
Expand All @@ -77,7 +77,7 @@ void rclcpp::TypeAdapter<StampedPointCloud_PCL,
void rclcpp::TypeAdapter<StampedPointCloud_PCL, sensor_msgs::msg::PointCloud2>::convert_to_custom(
const sensor_msgs::msg::PointCloud2 & source, StampedPointCloud_PCL & destination)
{
//RCLCPP_WARN(rclcpp::get_logger("PointCloud2 Adapter"), "Conversion from message");
// RCLCPP_WARN(rclcpp::get_logger("PointCloud2 Adapter"), "Conversion from message");
// raise(SIGTRAP);

bool rgb = false;
Expand Down

0 comments on commit ee50d14

Please sign in to comment.