From c6d601f495b3f811114bf88edf32bfcb74d46602 Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco-Claraco Date: Thu, 8 Aug 2024 19:22:32 +0200 Subject: [PATCH 1/2] Reuse base class publish topic name add missing getter --- mrpt_sensor_gnss_nmea/src/mrpt_sensor_gnss_nmea_node.cpp | 5 +---- mrpt_sensorlib/include/mrpt_sensorlib/mrpt_sensorlib.h | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mrpt_sensor_gnss_nmea/src/mrpt_sensor_gnss_nmea_node.cpp b/mrpt_sensor_gnss_nmea/src/mrpt_sensor_gnss_nmea_node.cpp index b2949c1..79dd188 100644 --- a/mrpt_sensor_gnss_nmea/src/mrpt_sensor_gnss_nmea_node.cpp +++ b/mrpt_sensor_gnss_nmea/src/mrpt_sensor_gnss_nmea_node.cpp @@ -127,10 +127,7 @@ void process_gps( auto& pubs = NMEA_Pubs::Instance(); - std::string publish_topic = "sensor"; - node.declare_parameter("publish_topic", publish_topic); - node.get_parameter("publish_topic", publish_topic); - pubs.ensure_pubs_are_created(node, publish_topic); + pubs.ensure_pubs_are_created(node, node.publish_topic()); std_msgs::msg::Header msgHeader; msgHeader.frame_id = node.sensor_frame_id(); diff --git a/mrpt_sensorlib/include/mrpt_sensorlib/mrpt_sensorlib.h b/mrpt_sensorlib/include/mrpt_sensorlib/mrpt_sensorlib.h index 0a33c15..006911c 100644 --- a/mrpt_sensorlib/include/mrpt_sensorlib/mrpt_sensorlib.h +++ b/mrpt_sensorlib/include/mrpt_sensorlib/mrpt_sensorlib.h @@ -99,6 +99,7 @@ class GenericSensorNode : public rclcpp::Node std::shared_ptr tf_bc_; const auto sensor_frame_id() const { return sensor_frame_id_; } + const auto publish_topic() const { return publish_topic_; } private: // ----------------- ROS 2 params ----------------- From 4273096a9a1e5d8a9d9c2ebf7d86c2040a846689 Mon Sep 17 00:00:00 2001 From: Jose Luis Blanco-Claraco Date: Thu, 8 Aug 2024 21:03:44 +0200 Subject: [PATCH 2/2] fix CI scripts --- .github/workflows/ros-build.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ros-build.yml b/.github/workflows/ros-build.yml index 810b492..4ec0f30 100644 --- a/.github/workflows/ros-build.yml +++ b/.github/workflows/ros-build.yml @@ -42,19 +42,16 @@ jobs: ros_version: 2 # Rolling Ridley (No End-Of-Life) -# - docker_image: ubuntu:noble -# ros_distribution: rolling -# ros_version: 2 + - docker_image: ubuntu:noble + ros_distribution: rolling + ros_version: 2 container: image: ${{ matrix.docker_image }} steps: - - name: Checkout - run: | - apt-get -y update - apt-get -y install git - git clone https://github.com/$GITHUB_REPOSITORY.git --recursive "$GITHUB_WORKSPACE" + - name: Checkout source code + uses: actions/checkout@v3 - name: setup ROS environment uses: ros-tooling/setup-ros@v0.7