diff --git a/.github/workflows/README.md b/.github/workflows/README.md
index a7490ce..d67e0b9 100644
--- a/.github/workflows/README.md
+++ b/.github/workflows/README.md
@@ -1,8 +1,8 @@
ROS2 Distro | Branch | Build status | Documentation | Released packages
:---------: | :----: | :----------: | :-----------: | :---------------:
-**Rolling** | [`rolling`](https://github.com/ros-controls/kinematics_interface/tree/rolling) | [![Rolling Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-binary-build-main.yml?branch=master)
[![Rolling Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-binary-build-testing.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-binary-build-testing.yml?branch=master)
[![Rolling Semi-Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-semi-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-semi-binary-build-main.yml?branch=master)
[![Rolling Semi-Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-semi-binary-build-testing.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-semi-binary-build-testing.yml?branch=master)
[![Rolling Source Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-source-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-source-build.yml?branch=master) | | [kinematics_interface](https://index.ros.org/p/kinematics_interface/#rolling)
-**Humble** | [`humble`](https://github.com/ros-controls/kinematics_interface/tree/humble) | [![Humble Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-binary-build-main.yml?branch=master)
[![Humble Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-binary-build-testing.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-binary-build-testing.yml?branch=master)
[![Humble Semi-Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-semi-binary-build-main.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-semi-binary-build-main.yml?branch=master)
[![Humble Semi-Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-semi-binary-build-testing.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-semi-binary-build-testing.yml?branch=master)
[![Humble Source Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-source-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-source-build.yml?branch=master) | | [kinematics_interface](https://index.ros.org/p/kinematics_interface/#humble)
+**Rolling** | [`rolling`](https://github.com/ros-controls/kinematics_interface/tree/rolling) | [![Rolling Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-binary-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-binary-build.yml?branch=master)
[![Rolling Semi-Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-semi-binary-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-semi-binary-build.yml?branch=master)
[![Rolling Source Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-source-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/rolling-source-build.yml?branch=master) | [API](http://docs.ros.org/en/rolling/p/kinematics_interface/) | [kinematics_interface](https://index.ros.org/p/kinematics_interface/#rolling)
+**Humble** | [`humble`](https://github.com/ros-controls/kinematics_interface/tree/humble) | [![Humble Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-binary-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-binary-build.yml?branch=master)
[![Humble Semi-Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-semi-binary-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-semi-binary-build.yml?branch=master)
[![Humble Source Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-source-build.yml/badge.svg?branch=master)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-source-build.yml?branch=master) | [API](http://docs.ros.org/en/humble/p/kinematics_interface/) | [kinematics_interface](https://index.ros.org/p/kinematics_interface/#humble)
### Explanation of different build types
diff --git a/.github/workflows/humble-coverage-build.yml b/.github/workflows/humble-coverage-build.yml
new file mode 100644
index 0000000..3331352
--- /dev/null
+++ b/.github/workflows/humble-coverage-build.yml
@@ -0,0 +1,18 @@
+name: Coverage Build - Humble
+on:
+ workflow_dispatch:
+ push:
+ branches:
+ - humble
+ pull_request:
+ branches:
+ - humble
+
+jobs:
+ coverage_humble:
+ name: coverage build - humble
+ uses: ros-controls/ros2_control_ci/.github/workflows/reusable-build-coverage.yml@master
+ secrets: inherit
+ with:
+ ros_distro: humble
+ os_name: ubuntu-22.04
diff --git a/.github/workflows/humble-pre-commit.yml b/.github/workflows/humble-pre-commit.yml
new file mode 100644
index 0000000..039c0a8
--- /dev/null
+++ b/.github/workflows/humble-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/rolling-coverage-build.yml b/.github/workflows/rolling-coverage-build.yml
new file mode 100644
index 0000000..63bf7ec
--- /dev/null
+++ b/.github/workflows/rolling-coverage-build.yml
@@ -0,0 +1,18 @@
+name: Coverage Build - Rolling
+on:
+ workflow_dispatch:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+
+jobs:
+ coverage_rolling:
+ name: coverage build - rolling
+ uses: ros-controls/ros2_control_ci/.github/workflows/reusable-build-coverage.yml@master
+ secrets: inherit
+ with:
+ ros_distro: rolling
+ os_name: ubuntu-22.04
diff --git a/.github/workflows/rolling-pre-commit.yml b/.github/workflows/rolling-pre-commit.yml
new file mode 100644
index 0000000..cbb4c5c
--- /dev/null
+++ b/.github/workflows/rolling-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/update-pre-commit.yml b/.github/workflows/update-pre-commit.yml
new file mode 100644
index 0000000..8b9545d
--- /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 * * 0' # Run every Sunday at midnight
+
+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 5545b49..ec3cbbf 100755
--- 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.5.0
hooks:
- id: check-added-large-files
- id: check-ast
@@ -36,7 +36,7 @@ repos:
# Python hooks
- repo: https://github.com/asottile/pyupgrade
- rev: v3.4.0
+ rev: v3.15.1
hooks:
- id: pyupgrade
args: [--py36-plus]
@@ -48,21 +48,23 @@ repos:
- id: pydocstyle
args: ["--ignore=D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404"]
+ - repo: https://github.com/psf/black
+ rev: 24.2.0
+ 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: ["--extend-ignore=E501"]
# CPP hooks
- - repo: local
+ - repo: https://github.com/pre-commit/mirrors-clang-format
+ rev: v17.0.6
hooks:
- id: clang-format
- name: clang-format
- description: Format files with ClangFormat.
- entry: clang-format-14
- language: system
- files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|proto|vert)$
args: ['-fallback-style=none', '-i']
- repo: local
@@ -70,18 +72,15 @@ repos:
- id: ament_cppcheck
name: ament_cppcheck
description: Static code analysis of C/C++ files.
- stages: [commit]
- entry: ament_cppcheck
+ 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)$
@@ -93,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$
@@ -104,7 +102,6 @@ repos:
- id: ament_copyright
name: ament_copyright
description: Check if copyright notice is available in all files.
- stages: [commit]
entry: ament_copyright
language: system
@@ -127,8 +124,18 @@ repos:
# Spellcheck in comments and docs
# skipping of *.svg files is not working...
- repo: https://github.com/codespell-project/codespell
- rev: v2.2.4
+ rev: v2.2.6
hooks:
- id: codespell
args: ['--write-changes']
exclude: CHANGELOG\.rst|\.(svg|pyc)$
+
+ - repo: https://github.com/python-jsonschema/check-jsonschema
+ rev: 0.28.0
+ hooks:
+ - id: check-github-workflows
+ args: ["--verbose"]
+ - id: check-github-actions
+ args: ["--verbose"]
+ - id: check-dependabot
+ args: ["--verbose"]
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 07a84a5..adadaa2 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -54,7 +54,9 @@ As this project, by default, uses the default GitHub issue labels
## Licensing
-Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that [license]:
+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,
@@ -69,4 +71,3 @@ Any contribution that you make to this repository will be under the Apache 2 Lic
[issues]: https://github.com/ros-controls/kinematics_interface/issues
[closed-issues]: https://github.com/ros-controls/kinematics_interface/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20
[help-wanted]: https://github.com/ros-controls/kinematics_interface/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22
-[license]: http://www.apache.org/licenses/LICENSE-2.0.html
diff --git a/README.md b/README.md
index c468730..f0d9061 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,7 @@
# kinematics_interface
+[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
+[![codecov](https://codecov.io/gh/ros-controls/kinematics_interface/graph/badge.svg?token=NS73VKPG9V)](https://codecov.io/gh/ros-controls/kinematics_interface)
+
This is a ROS 2 package for using C++ kinematics frameworks in the context of ROS 2 control. A kinematics interface is designed to allow ROS 2 controllers to control robots in Cartesian space. This package also contains a basic implementation of the interface using KDL.
## Build status
diff --git a/codecov.yml b/codecov.yml
new file mode 100644
index 0000000..ff3d9ff
--- /dev/null
+++ b/codecov.yml
@@ -0,0 +1,17 @@
+coverage:
+ precision: 2
+ round: down
+ range: "35...100"
+ status:
+ project:
+ default:
+ informational: true
+ patch: off
+fixes:
+ - "ros_ws/src/*/kinematics_interface/::"
+ignore:
+ - "**/test"
+ - "test"
+comment:
+ layout: "diff, flags, files"
+ behavior: default