Skip to content

Commit

Permalink
Merge branch 'humble' into mergify/bp/humble/pr-805
Browse files Browse the repository at this point in the history
  • Loading branch information
destogl authored Nov 17, 2022
2 parents 86b8b18 + 62a3d26 commit e59a7a3
Show file tree
Hide file tree
Showing 34 changed files with 138 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/galactic-rhel-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
env:
ROS_DISTRO: galactic
container: jaronl/ros:galactic-alma
container: ghcr.io/ros-controls/ros:galactic-rhel
steps:
- uses: actions/checkout@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/humble-abi-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Humble - ABI Compatibility Check
on:
workflow_dispatch:
branches:
- master
- humble
pull_request:
branches:
- master
- humble

jobs:
abi_check:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/humble-binary-build-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ name: Humble Binary Build - main
on:
workflow_dispatch:
branches:
- master
- humble
pull_request:
branches:
- master
- humble
push:
branches:
- master
- humble
schedule:
# Run every morning to detect flakiness and broken dependencies
- cron: '03 1 * * *'
Expand All @@ -23,4 +23,4 @@ jobs:
ros_distro: humble
ros_repo: main
upstream_workspace: ros2_control-not-released.humble.repos
ref_for_scheduled_build: master
ref_for_scheduled_build: humble
8 changes: 4 additions & 4 deletions .github/workflows/humble-binary-build-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ name: Humble Binary Build - testing
on:
workflow_dispatch:
branches:
- master
- humble
pull_request:
branches:
- master
- humble
push:
branches:
- master
- humble
schedule:
# Run every morning to detect flakiness and broken dependencies
- cron: '03 1 * * *'
Expand All @@ -23,4 +23,4 @@ jobs:
ros_distro: humble
ros_repo: testing
upstream_workspace: ros2_control-not-released.humble.repos
ref_for_scheduled_build: master
ref_for_scheduled_build: humble
22 changes: 11 additions & 11 deletions .github/workflows/humble-rhel-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ name: Humble RHEL Binary Build
on:
workflow_dispatch:
branches:
- master
# pull_request:
# branches:
# - master
# push:
# branches:
# - master
# schedule:
# # Run every day to detect flakiness and broken dependencies
# - cron: '03 1 * * *'
- humble
pull_request:
branches:
- humble
push:
branches:
- humble
schedule:
# Run every day to detect flakiness and broken dependencies
- cron: '03 1 * * *'

jobs:
humble_rhel_binary:
name: Humble RHEL binary build
runs-on: ubuntu-latest
env:
ROS_DISTRO: humble
container: jaronl/ros:humble-alma
container: ghcr.io/ros-controls/ros:humble-rhel
steps:
- uses: actions/checkout@v3
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/humble-semi-binary-build-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ name: Humble Semi-Binary Build - main
on:
workflow_dispatch:
branches:
- master
- humble
pull_request:
branches:
- master
- humble
push:
branches:
- master
- humble
schedule:
# Run every morning to detect flakiness and broken dependencies
- cron: '33 1 * * *'
Expand All @@ -22,4 +22,4 @@ jobs:
ros_distro: humble
ros_repo: main
upstream_workspace: ros2_control.humble.repos
ref_for_scheduled_build: master
ref_for_scheduled_build: humble
8 changes: 4 additions & 4 deletions .github/workflows/humble-semi-binary-build-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ name: Humble Semi-Binary Build - testing
on:
workflow_dispatch:
branches:
- master
- humble
pull_request:
branches:
- master
- humble
push:
branches:
- master
- humble
schedule:
# Run every morning to detect flakiness and broken dependencies
- cron: '33 1 * * *'
Expand All @@ -22,4 +22,4 @@ jobs:
ros_distro: humble
ros_repo: testing
upstream_workspace: ros2_control.humble.repos
ref_for_scheduled_build: master
ref_for_scheduled_build: humble
6 changes: 3 additions & 3 deletions .github/workflows/humble-source-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Humble Source Build
on:
workflow_dispatch:
branches:
- master
- humble
push:
branches:
- master
- humble
schedule:
# Run every day to detect flakiness and broken dependencies
- cron: '03 3 * * *'
Expand All @@ -15,5 +15,5 @@ jobs:
uses: ./.github/workflows/reusable-ros-tooling-source-build.yml
with:
ros_distro: humble
ref: master
ref: humble
ros2_repo_branch: humble
2 changes: 1 addition & 1 deletion .github/workflows/reusable-industrial-ci-with-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
env:
CCACHE_DIR: ${{ github.workspace }}/${{ inputs.ccache_dir }}
BASEDIR: ${{ github.workspace }}/${{ inputs.basedir }}
CACHE_PREFIX: ${{ inputs.ros_distro }}-${{ inputs.os_code_name }}-${{ inputs.ros_repo }}-${{ github.job }}
CACHE_PREFIX: ${{ inputs.ros_distro }}-${{ inputs.upstream_workspace }}-${{ inputs.ros_repo }}-${{ github.job }}
steps:
- name: Checkout ${{ inputs.ref }} when build is not scheduled
if: ${{ github.event_name != 'schedule' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rolling-rhel-binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
env:
ROS_DISTRO: rolling
container: jaronl/ros:rolling-alma
container: ghcr.io/ros-controls/ros:rolling-rhel
steps:
- uses: actions/checkout@v3
with:
Expand Down
5 changes: 5 additions & 0 deletions controller_interface/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog for package controller_interface
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.16.0 (2022-10-17)
-------------------
* Add docs in export interface configurations for controllers. (`#804 <https://github.com/ros-controls/ros2_control/issues/804>`_) (`#842 <https://github.com/ros-controls/ros2_control/issues/842>`_)
* Contributors: Denis Štogl

2.15.0 (2022-09-19)
-------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,37 @@ class ControllerInterfaceBase : public rclcpp_lifecycle::node_interfaces::Lifecy
CONTROLLER_INTERFACE_PUBLIC
virtual ~ControllerInterfaceBase() = default;

/// Get configuration for controller's required command interfaces.
/**
* Method used by the controller_manager to get the set of command interfaces used by the controller.
* Each controller can use individual method to determine interface names that in simples case
* have the following format: `<joint>/<interface>`.
* The method is called only in `inactive` or `active` state, i.e., `on_configure` has to be
* called first.
* The configuration is used to check if controller can be activated and to claim interfaces from
* hardware.
* The claimed interfaces are populated in the
* \ref ControllerInterfaceBase::command_interfaces_ "command_interfaces_" member.
*
* \returns configuration of command interfaces.
*/
CONTROLLER_INTERFACE_PUBLIC
virtual InterfaceConfiguration command_interface_configuration() const = 0;

/// Get configuration for controller's required state interfaces.
/**
* Method used by the controller_manager to get the set of state interface used by the controller.
* Each controller can use individual method to determine interface names that in simples case
* have the following format: `<joint>/<interface>`.
* The method is called only in `inactive` or `active` state, i.e., `on_configure` has to be
* called first.
* The configuration is used to check if controller can be activated and to claim interfaces from
* hardware.
* The claimed interfaces are populated in the
* \ref ControllerInterfaceBase::state_interface_ "state_interface_" member.
*
* \returns configuration of state interfaces.
*/
CONTROLLER_INTERFACE_PUBLIC
virtual InterfaceConfiguration state_interface_configuration() const = 0;

Expand Down
2 changes: 1 addition & 1 deletion controller_interface/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="2">
<name>controller_interface</name>
<version>2.15.0</version>
<version>2.16.0</version>
<description>Description of controller_interface</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Denis Štogl</maintainer>
Expand Down
6 changes: 6 additions & 0 deletions controller_manager/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Changelog for package controller_manager
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.16.0 (2022-10-17)
-------------------
* Search for controller manager in the same namespace as spawner (`#810 <https://github.com/ros-controls/ros2_control/issues/810>`_) (`#839 <https://github.com/ros-controls/ros2_control/issues/839>`_)
* Don't ask to export reference interface if controller not 'inactive' or 'active' (`#824 <https://github.com/ros-controls/ros2_control/issues/824>`_) (`#843 <https://github.com/ros-controls/ros2_control/issues/843>`_)
* Contributors: Denis Štogl, Tony Najjar

2.15.0 (2022-09-19)
-------------------

Expand Down
15 changes: 9 additions & 6 deletions controller_manager/controller_manager/spawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,6 @@ def is_controller_loaded(node, controller_manager, controller_name):
return any(c.name == controller_name for c in controllers)


def make_absolute(name):
return name if name.startswith('/') else ('/' + name)


def main(args=None):

rclpy.init(args=args, signal_handler_options=SignalHandlerOptions.NO)
Expand All @@ -124,7 +120,7 @@ def main(args=None):
'controller_name', help='Name of the controller')
parser.add_argument(
'-c', '--controller-manager', help='Name of the controller manager ROS node',
default='/controller_manager', required=False)
default='controller_manager', required=False)
parser.add_argument(
'-p', '--param-file',
help='Controller param file to be loaded into controller node before configure',
Expand Down Expand Up @@ -153,7 +149,7 @@ def main(args=None):
command_line_args = rclpy.utilities.remove_ros_args(args=sys.argv)[1:]
args = parser.parse_args(command_line_args)
controller_name = args.controller_name
controller_manager_name = make_absolute(args.controller_manager)
controller_manager_name = args.controller_manager
param_file = args.param_file
controller_type = args.controller_type
controller_manager_timeout = args.controller_manager_timeout
Expand All @@ -162,6 +158,13 @@ def main(args=None):
raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), param_file)

node = Node('spawner_' + controller_name)
if not controller_manager_name.startswith('/'):
spawner_namespace = node.get_namespace()
if spawner_namespace != '/':
controller_manager_name = f"{spawner_namespace}/{controller_manager_name}"
else:
controller_manager_name = f"/{controller_manager_name}"

try:
if not wait_for_controller_manager(node, controller_manager_name,
controller_manager_timeout):
Expand Down
2 changes: 1 addition & 1 deletion controller_manager/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="2">
<name>controller_manager</name>
<version>2.15.0</version>
<version>2.16.0</version>
<description>Description of controller_manager</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Denis Štogl</maintainer>
Expand Down
33 changes: 17 additions & 16 deletions controller_manager/src/controller_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1262,25 +1262,26 @@ void ControllerManager::list_controllers_srv_cb(
{
controller_state.required_state_interfaces = state_interface_config.names;
}
}
// check for chained interfaces
for (const auto & interface : controller_state.required_command_interfaces)
{
auto prefix_interface_type_pair = split_command_interface(interface);
auto prefix = prefix_interface_type_pair.first;
auto interface_type = prefix_interface_type_pair.second;
if (controller_chain_map.find(prefix) != controller_chain_map.end())
// check for chained interfaces
for (const auto & interface : controller_state.required_command_interfaces)
{
auto prefix_interface_type_pair = split_command_interface(interface);
auto prefix = prefix_interface_type_pair.first;
auto interface_type = prefix_interface_type_pair.second;
if (controller_chain_map.find(prefix) != controller_chain_map.end())
{
controller_chain_map[controller_state.name].insert(prefix);
controller_chain_interface_map[controller_state.name].push_back(interface_type);
}
}
// check reference interfaces only if controller is inactive or active
auto references = controllers[i].c->export_reference_interfaces();
controller_state.reference_interfaces.reserve(references.size());
for (const auto & reference : references)
{
controller_chain_map[controller_state.name].insert(prefix);
controller_chain_interface_map[controller_state.name].push_back(interface_type);
controller_state.reference_interfaces.push_back(reference.get_interface_name());
}
}
auto references = controllers[i].c->export_reference_interfaces();
controller_state.reference_interfaces.reserve(references.size());
for (const auto & reference : references)
{
controller_state.reference_interfaces.push_back(reference.get_interface_name());
}
response->controller.push_back(controller_state);
// keep track of controllers that are part of a chain
if (
Expand Down
2 changes: 1 addition & 1 deletion controller_manager/test/test_controller_manager_srvs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ TEST_F(TestControllerManagerSrvs, list_chained_controllers_srv)
ASSERT_EQ(result->controller[0].required_state_interfaces.size(), 0u);
ASSERT_EQ(result->controller[0].is_chainable, true);
ASSERT_EQ(result->controller[0].is_chained, false);
ASSERT_EQ(result->controller[0].reference_interfaces.size(), 2u);
ASSERT_EQ(result->controller[0].reference_interfaces.size(), 0u);
ASSERT_EQ(result->controller[0].chain_connections.size(), 0u);
// check test controller
ASSERT_EQ(result->controller[1].name, "test_controller_name");
Expand Down
3 changes: 3 additions & 0 deletions controller_manager_msgs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package controller_manager_msgs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.16.0 (2022-10-17)
-------------------

2.15.0 (2022-09-19)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion controller_manager_msgs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>controller_manager_msgs</name>
<version>2.15.0</version>
<version>2.16.0</version>
<description>Messages and services for the controller manager.</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Denis Štogl</maintainer>
Expand Down
5 changes: 5 additions & 0 deletions hardware_interface/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog for package hardware_interface
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2.16.0 (2022-10-17)
-------------------
* fix broken links (issue `#831 <https://github.com/ros-controls/ros2_control/issues/831>`_) (`#833 <https://github.com/ros-controls/ros2_control/issues/833>`_) (`#845 <https://github.com/ros-controls/ros2_control/issues/845>`_)
* Contributors: Manuel Muth

2.15.0 (2022-09-19)
-------------------

Expand Down
Loading

0 comments on commit e59a7a3

Please sign in to comment.