From 24f3f7df2eb22174265face56175cf74ea9d53ab Mon Sep 17 00:00:00 2001 From: Lucas Date: Wed, 3 May 2023 16:51:09 -0300 Subject: [PATCH 1/6] Update CMakelist, package.xml and sonar messages to ROS2 --- CMakeLists.txt | 56 +++++++++++++++++++++++++------------------- msg/SonarStamped.msg | 2 +- package.xml | 26 ++++++++++---------- 3 files changed, 46 insertions(+), 38 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f2f3596..8b241c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,31 +1,39 @@ -cmake_minimum_required(VERSION 2.8.3) +cmake_minimum_required(VERSION 3.8) project(sonar_msgs) -## Compile as C++11, supported in ROS Kinetic and newer -# add_compile_options(-std=c++11) +if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + add_compile_options(-Wall -Wextra -Wpedantic) +endif() -## Find catkin macros and libraries -## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) -## is used, also find other catkin packages -find_package(catkin REQUIRED COMPONENTS - std_msgs - message_generation -) +# find dependencies +find_package(ament_cmake REQUIRED) +# uncomment the following section in order to fill in +# further dependencies manually. +# find_package( REQUIRED) + +find_package(std_msgs REQUIRED) +find_package(rosidl_default_generators REQUIRED) -## System dependencies are found with CMake's conventions -# find_package(Boost REQUIRED COMPONENTS system) +set(msg_files + "msg/Sonar.msg" + "msg/SonarStamped.msg" +) -add_message_files( - FILES - Sonar.msg - SonarStamped.msg - ) +rosidl_generate_interfaces(${PROJECT_NAME} + ${msg_files} + DEPENDENCIES std_msgs # Add packages that above messages depend on, in this case std_msg +) -generate_messages( - DEPENDENCIES - std_msgs - ) +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + # the following line skips the linter which checks for copyrights + # comment the line when a copyright and license is added to all source files + set(ament_cmake_copyright_FOUND TRUE) + # the following line skips cpplint (only works in a git repo) + # comment the line when this package is in a git repo and when + # a copyright and license is added to all source files + set(ament_cmake_cpplint_FOUND TRUE) + ament_lint_auto_find_test_dependencies() +endif() -catkin_package( - CATKIN_DEPENDS message_runtime - ) +ament_package() diff --git a/msg/SonarStamped.msg b/msg/SonarStamped.msg index a975c16..a07bb73 100644 --- a/msg/SonarStamped.msg +++ b/msg/SonarStamped.msg @@ -1,6 +1,6 @@ # This message contains an uncompressed sonar beams -Header header # Header timestamp should be acquisition time of image +std_msgs/Header header # Header timestamp should be acquisition time of image uint32 num_bins # Number of bins of the sonar uint32 num_beams # Number of beams of the sonar diff --git a/package.xml b/package.xml index f2278d7..41bb584 100644 --- a/package.xml +++ b/package.xml @@ -1,32 +1,32 @@ - + + sonar_msgs 0.0.0 Sonar messages for ROS - + - ivan - + lucas - TODO - - - - - message_generation - std_msgs - message_runtime + TODO: License declaration + ament_cmake - catkin + ament_lint_auto + ament_lint_common + std_msgs + rosidl_default_generators + rosidl_default_runtime + rosidl_interface_packages + ament_cmake From bde7f6b7d28f3872ad3c93c03dc5da6299b64c1c Mon Sep 17 00:00:00 2001 From: Ronaldo Evangelista Date: Fri, 6 Dec 2024 14:01:11 -0300 Subject: [PATCH 2/6] Add template files, update readme and fix minor updates --- .github/CODEOWNERS | 3 + .github/ISSUE_TEMPLATE.md | 39 ++++ .github/PULL_REQUEST_TEMPLATE.md | 67 ++++++ .github/workflows/autoproj-action-runner.yaml | 57 +++++ .github/workflows/colcon-action-runner.yaml | 58 +++++ .github/workflows/runner-ci-lint.yaml | 42 ++++ CHANGELOG.rst | 9 + CMakeLists.txt | 18 +- CONTRIBUTING.md | 13 ++ LICENSE | 201 ++++++++++++++++++ README.md | 71 ++++++- package.xml | 26 ++- 12 files changed, 573 insertions(+), 31 deletions(-) create mode 100644 .github/CODEOWNERS create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/autoproj-action-runner.yaml create mode 100644 .github/workflows/colcon-action-runner.yaml create mode 100644 .github/workflows/runner-ci-lint.yaml create mode 100644 CHANGELOG.rst create mode 100644 CONTRIBUTING.md create mode 100644 LICENSE diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..38617cf --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,3 @@ +# CODEOWNERS info: https://help.github.com/en/articles/about-code-owners +# Owners are automatically requested for review for PRs that changes code +* @ronaldoevangelista diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..519a7f1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,39 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +### Configuration + +- Operating system: \ + +- Package version: \<0.0.0\> + +### Description of problem + +- \ + +### Steps to Reproduce + +1. step +2. step + +### Actual Results + +- \ + +### Expected Results + +- \ + +### Related Package/PR + +- N/A. + +### Notes + +- N/A. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..39ec335 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,67 @@ + +#### **Overview** + +- \ +- \ + +#### **Use the following settings in the overrides file for docker testing** + +- Use these settings to compile and run the module using `autoproj`. +- The contents of the files manifest and `overrides.yaml` must be changed according to the `templates` below. +- Additional packages may be needed to test this module. + + e.g., + +- _overrides.yaml_ + + ```yaml + overrides: + - sonar_msgs: + branch: + ``` + +- _manifest_ + + ```yaml + package_sets: + - github: Brazilian-Institute-of-Robotics/python.base-package_set + branch: main + private: true + - github: Brazilian-Institute-of-Robotics/ros2.colcon-package_set + branch: main + private: true + - github: Brazilian-Institute-of-Robotics/ros2.distro-package_set + branch: main + private: true + - github: Brazilian-Institute-of-Robotics/core_base-package_set + branch: main + private: true + - github: Brazilian-Institute-of-Robotics/ros2.gazebo-package_set + branch: main + private: true + - github: Brazilian-Institute-of-Robotics/commons_plugin_package_set + private: true + branch: main + - github: Brazilian-Institute-of-Robotics/bir.rbim-package_set + branch: main + private: true + layout: + -sonar_msgs + ``` + +#### **What was added/changed in this update** + +- \ + +#### **Depends On:** + +- \ + +#### **Related Issues:** + +- \ + +#### **Notes:** + +- Include notes and notes specific to this pull request here, if not, include the expression N/A. (Not Applicable) diff --git a/.github/workflows/autoproj-action-runner.yaml b/.github/workflows/autoproj-action-runner.yaml new file mode 100644 index 0000000..47118e5 --- /dev/null +++ b/.github/workflows/autoproj-action-runner.yaml @@ -0,0 +1,57 @@ +# runner-ci-autoproj provides commands useful to build in CI environments +# run ci clean cache + +name: autoproj-runner-humble + +on: [pull_request, workflow_dispatch] + +jobs: + setup: + runs-on: [self-hosted, autoproj-host, linux, x64, default] + strategy: + matrix: + ubuntu: [jammy] + distro: [humble] + gazebodistro: [fortress] + fail-fast: false + + name: "run ros ${{ matrix.distro }} on autoproj" + steps: + - name: setup autoprojaction + uses: actions/checkout@v4 + with: + repository: Brazilian-Institute-of-Robotics/autoproj_action_runner + token: ${{ secrets.PAT_ACTION_USER_CIBOT }} + ref: feat-autoproj-action-runner + - uses: ./ + with: + packages: | + ${{ github.event.repository.name }} + distro: ${{ matrix.ubuntu }} + ros-distro: ${{ matrix.distro }} + gz-distro: ${{ matrix.gazebodistro }} + project: "bir.rbim-buildconf" + build-conf-url: git@github.com:Brazilian-Institute-of-Robotics/bir.rbim-buildconf.git + build-conf-branch: master + seed-config: | + --- + CODE_ADD_CONFIG: false + CODE_INTEGRATION: false + CODE_INSTALL_EXTENSION: false + CODE_MANAGE_FOLDERS: false + CODE_APPLY_THEME: false + apt_dpkg_update: true + osdeps_mode: all + GITORIOUS: ssh + GITHUB: ssh + GITHUB_ROOT: 'git@github.com:' + GITHUB_PUSH_ROOT: 'git@github.com:' + GITHUB_PRIVATE_ROOT: 'git@github.com:' + USE_PYTHON: true + python_executable: "/usr/bin/python3" + ros_version: 2 + ros_distro: '${{ matrix.distro }}' + gz_distro: '${{ matrix.gazebodistro }}' + user_shells: + - bash + pull_request_body: ${{ github.event.pull_request.body }} diff --git a/.github/workflows/colcon-action-runner.yaml b/.github/workflows/colcon-action-runner.yaml new file mode 100644 index 0000000..4f82679 --- /dev/null +++ b/.github/workflows/colcon-action-runner.yaml @@ -0,0 +1,58 @@ +# Workflow: colcon-action-runner +# +# This GitHub Actions workflow, named "colcon-action-runner," +# is designed to be triggered on workflow calls. +# This action build, tests and run coverage with ROS or ROS 2 workspace from source. +# +# Trigger +# This workflow is triggered by a `workflow_call` event. +# Thirdparty actions +# https://github.com/marketplace/actions/ros-2-ci-action +# Comments a pull request with the code coverage generated by your tests. +# https://github.com/marketplace/ros-tooling/setup-ros + +name: colcon-action-runner + +on: [pull_request, workflow_dispatch] + +jobs: + setup-colcon-ci: + strategy: + fail-fast: false + matrix: + ubuntu: [jammy] + distro: [humble] + runs-on: [self-hosted, colcon-hosted, linux, x64] + + container: + image: rostooling/setup-ros-docker:ubuntu-${{ matrix.ubuntu }}-latest + + name: run ${{ matrix.distro }} on colcon + steps: + - name: setup ros environment + uses: actions/checkout@v4 + with: + repository: Brazilian-Institute-of-Robotics/action-colcon-ci + token: ${{ secrets.PAT_ACTION_USER_CIBOT }} + ref: feat-action-colcon-ci + - name: BUILD AND TEST + id: action-ros-ci + uses: ./ + with: + package-name: | + ${{ github.event.repository.name }} + import-token: ${{ secrets.PAT_ACTION_USER_CIBOT }} + target-ros2-distro: ${{ matrix.distro }} + skip-coverage: true + colcon-extra-args: --event-handlers console_direct+ --executor sequential + colcon-defaults: | + { + "build": { + "mixin": ["coverage-gcc"], + "cmake-args": [ + "-DCMAKE_CXX_FLAGS=-fprofile-arcs -ftest-coverage --coverage", + "-DCMAKE_BUILD_TYPE=Debug" + ] + } + } + colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/1ddb69bedfd1f04c2f000e95452f7c24a4d6176b/index.yaml diff --git a/.github/workflows/runner-ci-lint.yaml b/.github/workflows/runner-ci-lint.yaml new file mode 100644 index 0000000..0180c65 --- /dev/null +++ b/.github/workflows/runner-ci-lint.yaml @@ -0,0 +1,42 @@ +# This file configures a set of analyzers, which statically check code and configuration files +# using the following tools copyright, cppcheck, cpplint, gtest, lint_cmake, linter, uncrustify, +# xmllint. These tools look for formation errors, patterns and other warnings. +# +# Checkout This action checks-out your repository under $GITHUB_WORKSPACE, +# so your workflow can access it. +# https://github.com/actions/checkout +# https://github.com/marketplace/actions/checkout +# +# ROS 2 Tooling Working Group +# Github action to run linters on ROS 2 packages +# https://github.com/ros-tooling/action-ros-lint +# rostooling/setup-ros-docker:ubuntu-jammy-ros-humble-desktop-latest +# https://github.com/ros-tooling/setup-ros-docker +# https://hub.docker.com/r/rostooling/setup-ros-docker/tags + +name: lint-runner + +on: [pull_request, workflow_dispatch] + +jobs: + ament_lint_general: + name: ament_${{ matrix.linter }} + strategy: + fail-fast: false + matrix: + linter: [copyright, lint_cmake, xmllint] + distro: [humble] + ubuntu: [jammy] + package: [sonar_msgs] + runs-on: [self-hosted, colcon-hosted, linux, x64] + timeout-minutes: 20 + container: + image: rostooling/setup-ros-docker:ubuntu-${{ matrix.ubuntu }}-latest + steps: + - uses: actions/checkout@v4 + - uses: ros-tooling/setup-ros@0.7.8 + - uses: ros-tooling/action-ros-lint@master + with: + linter: ${{ matrix.linter }} + distribution: ${{ matrix.distro }} + package-name: ${{ matrix.package }} diff --git a/CHANGELOG.rst b/CHANGELOG.rst new file mode 100644 index 0000000..4938682 --- /dev/null +++ b/CHANGELOG.rst @@ -0,0 +1,9 @@ +# Changelog + +## [Unreleased] + +### Added + +- Added First version + +[Unreleased]: https://github.com/Brazilian-Institute-of-Robotics/sonar_msgs diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b241c3..a223281 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,16 +1,10 @@ cmake_minimum_required(VERSION 3.8) + project(sonar_msgs) -if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") - add_compile_options(-Wall -Wextra -Wpedantic) -endif() +set(ignoreMe "${BUILD_DOCS}") -# find dependencies find_package(ament_cmake REQUIRED) -# uncomment the following section in order to fill in -# further dependencies manually. -# find_package( REQUIRED) - find_package(std_msgs REQUIRED) find_package(rosidl_default_generators REQUIRED) @@ -21,17 +15,11 @@ set(msg_files rosidl_generate_interfaces(${PROJECT_NAME} ${msg_files} - DEPENDENCIES std_msgs # Add packages that above messages depend on, in this case std_msg + DEPENDENCIES std_msgs ) if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) - # the following line skips the linter which checks for copyrights - # comment the line when a copyright and license is added to all source files - set(ament_cmake_copyright_FOUND TRUE) - # the following line skips cpplint (only works in a git repo) - # comment the line when this package is in a git repo and when - # a copyright and license is added to all source files set(ament_cmake_cpplint_FOUND TRUE) ament_lint_auto_find_test_dependencies() endif() diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..6f63de9 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,13 @@ +Any contribution that you make to this repository will +be under the Apache 2 License, as dictated by that +[license](http://www.apache.org/licenses/LICENSE-2.0.html): + +~~~ +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. +~~~ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index 444057a..5505da9 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,69 @@ -# sonar_msgs -Repository for sonar related ROS messages +# sonar msgs + +## Overview + +- The Sonar Interfaces package contains all services and message definitions designed for sonar-to-point-cloud and sonar-to-image conversion. + +**Keywords:** ROS2, Services, Messages. + +## License + +The source code is released under a [Apache License 2.0](https://github.com/Brazilian-Institute-of-Robotics/sonar_msgs/blob/master/LICENSE). + +**Author:** SENAI CIMATEC Team\ +**Affiliation:** Brazilian Institute of Robotics \ +**Maintainer:** Autor, RBiM Team + + +The `sonar_msgs` package has been tested under: + +- ROS 2 + + - [![colcon-action-runner](https://github.com/Brazilian-Institute-of-Robotics/sonar_msgs/actions/workflows/colcon-action-runner.yaml/badge.svg)](https://github.com/Brazilian-Institute-of-Robotics/sonar_msgs/actions/workflows/colcon-action-runner.yaml) - [`Humble Hawksbill`](https://docs.ros.org/en/humble/Releases/Release-Humble-Hawksbill.html) and Ubuntu 22.04.1 LTS (Jammy Jellyfish). + +### Projects Development Status + +| Repository | Latest | Linters | Doxygen | Coverage | +|--- |--- |--- |--- |--- | +| `sonar_msgs`| [![Humble](https://github.com/Brazilian-Institute-of-Robotics/sonar_msgs/actions/workflows/colcon-action-runner.yaml/badge.svg)](https://github.com/Brazilian-Institute-of-Robotics/sonar_msgs/actions/workflows/colcon-action-runner.yaml) | [![lint-runner](https://github.com/Brazilian-Institute-of-Robotics//actions/workflows/runner-ci-lint.yaml/badge.svg)](https://github.com/Brazilian-Institute-of-Robotics/sonar_msgs/actions/workflows/runner-ci-lint.yaml) | - | - | + +### Dependencies + +- N/a. + +### Building and install + - [Install ROS 2 packages](https://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html#id4) + +- **Building with colcon** + + - To build from source, clone the latest version from this repository into your `colcon` workspace and compile the package using + + +```bash +cd YOUR_WORKSPACE +source /opt/ros/foxy/setup.bash +colcon build --packages-select sonar_msgs +source install/local_setup.bash +``` + +- **Building from autoproj** + + - See build configuration based on autoproj + + - After Installation and configuration of autoproj, run the following commands: + +```sh +cd YOUR_WORKSPACE +source env.bash +amake sonar_msgs --verbose +source devel/setup.bash +``` +### Unit Tests +- N/a. + +## Launch file +- N/a. + +## Bugs & Feature Requests + +- Please report bugs and request features using the [Issue Tracker](https://github.com/Brazilian-Institute-of-Robotics/sonar_msgs/issues). diff --git a/package.xml b/package.xml index 41bb584..6edb33d 100644 --- a/package.xml +++ b/package.xml @@ -1,31 +1,29 @@ + sonar_msgs - 0.0.0 + + 0.0.1 + Sonar messages for ROS - - - - - lucas - - - - TODO: License declaration + Lucas Batista + + Apache License 2.0 ament_cmake + rosidl_default_generators + + std_msgs + + rosidl_default_runtime ament_lint_auto ament_lint_common - std_msgs - rosidl_default_generators - rosidl_default_runtime rosidl_interface_packages - ament_cmake From 7261fe8a97180115cea133d700a8d29c71775c85 Mon Sep 17 00:00:00 2001 From: Ronaldo Evangelista Date: Fri, 6 Dec 2024 14:32:53 -0300 Subject: [PATCH 3/6] Review Readme file --- .github/PULL_REQUEST_TEMPLATE.md | 45 -------------- .github/workflows/autoproj-action-runner.yaml | 57 ------------------ .github/workflows/colcon-action-runner.yaml | 58 ------------------- .github/workflows/runner-ci-lint.yaml | 9 +-- README.md | 2 +- 5 files changed, 6 insertions(+), 165 deletions(-) delete mode 100644 .github/workflows/autoproj-action-runner.yaml delete mode 100644 .github/workflows/colcon-action-runner.yaml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 39ec335..b4e9dcf 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -5,51 +5,6 @@ - \ -#### **Use the following settings in the overrides file for docker testing** - -- Use these settings to compile and run the module using `autoproj`. -- The contents of the files manifest and `overrides.yaml` must be changed according to the `templates` below. -- Additional packages may be needed to test this module. - - e.g., - -- _overrides.yaml_ - - ```yaml - overrides: - - sonar_msgs: - branch: - ``` - -- _manifest_ - - ```yaml - package_sets: - - github: Brazilian-Institute-of-Robotics/python.base-package_set - branch: main - private: true - - github: Brazilian-Institute-of-Robotics/ros2.colcon-package_set - branch: main - private: true - - github: Brazilian-Institute-of-Robotics/ros2.distro-package_set - branch: main - private: true - - github: Brazilian-Institute-of-Robotics/core_base-package_set - branch: main - private: true - - github: Brazilian-Institute-of-Robotics/ros2.gazebo-package_set - branch: main - private: true - - github: Brazilian-Institute-of-Robotics/commons_plugin_package_set - private: true - branch: main - - github: Brazilian-Institute-of-Robotics/bir.rbim-package_set - branch: main - private: true - layout: - -sonar_msgs - ``` - #### **What was added/changed in this update** - \ diff --git a/.github/workflows/autoproj-action-runner.yaml b/.github/workflows/autoproj-action-runner.yaml deleted file mode 100644 index 47118e5..0000000 --- a/.github/workflows/autoproj-action-runner.yaml +++ /dev/null @@ -1,57 +0,0 @@ -# runner-ci-autoproj provides commands useful to build in CI environments -# run ci clean cache - -name: autoproj-runner-humble - -on: [pull_request, workflow_dispatch] - -jobs: - setup: - runs-on: [self-hosted, autoproj-host, linux, x64, default] - strategy: - matrix: - ubuntu: [jammy] - distro: [humble] - gazebodistro: [fortress] - fail-fast: false - - name: "run ros ${{ matrix.distro }} on autoproj" - steps: - - name: setup autoprojaction - uses: actions/checkout@v4 - with: - repository: Brazilian-Institute-of-Robotics/autoproj_action_runner - token: ${{ secrets.PAT_ACTION_USER_CIBOT }} - ref: feat-autoproj-action-runner - - uses: ./ - with: - packages: | - ${{ github.event.repository.name }} - distro: ${{ matrix.ubuntu }} - ros-distro: ${{ matrix.distro }} - gz-distro: ${{ matrix.gazebodistro }} - project: "bir.rbim-buildconf" - build-conf-url: git@github.com:Brazilian-Institute-of-Robotics/bir.rbim-buildconf.git - build-conf-branch: master - seed-config: | - --- - CODE_ADD_CONFIG: false - CODE_INTEGRATION: false - CODE_INSTALL_EXTENSION: false - CODE_MANAGE_FOLDERS: false - CODE_APPLY_THEME: false - apt_dpkg_update: true - osdeps_mode: all - GITORIOUS: ssh - GITHUB: ssh - GITHUB_ROOT: 'git@github.com:' - GITHUB_PUSH_ROOT: 'git@github.com:' - GITHUB_PRIVATE_ROOT: 'git@github.com:' - USE_PYTHON: true - python_executable: "/usr/bin/python3" - ros_version: 2 - ros_distro: '${{ matrix.distro }}' - gz_distro: '${{ matrix.gazebodistro }}' - user_shells: - - bash - pull_request_body: ${{ github.event.pull_request.body }} diff --git a/.github/workflows/colcon-action-runner.yaml b/.github/workflows/colcon-action-runner.yaml deleted file mode 100644 index 4f82679..0000000 --- a/.github/workflows/colcon-action-runner.yaml +++ /dev/null @@ -1,58 +0,0 @@ -# Workflow: colcon-action-runner -# -# This GitHub Actions workflow, named "colcon-action-runner," -# is designed to be triggered on workflow calls. -# This action build, tests and run coverage with ROS or ROS 2 workspace from source. -# -# Trigger -# This workflow is triggered by a `workflow_call` event. -# Thirdparty actions -# https://github.com/marketplace/actions/ros-2-ci-action -# Comments a pull request with the code coverage generated by your tests. -# https://github.com/marketplace/ros-tooling/setup-ros - -name: colcon-action-runner - -on: [pull_request, workflow_dispatch] - -jobs: - setup-colcon-ci: - strategy: - fail-fast: false - matrix: - ubuntu: [jammy] - distro: [humble] - runs-on: [self-hosted, colcon-hosted, linux, x64] - - container: - image: rostooling/setup-ros-docker:ubuntu-${{ matrix.ubuntu }}-latest - - name: run ${{ matrix.distro }} on colcon - steps: - - name: setup ros environment - uses: actions/checkout@v4 - with: - repository: Brazilian-Institute-of-Robotics/action-colcon-ci - token: ${{ secrets.PAT_ACTION_USER_CIBOT }} - ref: feat-action-colcon-ci - - name: BUILD AND TEST - id: action-ros-ci - uses: ./ - with: - package-name: | - ${{ github.event.repository.name }} - import-token: ${{ secrets.PAT_ACTION_USER_CIBOT }} - target-ros2-distro: ${{ matrix.distro }} - skip-coverage: true - colcon-extra-args: --event-handlers console_direct+ --executor sequential - colcon-defaults: | - { - "build": { - "mixin": ["coverage-gcc"], - "cmake-args": [ - "-DCMAKE_CXX_FLAGS=-fprofile-arcs -ftest-coverage --coverage", - "-DCMAKE_BUILD_TYPE=Debug" - ] - } - } - colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/1ddb69bedfd1f04c2f000e95452f7c24a4d6176b/index.yaml diff --git a/.github/workflows/runner-ci-lint.yaml b/.github/workflows/runner-ci-lint.yaml index 0180c65..890c404 100644 --- a/.github/workflows/runner-ci-lint.yaml +++ b/.github/workflows/runner-ci-lint.yaml @@ -18,9 +18,14 @@ name: lint-runner on: [pull_request, workflow_dispatch] + jobs: ament_lint_general: name: ament_${{ matrix.linter }} + runs-on: ubuntu-latest + timeout-minutes: 20 + container: + image: rostooling/setup-ros-docker:ubuntu-${{ matrix.ubuntu }}-latest strategy: fail-fast: false matrix: @@ -28,10 +33,6 @@ jobs: distro: [humble] ubuntu: [jammy] package: [sonar_msgs] - runs-on: [self-hosted, colcon-hosted, linux, x64] - timeout-minutes: 20 - container: - image: rostooling/setup-ros-docker:ubuntu-${{ matrix.ubuntu }}-latest steps: - uses: actions/checkout@v4 - uses: ros-tooling/setup-ros@0.7.8 diff --git a/README.md b/README.md index 5505da9..401c0d3 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ The source code is released under a [Apache License 2.0](https://github.com/Braz **Author:** SENAI CIMATEC Team\ **Affiliation:** Brazilian Institute of Robotics \ -**Maintainer:** Autor, RBiM Team +**Maintainer:** Autor, CIMATEC Team The `sonar_msgs` package has been tested under: From dc70ebf3c2e1f36142ebe62dd6d151707ef84936 Mon Sep 17 00:00:00 2001 From: Ronaldo Evangelista Date: Fri, 6 Dec 2024 14:35:16 -0300 Subject: [PATCH 4/6] Add colcon-action-runner --- .github/workflows/colcon-action-runner.yaml | 52 +++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/colcon-action-runner.yaml diff --git a/.github/workflows/colcon-action-runner.yaml b/.github/workflows/colcon-action-runner.yaml new file mode 100644 index 0000000..b2cfe19 --- /dev/null +++ b/.github/workflows/colcon-action-runner.yaml @@ -0,0 +1,52 @@ +# Workflow: colcon-action-runner +# +# This GitHub Actions workflow, named "colcon-action-runner," +# is designed to be triggered on workflow calls. +# This action build, tests and run coverage with ROS or ROS 2 workspace from source. +# +# Trigger +# This workflow is triggered by a `workflow_call` event. +# Thirdparty actions +# https://github.com/marketplace/actions/ros-2-ci-action +# Comments a pull request with the code coverage generated by your tests. +# https://github.com/marketplace/ros-tooling/setup-ros + +name: colcon-action-runner + +on: [pull_request, workflow_dispatch] + +jobs: + setup-colcon-ci: + strategy: + fail-fast: false + matrix: + ubuntu: [jammy] + distro: [humble] + runs-on: ubuntu-latest + container: + image: rostooling/setup-ros-docker:ubuntu-${{ matrix.ubuntu }}-latest + + name: run ${{ matrix.distro }} on colcon + steps: + - name: setup ros environment + uses: ros-tooling/setup-ros@v0.7 + with: + required-ros-distributions: ${{ matrix.distro }} + - name: build - ${{ github.event.repository.name }} + uses: ros-tooling/action-ros-ci@v0.3 + with: + package-name: | + ${{ github.event.repository.name }} + target-ros2-distro: ${{ matrix.distro }} + skip-tests: true + no-symlink-install: true + colcon-extra-args: --event-handlers console_direct+ --executor sequential + colcon-defaults: | + { + "build": { + "cmake-args": [ + "-DCMAKE_BUILD_TYPE=Debug" + ] + } + } + colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/1ddb69bedfd1f04c2f000e95452f7c24a4d6176b/index.yaml From 8dca6f95f59b660e48b0e40300238e6bdc610e8e Mon Sep 17 00:00:00 2001 From: Ronaldo Evangelista Date: Fri, 6 Dec 2024 14:38:29 -0300 Subject: [PATCH 5/6] Add new vertion and suport to ros2 --- package.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.xml b/package.xml index 6edb33d..2389fe3 100644 --- a/package.xml +++ b/package.xml @@ -4,7 +4,7 @@ sonar_msgs - 0.0.1 + 0.2.0 Sonar messages for ROS From 34957e0af05f8aad09f46b81fdda6d5e74da6c92 Mon Sep 17 00:00:00 2001 From: Ronaldo Evangelista Date: Fri, 6 Dec 2024 15:07:19 -0300 Subject: [PATCH 6/6] Fix badge lint --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 401c0d3..1aa1b48 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ The `sonar_msgs` package has been tested under: | Repository | Latest | Linters | Doxygen | Coverage | |--- |--- |--- |--- |--- | -| `sonar_msgs`| [![Humble](https://github.com/Brazilian-Institute-of-Robotics/sonar_msgs/actions/workflows/colcon-action-runner.yaml/badge.svg)](https://github.com/Brazilian-Institute-of-Robotics/sonar_msgs/actions/workflows/colcon-action-runner.yaml) | [![lint-runner](https://github.com/Brazilian-Institute-of-Robotics//actions/workflows/runner-ci-lint.yaml/badge.svg)](https://github.com/Brazilian-Institute-of-Robotics/sonar_msgs/actions/workflows/runner-ci-lint.yaml) | - | - | +| `sonar_msgs`| [![Humble](https://github.com/Brazilian-Institute-of-Robotics/sonar_msgs/actions/workflows/colcon-action-runner.yaml/badge.svg)](https://github.com/Brazilian-Institute-of-Robotics/sonar_msgs/actions/workflows/colcon-action-runner.yaml) |[![lint-runner](https://github.com/Brazilian-Institute-of-Robotics/sonar_msgs/actions/workflows/runner-ci-lint.yaml/badge.svg)](https://github.com/Brazilian-Institute-of-Robotics/sonar_msgs/actions/workflows/runner-ci-lint.yaml) | - | - | ### Dependencies