Skip to content

Commit adb5f26

Browse files
authored
Merge branch 'master' into robot-description-in-arg-66
2 parents daf0f55 + 41d9e74 commit adb5f26

22 files changed

+74
-32
lines changed

.github/workflows/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11

22
ROS2 Distro | Branch | Build status | Documentation | Released packages
33
:---------: | :----: | :----------: | :-----------: | :---------------:
4-
**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) <br /> [![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) <br /> [![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)
4+
**Rolling** | [`master`](https://github.com/ros-controls/kinematics_interface/tree/master) | [![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) <br /> [![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) <br /> [![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)
5+
**Jazzy** | [`master`](https://github.com/ros-controls/kinematics_interface/tree/master) | see above | [API](http://docs.ros.org/en/jazzy/p/kinematics_interface/) [API kdl](http://docs.ros.org/en/jazzy/p/kinematics_interface_kdl/) | [kinematics_interface](https://index.ros.org/p/kinematics_interface/#jazzy)
6+
**Iron** | [`master`](https://github.com/ros-controls/kinematics_interface/tree/master) | see above | [API](http://docs.ros.org/en/iron/p/kinematics_interface/) [API kdl](http://docs.ros.org/en/iron/p/kinematics_interface_kdl/) | [kinematics_interface](https://index.ros.org/p/kinematics_interface/#iron)
57
**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) <br /> [![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) <br /> [![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)
68

79
### Explanation of different build types

.github/workflows/humble-coverage-build.yml

-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@ jobs:
1515
secrets: inherit
1616
with:
1717
ros_distro: humble
18-
os_name: ubuntu-22.04

.github/workflows/humble-pre-commit.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,5 @@ on:
99
jobs:
1010
pre-commit:
1111
uses: ros-controls/ros2_control_ci/.github/workflows/reusable-pre-commit.yml@master
12-
strategy:
13-
fail-fast: false
14-
matrix:
15-
ROS_DISTRO: [humble]
1612
with:
17-
ros_distro: ${{ matrix.ROS_DISTRO }}
18-
os_name: ubuntu-22.04
13+
ros_distro: humble

.github/workflows/humble-source-build.yml

+1
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ jobs:
1919
ros_distro: ${{ matrix.ROS_DISTRO }}
2020
ref: master
2121
ros2_repo_branch: ${{ matrix.ROS_DISTRO }}
22+
os_name: ubuntu-22.04

.github/workflows/rolling-abi-compatibility.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
ROS_DISTRO: [rolling, iron]
14+
ROS_DISTRO: [rolling, jazzy, iron]
1515
steps:
1616
- uses: actions/checkout@v4
1717
- uses: ros-industrial/industrial_ci@master

.github/workflows/rolling-binary-build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
ROS_DISTRO: [rolling, iron]
23+
ROS_DISTRO: [rolling, jazzy, iron]
2424
ROS_REPO: [main, testing]
2525
with:
2626
ros_distro: ${{ matrix.ROS_DISTRO }}

.github/workflows/rolling-coverage-build.yml

-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@ jobs:
1515
secrets: inherit
1616
with:
1717
ros_distro: rolling
18-
os_name: ubuntu-22.04

.github/workflows/rolling-debian-build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
ROS_DISTRO: [rolling, iron]
18+
ROS_DISTRO: [rolling, jazzy, iron]
1919
with:
2020
ros_distro: ${{ matrix.ROS_DISTRO }}
2121
upstream_workspace: kinematics_interface.${{ matrix.ROS_DISTRO }}.repos

.github/workflows/rolling-pre-commit.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
ROS_DISTRO: [rolling, iron]
15+
ROS_DISTRO: [iron, jazzy, rolling]
1616
with:
1717
ros_distro: ${{ matrix.ROS_DISTRO }}
18-
os_name: ubuntu-22.04

.github/workflows/rolling-rhel-semi-binary-build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
ROS_DISTRO: [rolling, iron]
18+
ROS_DISTRO: [rolling, jazzy, iron]
1919
with:
2020
ros_distro: ${{ matrix.ROS_DISTRO }}
2121
upstream_workspace: kinematics_interface.${{ matrix.ROS_DISTRO }}.repos

.github/workflows/rolling-semi-binary-build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
ROS_DISTRO: [rolling, iron]
22+
ROS_DISTRO: [rolling, jazzy, iron]
2323
ROS_REPO: [main, testing]
2424
with:
2525
ros_distro: ${{ matrix.ROS_DISTRO }}

.github/workflows/rolling-source-build.yml

+12-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,19 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
ROS_DISTRO: [rolling, iron]
17+
include:
18+
- ROS_DISTRO: iron
19+
CONTAINER: ""
20+
OS_NAME: ubuntu-22.04
21+
- ROS_DISTRO: jazzy
22+
CONTAINER: ubuntu:24.04
23+
OS_NAME: ubuntu-latest
24+
- ROS_DISTRO: rolling
25+
CONTAINER: ubuntu:24.04
26+
OS_NAME: ubuntu-latest
1827
with:
1928
ros_distro: ${{ matrix.ROS_DISTRO }}
2029
ref: master
2130
ros2_repo_branch: ${{ matrix.ROS_DISTRO }}
31+
os_name: ${{ matrix.OS_NAME }}
32+
container: ${{ matrix.CONTAINER }}

.github/workflows/update-pre-commit.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: Auto Update pre-commit
55
on:
66
workflow_dispatch:
77
schedule:
8-
- cron: '0 0 * * 0' # Run every Sunday at midnight
8+
- cron: '0 0 1 * *' # Runs at 00:00, on day 1 of the month
99

1010
jobs:
1111
auto_update_and_create_pr:

.pre-commit-config.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ repos:
3636

3737
# Python hooks
3838
- repo: https://github.com/asottile/pyupgrade
39-
rev: v3.15.2
39+
rev: v3.17.0
4040
hooks:
4141
- id: pyupgrade
4242
args: [--py36-plus]
@@ -49,20 +49,20 @@ repos:
4949
args: ["--ignore=D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404"]
5050

5151
- repo: https://github.com/psf/black
52-
rev: 24.3.0
52+
rev: 24.4.2
5353
hooks:
5454
- id: black
5555
args: ["--line-length=99"]
5656

5757
- repo: https://github.com/pycqa/flake8
58-
rev: 7.0.0
58+
rev: 7.1.0
5959
hooks:
6060
- id: flake8
6161
args: ["--extend-ignore=E501"]
6262

6363
# CPP hooks
6464
- repo: https://github.com/pre-commit/mirrors-clang-format
65-
rev: v18.1.3
65+
rev: v18.1.8
6666
hooks:
6767
- id: clang-format
6868
args: ['-fallback-style=none', '-i']
@@ -124,14 +124,14 @@ repos:
124124
# Spellcheck in comments and docs
125125
# skipping of *.svg files is not working...
126126
- repo: https://github.com/codespell-project/codespell
127-
rev: v2.2.6
127+
rev: v2.3.0
128128
hooks:
129129
- id: codespell
130130
args: ['--write-changes']
131131
exclude: CHANGELOG\.rst|\.(svg|pyc)$
132132

133133
- repo: https://github.com/python-jsonschema/check-jsonschema
134-
rev: 0.28.1
134+
rev: 0.29.1
135135
hooks:
136136
- id: check-github-workflows
137137
args: ["--verbose"]

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This is a ROS 2 package for using C++ kinematics frameworks in the context of RO
99
ROS2 Distro | Branch | Build status | Documentation | Released packages
1010
:---------: | :----: | :----------: | :-----------: | :---------------:
1111
**Rolling** | [`master`](https://github.com/ros-controls/kinematics_interface/tree/master) | [![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) <br /> [![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) | [API](http://docs.ros.org/en/rolling/p/kinematics_interface/) [API kdl](http://docs.ros.org/en/rolling/p/kinematics_interface_kdl/) | [kinematics_interface](https://index.ros.org/p/kinematics_interface/#rolling)
12+
**Jazzy** | [`master`](https://github.com/ros-controls/kinematics_interface/tree/master) | see above | [API](http://docs.ros.org/en/jazzy/p/kinematics_interface/) [API kdl](http://docs.ros.org/en/jazzy/p/kinematics_interface_kdl/) | [kinematics_interface](https://index.ros.org/p/kinematics_interface/#jazzy)
1213
**Iron** | [`master`](https://github.com/ros-controls/kinematics_interface/tree/master) | see above | [API](http://docs.ros.org/en/iron/p/kinematics_interface/) [API kdl](http://docs.ros.org/en/iron/p/kinematics_interface_kdl/) | [kinematics_interface](https://index.ros.org/p/kinematics_interface/#iron)
1314
**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=humble)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-binary-build.yml) <br /> [![Humble Semi-Binary Build](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-semi-binary-build.yml/badge.svg?branch=humble)](https://github.com/ros-controls/kinematics_interface/actions/workflows/humble-semi-binary-build.yml) | [API](http://docs.ros.org/en/humble/p/kinematics_interface/) [API kdl](http://docs.ros.org/en/humble/p/kinematics_interface_kdl/) | [kinematics_interface](https://index.ros.org/p/kinematics_interface/#humble)
1415

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
repositories:
2+
## EXAMPLE DEPENDENCY
3+
# <some_ros_package>:
4+
# type: git
5+
# url: [email protected]:<some_github_namespace>/<some_ros_package>.git
6+
# version: master

kinematics_interface.jazzy.repos

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
repositories:
2+
ros2_control:
3+
type: git
4+
url: https://github.com/ros-controls/ros2_control.git
5+
version: master

kinematics_interface/CHANGELOG.rst

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
Changelog for package kinematics_interface
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
1.1.0 (2024-05-20)
6+
------------------
7+
* Use CMake targets for eigen (`#50 <https://github.com/ros-controls/kinematics_interface/issues/50>`_)
8+
* Contributors: Christoph Fröhlich
9+
510
1.0.0 (2023-11-16)
611
------------------
712
* Use a dynamic library instead of header-only (`#21 <https://github.com/ros-controls/kinematics_interface/issues/21>`_)

kinematics_interface/package.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>kinematics_interface</name>
5-
<version>1.0.0</version>
5+
<version>1.1.0</version>
66
<description>Kinematics interface for ROS 2 control</description>
77
<maintainer email="[email protected]">Denis Štogl</maintainer>
88
<maintainer email="[email protected]">Bence Magyar</maintainer>

kinematics_interface_kdl/CHANGELOG.rst

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
Changelog for package kinematics_interface_kdl
33
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44

5+
1.1.0 (2024-05-20)
6+
------------------
7+
* Read base parameter in initialize function (`#73 <https://github.com/ros-controls/kinematics_interface/issues/73>`_)
8+
* Use CMake targets for eigen (`#50 <https://github.com/ros-controls/kinematics_interface/issues/50>`_)
9+
* Contributors: Bence Magyar, Christoph Fröhlich
10+
511
1.0.0 (2023-11-16)
612
------------------
713
* 🤔 Remove compile warnings and unify for-loop syntax. (`#15 <https://github.com/ros-controls/kinematics_interface/issues/15>`_)

kinematics_interface_kdl/package.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>kinematics_interface_kdl</name>
5-
<version>1.0.0</version>
5+
<version>1.1.0</version>
66
<description>KDL implementation of ros2_control kinematics interface</description>
77
<maintainer email="[email protected]">Bence Magyar</maintainer>
88
<maintainer email="[email protected]">Denis Štogl</maintainer>

kinematics_interface_kdl/src/kinematics_interface_kdl.cpp

+19-6
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,17 @@ bool KinematicsInterfaceKDL::initialize(
2727
{
2828
// track initialization plugin
2929
initialized = true;
30+
31+
// get parameters
32+
std::string ns = !param_namespace.empty() ? param_namespace + "." : "";
3033

3134
std::string robot_description_local;
3235
if (robot_description.empty())
3336
{
3437
// If the robot_description input argument is empty, try to get the
3538
// robot_description from the node's parameters.
3639
auto robot_param = rclcpp::Parameter();
37-
if (!parameters_interface->get_parameter(param_namespace + "robot_description", robot_param))
40+
if (!parameters_interface->get_parameter(ns + "robot_description", robot_param))
3841
{
3942
RCLCPP_ERROR(LOGGER, "parameter robot_description not set in kinematics_interface_kdl");
4043
return false;
@@ -46,8 +49,6 @@ bool KinematicsInterfaceKDL::initialize(
4649
robot_description_local = robot_description;
4750
}
4851

49-
// get parameters
50-
std::string ns = !param_namespace.empty() ? param_namespace + "." : "";
5152
// get alpha damping term
5253
auto alpha_param = rclcpp::Parameter("alpha", 0.000005);
5354
if (parameters_interface->has_parameter(ns + "alpha"))
@@ -57,16 +58,28 @@ bool KinematicsInterfaceKDL::initialize(
5758
alpha = alpha_param.as_double();
5859
// get end-effector name
5960
auto end_effector_name = rclcpp::Parameter("tip", "MISSING_END_EFFECTOR_NAME");
60-
if (parameters_interface->has_parameter(ns + "tip"))
61+
if (parameters_interface->has_parameter(param_namespace + "tip"))
6162
{
6263
parameters_interface->get_parameter(ns + "tip", end_effector_name);
6364
}
6465

6566
// create kinematic chain
6667
KDL::Tree robot_tree;
6768
kdl_parser::treeFromString(robot_description_local, robot_tree);
68-
root_name_ = robot_tree.getRootSegment()->first;
69-
if (!robot_tree.getChain(root_name_, end_effector_name.as_string(), chain_))
69+
70+
// get root name
71+
auto base_param = rclcpp::Parameter();
72+
if (parameters_interface->has_parameter(ns + "base"))
73+
{
74+
parameters_interface->get_parameter(ns + "base", base_param);
75+
root_name_ = base_param.as_string();
76+
}
77+
else
78+
{
79+
root_name_ = robot_tree.getRootSegment()->first;
80+
}
81+
82+
if (!robot_tree.getChain(root_name_, end_effector_name, chain_))
7083
{
7184
RCLCPP_ERROR(
7285
LOGGER, "failed to find chain from robot root %s to end effector %s", root_name_.c_str(),

0 commit comments

Comments
 (0)