diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 05a48fc..f5e9921 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,3 +11,10 @@ updates: directory: "/" schedule: interval: "weekly" + - package-ecosystem: "github-actions" + # Workflow files stored in the + # default location of `.github/workflows` + directory: "/" + schedule: + interval: "weekly" + target-branch: "humble" diff --git a/.github/workflows/build-foxy.yml b/.github/workflows/build-foxy.yml deleted file mode 100644 index 4188d81..0000000 --- a/.github/workflows/build-foxy.yml +++ /dev/null @@ -1,55 +0,0 @@ -# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git). -# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) - -name: Build foxy -on: - pull_request: - push: - branches: - - foxy-devel - schedule: - # Run every day to detect flakiness and broken dependencies - - cron: '28 6 * * *' - -jobs: - binary: - name: binary build - runs-on: ubuntu-latest - strategy: - matrix: - env: - - {ROS_DISTRO: foxy, ROS_REPO: main} - - {ROS_DISTRO: foxy, ROS_REPO: testing} - env: - CCACHE_DIR: ${{ github.workspace }}/.ccache - BASEDIR: ${{ github.workspace }}/.work - CACHE_PREFIX: ${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }} - steps: - - uses: actions/checkout@v4 - # The target directory cache doesn't include the source directory because - # that comes from the checkout. See "prepare target_ws for cache" task below - - name: cache target_ws - if: ${{ ! matrix.env.CCOV }} - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: ${{ env.BASEDIR }}/target_ws - key: target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}-${{ github.run_id }} - restore-keys: | - target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }} - - name: cache ccache - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: ${{ env.CCACHE_DIR }} - key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }} - restore-keys: | - ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }} - ccache-${{ env.CACHE_PREFIX }} - - uses: 'ros-industrial/industrial_ci@master' - env: ${{matrix.env}} - - name: prepare target_ws for cache - if: ${{ always() && ! matrix.env.CCOV }} - run: | - du -sh ${{ env.BASEDIR }}/target_ws - sudo find ${{ env.BASEDIR }}/target_ws -wholename '*/test_results/*' -delete - sudo rm -rf ${{ env.BASEDIR }}/target_ws/src - du -sh ${{ env.BASEDIR }}/target_ws diff --git a/.github/workflows/build-galactic.yml b/.github/workflows/build-galactic.yml deleted file mode 100644 index a7c7954..0000000 --- a/.github/workflows/build-galactic.yml +++ /dev/null @@ -1,55 +0,0 @@ -# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git). -# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) - -name: Build galactic -on: - pull_request: - push: - branches: - - galactic-devel - schedule: - # Run every day to detect flakiness and broken dependencies - - cron: '28 6 * * *' - -jobs: - binary: - name: binary build - runs-on: ubuntu-latest - strategy: - matrix: - env: - - {ROS_DISTRO: galactic, ROS_REPO: main} - - {ROS_DISTRO: galactic, ROS_REPO: testing} - env: - CCACHE_DIR: ${{ github.workspace }}/.ccache - BASEDIR: ${{ github.workspace }}/.work - CACHE_PREFIX: ${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }} - steps: - - uses: actions/checkout@v4 - # The target directory cache doesn't include the source directory because - # that comes from the checkout. See "prepare target_ws for cache" task below - - name: cache target_ws - if: ${{ ! matrix.env.CCOV }} - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: ${{ env.BASEDIR }}/target_ws - key: target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}-${{ github.run_id }} - restore-keys: | - target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }} - - name: cache ccache - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: ${{ env.CCACHE_DIR }} - key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }} - restore-keys: | - ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }} - ccache-${{ env.CACHE_PREFIX }} - - uses: 'ros-industrial/industrial_ci@master' - env: ${{matrix.env}} - - name: prepare target_ws for cache - if: ${{ always() && ! matrix.env.CCOV }} - run: | - du -sh ${{ env.BASEDIR }}/target_ws - sudo find ${{ env.BASEDIR }}/target_ws -wholename '*/test_results/*' -delete - sudo rm -rf ${{ env.BASEDIR }}/target_ws/src - du -sh ${{ env.BASEDIR }}/target_ws diff --git a/.github/workflows/build-humble.yml b/.github/workflows/build-humble.yml deleted file mode 100644 index 24d31fc..0000000 --- a/.github/workflows/build-humble.yml +++ /dev/null @@ -1,55 +0,0 @@ -# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git). -# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) - -name: Build humble -on: - pull_request: - push: - branches: - - humble - schedule: - # Run every day to detect flakiness and broken dependencies - - cron: '28 6 * * *' - -jobs: - binary: - name: binary build - runs-on: ubuntu-latest - strategy: - matrix: - env: - - {ROS_DISTRO: humble, ROS_REPO: main} - - {ROS_DISTRO: humble, ROS_REPO: testing} - env: - CCACHE_DIR: ${{ github.workspace }}/.ccache - BASEDIR: ${{ github.workspace }}/.work - CACHE_PREFIX: ${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }} - steps: - - uses: actions/checkout@v4 - # The target directory cache doesn't include the source directory because - # that comes from the checkout. See "prepare target_ws for cache" task below - - name: cache target_ws - if: ${{ ! matrix.env.CCOV }} - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: ${{ env.BASEDIR }}/target_ws - key: target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}-${{ github.run_id }} - restore-keys: | - target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }} - - name: cache ccache - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: ${{ env.CCACHE_DIR }} - key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }} - restore-keys: | - ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }} - ccache-${{ env.CACHE_PREFIX }} - - uses: 'ros-industrial/industrial_ci@master' - env: ${{matrix.env}} - - name: prepare target_ws for cache - if: ${{ always() && ! matrix.env.CCOV }} - run: | - du -sh ${{ env.BASEDIR }}/target_ws - sudo find ${{ env.BASEDIR }}/target_ws -wholename '*/test_results/*' -delete - sudo rm -rf ${{ env.BASEDIR }}/target_ws/src - du -sh ${{ env.BASEDIR }}/target_ws diff --git a/.github/workflows/build-rolling.yml b/.github/workflows/build-rolling.yml deleted file mode 100644 index 0f84a4a..0000000 --- a/.github/workflows/build-rolling.yml +++ /dev/null @@ -1,55 +0,0 @@ -# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git). -# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) - -name: Build rolling -on: - pull_request: - push: - branches: - - galactic-devel - schedule: - # Run every day to detect flakiness and broken dependencies - - cron: '28 6 * * *' - -jobs: - binary: - name: binary build - runs-on: ubuntu-latest - strategy: - matrix: - env: - - {ROS_DISTRO: rolling, ROS_REPO: main} - - {ROS_DISTRO: rolling, ROS_REPO: testing} - env: - CCACHE_DIR: ${{ github.workspace }}/.ccache - BASEDIR: ${{ github.workspace }}/.work - CACHE_PREFIX: ${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }} - steps: - - uses: actions/checkout@v4 - # The target directory cache doesn't include the source directory because - # that comes from the checkout. See "prepare target_ws for cache" task below - - name: cache target_ws - if: ${{ ! matrix.env.CCOV }} - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: ${{ env.BASEDIR }}/target_ws - key: target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}-${{ github.run_id }} - restore-keys: | - target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }} - - name: cache ccache - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: ${{ env.CCACHE_DIR }} - key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }} - restore-keys: | - ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }} - ccache-${{ env.CACHE_PREFIX }} - - uses: 'ros-industrial/industrial_ci@master' - env: ${{matrix.env}} - - name: prepare target_ws for cache - if: ${{ always() && ! matrix.env.CCOV }} - run: | - du -sh ${{ env.BASEDIR }}/target_ws - sudo find ${{ env.BASEDIR }}/target_ws -wholename '*/test_results/*' -delete - sudo rm -rf ${{ env.BASEDIR }}/target_ws/src - du -sh ${{ env.BASEDIR }}/target_ws diff --git a/.github/workflows/ci-pre-commit.yml b/.github/workflows/ci-pre-commit.yml new file mode 100644 index 0000000..cbb4c5c --- /dev/null +++ b/.github/workflows/ci-pre-commit.yml @@ -0,0 +1,18 @@ +name: Pre-Commit + +on: + workflow_dispatch: + pull_request: + branches: + - master + +jobs: + pre-commit: + uses: ros-controls/ros2_control_ci/.github/workflows/reusable-pre-commit.yml@master + strategy: + fail-fast: false + matrix: + ROS_DISTRO: [rolling, iron] + with: + ros_distro: ${{ matrix.ROS_DISTRO }} + os_name: ubuntu-22.04 diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml deleted file mode 100644 index d01e542..0000000 --- a/.github/workflows/format.yml +++ /dev/null @@ -1,23 +0,0 @@ -# This is a format job. Pre-commit has a first-party GitHub action, so we use -# that: https://github.com/pre-commit/action - -name: Format - -on: - workflow_dispatch: - pull_request: - -jobs: - pre-commit: - name: Format - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v4.7.1 - with: - python-version: '3.10' - - name: Install system hooks - run: sudo apt install -qq clang-format-14 cppcheck - - uses: pre-commit/action@v3.0.0 - with: - extra_args: --all-files --hook-stage manual diff --git a/.github/workflows/humble-build.yml b/.github/workflows/humble-build.yml new file mode 100644 index 0000000..cb85927 --- /dev/null +++ b/.github/workflows/humble-build.yml @@ -0,0 +1,28 @@ +name: Humble Binary Build +# author: Denis Štogl +# description: 'Build & test all dependencies from released (binary) packages.' + +on: + workflow_dispatch: + pull_request: + branches: + - humble + push: + branches: + - humble + schedule: + # Run every morning to detect flakiness and broken dependencies + - cron: '28 6 * * *' + +jobs: + binary: + uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master + strategy: + fail-fast: false + matrix: + ROS_DISTRO: [humble] + ROS_REPO: [main, testing] + with: + ros_distro: ${{ matrix.ROS_DISTRO }} + ros_repo: ${{ matrix.ROS_REPO }} + ref_for_scheduled_build: humble diff --git a/.github/workflows/humble-ci-pre-commit.yml b/.github/workflows/humble-ci-pre-commit.yml new file mode 100644 index 0000000..039c0a8 --- /dev/null +++ b/.github/workflows/humble-ci-pre-commit.yml @@ -0,0 +1,18 @@ +name: Humble Pre-Commit + +on: + workflow_dispatch: + pull_request: + branches: + - humble + +jobs: + pre-commit: + uses: ros-controls/ros2_control_ci/.github/workflows/reusable-pre-commit.yml@master + strategy: + fail-fast: false + matrix: + ROS_DISTRO: [humble] + with: + ros_distro: ${{ matrix.ROS_DISTRO }} + os_name: ubuntu-22.04 diff --git a/.github/workflows/reviewer_lottery.yml b/.github/workflows/reviewer_lottery.yml new file mode 100644 index 0000000..0584f4a --- /dev/null +++ b/.github/workflows/reviewer_lottery.yml @@ -0,0 +1,10 @@ +name: Reviewer lottery +# pull_request_target takes the same events as pull_request, +# but it runs on the base branch instead of the head branch. +on: + pull_request_target: + types: [opened, ready_for_review, reopened] + +jobs: + assign_reviewers: + uses: ros-controls/ros2_control_ci/.github/workflows/reusable-reviewer-lottery.yml@master diff --git a/.github/workflows/rolling-build.yml b/.github/workflows/rolling-build.yml new file mode 100644 index 0000000..7e39d44 --- /dev/null +++ b/.github/workflows/rolling-build.yml @@ -0,0 +1,28 @@ +name: Rolling Binary Build +# author: Denis Štogl +# description: 'Build & test all dependencies from released (binary) packages.' + +on: + workflow_dispatch: + pull_request: + branches: + - master + push: + branches: + - master + schedule: + # Run every morning to detect flakiness and broken dependencies + - cron: '28 6 * * *' + +jobs: + binary: + uses: ros-controls/ros2_control_ci/.github/workflows/reusable-industrial-ci-with-cache.yml@master + strategy: + fail-fast: false + matrix: + ROS_DISTRO: [rolling, iron] + ROS_REPO: [main, testing] + with: + ros_distro: ${{ matrix.ROS_DISTRO }} + ros_repo: ${{ matrix.ROS_REPO }} + ref_for_scheduled_build: master diff --git a/.github/workflows/ros-lint.yml b/.github/workflows/ros-lint.yml deleted file mode 100644 index a4e496e..0000000 --- a/.github/workflows/ros-lint.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: ROS2 Lint -on: - pull_request: - -jobs: - ament_lint: - name: ament_${{ matrix.linter }} - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - matrix: - linter: [copyright, lint_cmake] - steps: - - uses: actions/checkout@v4 - - uses: ros-tooling/setup-ros@v0.6 - - uses: ros-tooling/action-ros-lint@v0.1 - with: - distribution: rolling - linter: ${{ matrix.linter }} - package-name: - control_msgs diff --git a/.github/workflows/rosdoc2.yml b/.github/workflows/rosdoc2.yml new file mode 100644 index 0000000..c96b1af --- /dev/null +++ b/.github/workflows/rosdoc2.yml @@ -0,0 +1,14 @@ +name: rosdoc2 + +on: + workflow_dispatch: + pull_request: + paths: + - control_msgs/doc/** + - control_msgs/rosdoc2.yaml + - control_msgs/package.xml + + +jobs: + check: + uses: ros-controls/ros2_control_ci/.github/workflows/reusable-rosdoc2.yml@master diff --git a/.github/workflows/update-pre-commit.yml b/.github/workflows/update-pre-commit.yml new file mode 100644 index 0000000..6bedaa0 --- /dev/null +++ b/.github/workflows/update-pre-commit.yml @@ -0,0 +1,12 @@ +name: Auto Update pre-commit +# Update pre-commit config and create PR if changes are detected +# author: Christoph Fröhlich + +on: + workflow_dispatch: + schedule: + - cron: '0 0 1 * *' # Runs at 00:00, on day 1 of the month + +jobs: + auto_update_and_create_pr: + uses: ros-controls/ros2_control_ci/.github/workflows/reusable-update-pre-commit.yml@master diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5eb5c40..aa9b7ac 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: # Standard hooks - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.6.0 hooks: - id: check-added-large-files - id: check-ast @@ -30,41 +30,57 @@ repos: - id: end-of-file-fixer - id: mixed-line-ending - id: trailing-whitespace + exclude_types: [rst] - id: fix-byte-order-marker + # Python hooks - repo: https://github.com/asottile/pyupgrade - rev: v3.3.1 + rev: v3.15.2 hooks: - id: pyupgrade args: [--py36-plus] - - repo: https://github.com/psf/black - rev: 22.12.0 - hooks: - - id: black - args: ["--line-length=99"] - # PyDocStyle - repo: https://github.com/PyCQA/pydocstyle - rev: 6.2.3 + rev: 6.3.0 hooks: - id: pydocstyle args: ["--ignore=D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404"] + - repo: https://github.com/psf/black + rev: 24.4.2 + hooks: + - id: black + args: ["--line-length=99"] + - repo: https://github.com/pycqa/flake8 - rev: 6.0.0 + rev: 7.0.0 hooks: - id: flake8 - args: ["--ignore=E501"] + args: ["--extend-ignore=E501"] + + # CPP hooks + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: v18.1.4 + hooks: + - id: clang-format + args: ['-fallback-style=none', '-i'] + + - repo: local + hooks: + - id: ament_cppcheck + name: ament_cppcheck + description: Static code analysis of C/C++ files. + entry: env AMENT_CPPCHECK_ALLOW_SLOW_VERSIONS=1 ament_cppcheck + language: system + files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$ - # Maybe use https://github.com/cpplint/cpplint instead - repo: local hooks: - id: ament_cpplint name: ament_cpplint description: Static code analysis of C/C++ files. - stages: [commit] entry: ament_cpplint language: system files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$ @@ -76,7 +92,6 @@ repos: - id: ament_lint_cmake name: ament_lint_cmake description: Check format of CMakeLists.txt files. - stages: [commit] entry: ament_lint_cmake language: system files: CMakeLists\.txt$ @@ -87,9 +102,9 @@ repos: - id: ament_copyright name: ament_copyright description: Check if copyright notice is available in all files. - stages: [commit] entry: ament_copyright language: system + exclude: doc/conf.py # Docs - RestructuredText hooks - repo: https://github.com/PyCQA/doc8 @@ -100,7 +115,7 @@ repos: exclude: CHANGELOG\.rst$ - repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.9.0 + rev: v1.10.0 hooks: - id: rst-backticks exclude: CHANGELOG\.rst$ @@ -110,8 +125,18 @@ repos: # Spellcheck in comments and docs # skipping of *.svg files is not working... - repo: https://github.com/codespell-project/codespell - rev: v2.2.2 + rev: v2.2.6 hooks: - id: codespell args: ['--write-changes'] - exclude: \.(svg|pyc)$ + exclude: CHANGELOG\.rst|\.(svg|pyc)$ + + - repo: https://github.com/python-jsonschema/check-jsonschema + rev: 0.28.2 + hooks: + - id: check-github-workflows + args: ["--verbose"] + - id: check-github-actions + args: ["--verbose"] + - id: check-dependabot + args: ["--verbose"] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..574ef07 --- /dev/null +++ b/LICENSE @@ -0,0 +1,25 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md index f38aa43..ce4a082 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,19 @@ control_msgs =========== -See [control_msgs documentation](http://wiki.ros.org/control_msgs) on ros.org +control_msgs contains base messages and actions useful for controlling robots. It provides representations for controller setpoints and joint and cartesian trajectories. +See [control_msgs documentation](https://index.ros.org/p/control_msgs/) on index.ros.org -### Build Status -Kinetic
Melodic
Noetic | Crystal
Dashing
Eloquent | Foxy | Galactic | Humble | Rolling -:----------------------------------: | :------------------------------------: | :--: | :------: | :----: | :-----: -[kinetic-devel](https://github.com/ros-controls/control_msgs/tree/kinetic-devel) | [crystal-devel](https://github.com/ros-controls/control_msgs/tree/crystal-devel) | [foxy-devel](https://github.com/ros-controls/control_msgs/tree/foxy-devel) | [galactic-devel](https://github.com/ros-controls/control_msgs/tree/galactic-devel) | [humble](https://github.com/ros-controls/control_msgs/tree/humble) | [master](https://github.com/ros-controls/control_msgs/tree/master) -[![Build Status](https://travis-ci.org/ros-controls/control_msgs.png?branch=kinetic-devel)](https://travis-ci.org/ros-controls/control_msgs) | [![Build Status](https://travis-ci.org/ros-controls/control_msgs.png?branch=crystal-devel)](https://travis-ci.org/ros-controls/control_msgs) | [![Build foxy](https://github.com/ros-controls/control_msgs/actions/workflows/build-foxy.yml/badge.svg?branch=foxy-devel)](https://github.com/ros-controls/control_msgs/actions/workflows/build-foxy.yml) | [![Build galactic](https://github.com/ros-controls/control_msgs/actions/workflows/build-galactic.yml/badge.svg)](https://github.com/ros-controls/control_msgs/actions/workflows/build-galactic.yml) | [![Build humble](https://github.com/ros-controls/control_msgs/actions/workflows/build-humble.yml/badge.svg)](https://github.com/ros-controls/control_msgs/actions/workflows/build-humble.yml) | [![Build rolling](https://github.com/ros-controls/control_msgs/actions/workflows/build-rolling.yml/badge.svg)](https://github.com/ros-controls/control_msgs/actions/workflows/build-rolling.yml) +### Build Status +| Distribution | Repository Link | Build Status | +|--------------|-----------------|--------------| +| Noetic | [kinetic-devel](https://github.com/ros-controls/control_msgs/tree/kinetic-devel) | [Build status](https://travis-ci.org/ros-controls/control_msgs) | +| Humble | [humble](https://github.com/ros-controls/control_msgs/tree/humble) | [![Humble Binary Build](https://github.com/ros-controls/control_msgs/actions/workflows/humble-build.yml/badge.svg)](https://github.com/ros-controls/control_msgs/actions/workflows/humble-build.yml) | +| Iron | [master](https://github.com/ros-controls/control_msgs/tree/master) | [![Rolling Binary Build](https://github.com/ros-controls/control_msgs/actions/workflows/rolling-build.yml/badge.svg)](https://github.com/ros-controls/control_msgs/actions/workflows/rolling-build.yml) | +| Rolling | [master](https://github.com/ros-controls/control_msgs/tree/master) | [![Rolling Binary Build](https://github.com/ros-controls/control_msgs/actions/workflows/rolling-build.yml/badge.svg)](https://github.com/ros-controls/control_msgs/actions/workflows/rolling-build.yml) | ## Code Formatting @@ -25,10 +28,3 @@ To run it initially over the whole repo you can use: ``` pre-commit run -a ``` - -If you get error that something is missing on your computer, do the following for: - - - `clang-format-10` - ``` - sudo apt install clang-format-10 - ``` diff --git a/control_msgs/CHANGELOG.rst b/control_msgs/CHANGELOG.rst index 373aad8..8f9fa6a 100644 --- a/control_msgs/CHANGELOG.rst +++ b/control_msgs/CHANGELOG.rst @@ -2,6 +2,12 @@ Changelog for package control_msgs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5.1.0 (2024-04-09) +------------------ +* Add ParallelGripperCommand (`#99 `_) +* Specify BSD as BSD-3-Clause (`#114 `_) +* Contributors: Christoph Fröhlich, Paul Gesel + 5.0.0 (2023-04-28) ------------------ * Update JTC state message (`#86 `_) diff --git a/control_msgs/CMakeLists.txt b/control_msgs/CMakeLists.txt index fa2ed67..5875975 100644 --- a/control_msgs/CMakeLists.txt +++ b/control_msgs/CMakeLists.txt @@ -21,6 +21,7 @@ find_package(trajectory_msgs REQUIRED) set(msg_files msg/AdmittanceControllerState.msg + msg/CartesianTrajectoryGeneratorState.msg msg/DynamicJointState.msg msg/GripperCommand.msg msg/InterfaceValue.msg @@ -39,6 +40,7 @@ set(msg_files ) set(action_files + action/ParallelGripperCommand.action action/FollowJointTrajectory.action action/GripperCommand.action action/JointTrajectory.action @@ -49,13 +51,9 @@ set(action_files set(srv_files srv/QueryCalibrationState.srv srv/QueryTrajectoryState.srv + srv/ResetDofs.srv ) -if(BUILD_TESTING) - find_package(ament_lint_auto REQUIRED) - ament_lint_auto_find_test_dependencies() -endif() - rosidl_generate_interfaces(${PROJECT_NAME} ${action_files} ${msg_files} diff --git a/control_msgs/action/ParallelGripperCommand.action b/control_msgs/action/ParallelGripperCommand.action new file mode 100644 index 0000000..90405b9 --- /dev/null +++ b/control_msgs/action/ParallelGripperCommand.action @@ -0,0 +1,18 @@ +# Parallel grippers refer to an end effector where two opposing fingers grasp an object from opposite sides. +sensor_msgs/JointState command +# name: the name(s) of the joint this command is requesting +# position: desired position of each gripper joint (radians or meters) +# velocity: (optional, not used if empty) max velocity of the joint allowed while moving (radians or meters / second) +# effort: (optional, not used if empty) max effort of the joint allowed while moving (Newtons or Newton-meters) +--- +sensor_msgs/JointState state # The current gripper state. +# position of each joint (radians or meters) +# optional: velocity of each joint (radians or meters / second) +# optional: effort of each joint (Newtons or Newton-meters) +bool stalled # True if the gripper is exerting max effort and not moving +bool reached_goal # True if the gripper position has reached the commanded setpoint +--- +sensor_msgs/JointState state # The current gripper state. +# position of each joint (radians or meters) +# optional: velocity of each joint (radians or meters / second) +# optional: effort of each joint (Newtons or Newton-meters) diff --git a/control_msgs/doc/conf.py b/control_msgs/doc/conf.py new file mode 100644 index 0000000..b6134e9 --- /dev/null +++ b/control_msgs/doc/conf.py @@ -0,0 +1,5 @@ +# Configuration file for the Sphinx documentation builder. +# settings will be overridden by rosdoc2, so we add here only custom settings + +copyright = "2024, ros2_control development team" +html_logo = "https://control.ros.org/master/_static/logo_ros-controls.png" diff --git a/control_msgs/doc/index.rst b/control_msgs/doc/index.rst new file mode 100644 index 0000000..51dec92 --- /dev/null +++ b/control_msgs/doc/index.rst @@ -0,0 +1,23 @@ +Welcome to the documentation for control_msgs +=============================================== + +control_msgs contains base messages and actions useful for controlling robots. It provides representations for controller setpoints and joint and cartesian trajectories. + +For more information of the ros2_control framework see `control.ros.org `__. + +API documentation +------------------ + +.. toctree:: + :maxdepth: 2 + + Action Definitions + Message Definitions + Service Definitions + + +Indices and Search +================== + +* :ref:`genindex` +* :ref:`search` diff --git a/control_msgs/msg/CartesianTrajectoryGeneratorState.msg b/control_msgs/msg/CartesianTrajectoryGeneratorState.msg new file mode 100644 index 0000000..a83fbf5 --- /dev/null +++ b/control_msgs/msg/CartesianTrajectoryGeneratorState.msg @@ -0,0 +1,15 @@ +std_msgs/Header header + +string[] dof_names +# The set point, that is, the reference. +trajectory_msgs/MultiDOFJointTrajectoryPoint reference_world +trajectory_msgs/MultiDOFJointTrajectoryPoint reference_local +# Current value of the process (ie: latest sensor measurement or estimation on the controlled value). +trajectory_msgs/MultiDOFJointTrajectoryPoint feedback +# Adjusted feedback message for the interpolation in the local frame. +trajectory_msgs/MultiDOFJointTrajectoryPoint feedback_local +# The error of the controlled value, essentially reference - feedback (for a regular PID implementation). +trajectory_msgs/MultiDOFJointTrajectoryPoint error +# Current output of the controller. +trajectory_msgs/MultiDOFJointTrajectoryPoint output_world +trajectory_msgs/MultiDOFJointTrajectoryPoint output_local diff --git a/control_msgs/package.xml b/control_msgs/package.xml index 83b79a0..b471d1f 100644 --- a/control_msgs/package.xml +++ b/control_msgs/package.xml @@ -2,20 +2,25 @@ control_msgs - 5.0.0 + 5.1.0 control_msgs contains base messages and actions useful for - controlling robots. It provides representations for controller + controlling robots. It provides representations for controller setpoints and joint and cartesian trajectories. Bence Magyar - BSD - http://ros.org/wiki/control_msgs + + BSD-3-Clause + + https://control.ros.org Stuart Glaser ament_cmake rosidl_default_generators + + + action_msgs builtin_interfaces geometry_msgs diff --git a/control_msgs/srv/ResetDofs.srv b/control_msgs/srv/ResetDofs.srv new file mode 100644 index 0000000..a6a5e9b --- /dev/null +++ b/control_msgs/srv/ResetDofs.srv @@ -0,0 +1,8 @@ +# This service enables resetting internal value of a controller with multiple degrees of freedom. + +string[] names +float64[] positions # if present, positions should match size of dof names and also size of velocities/accelerations +float64[] velocities +float64[] accelerations +--- +bool ok