Skip to content

Commit

Permalink
Merge branch 'ros-controls:master' into feature/issue-815-hardware-in…
Browse files Browse the repository at this point in the history
…terface-add-return-value
  • Loading branch information
flochre authored Jul 27, 2023
2 parents 0ab261b + 757ccd4 commit 8aeb2a7
Show file tree
Hide file tree
Showing 32 changed files with 131 additions and 41 deletions.
4 changes: 2 additions & 2 deletions .docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Meant to provide basic docker containers for CI or development purposes. To use them, make sure you have [Docker](https://docs.docker.com/get-docker/) installed. You then can pull the latest source or build image or build any version and run the image by following tag specific commands as described below:

## Source folder and tag
Downloads and builds ros2_controls into a workspace for development use exactly as is found [here](https://ros-controls.github.io/control.ros.org/getting_started.html#compiling). This is primarily used for development and CI of ros2_control and related packages.
Downloads and builds ros2_controls into a workspace for development use exactly as is found [here](https://control.ros.org/master/doc/getting_started/getting_started.html#building-from-source). This is primarily used for development and CI of ros2_control and related packages.

You can pull a prebuilt image with this docker tag: `ghcr.io/ros-controls/ros2_control_source`.

Expand All @@ -30,7 +30,7 @@ docker run -it --mount type=volume,source=name-of-volume,destination=/root/ws_ro
Note: this is probably the preferred solution as changes persist across rebuilds of container and doesn't require you to pull all repositories that you want to edit as they'll already be in the container.

## Release folder and tag
Installs ros2_control in the base ros2 docker container as mentioned [here](https://ros-controls.github.io/control.ros.org/getting_started.html#getting-started). This is mainly intended for development of external packages that rely on ros2_control.
Installs ros2_control in the base ros2 docker container as mentioned [here](https://control.ros.org/master/doc/getting_started/getting_started.html#building-from-source). This is mainly intended for development of external packages that rely on ros2_control.

You can pull a prebuilt image using the following tag: `ghcr.io/ros2-controls/ros2_control_release`.

Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/good-first-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Nothing. This issue is meant to welcome you to Open Source :) We are happy to wa

- [ ] 🙋 **Claim this issue**: Comment below. If someone else has claimed it, ask if they've opened a pull request already and if they're stuck -- maybe you can help them solve a problem or move it along!

- [ ] 🗄️ **Create a local workspace** for making your changes and testing [following these instructions](https://docs.ros.org/en/rolling/Tutorials/Workspace/Creating-A-Workspace.html), for Step3 use "Download Source Code" section with [these instructions](https://ros-controls.github.io/control.ros.org/getting_started.html#compiling).
- [ ] 🗄️ **Create a local workspace** for making your changes and testing [following these instructions](https://docs.ros.org/en/rolling/Tutorials/Workspace/Creating-A-Workspace.html), for Step 3 use "Download Source Code" section with [these instructions](https://control.ros.org/master/doc/getting_started/getting_started.html#building-from-source).

- [ ] 🍴 **Fork the repository** using the handy button at the top of the repository page and **clone** it into `~/ws_ros2_control/src/ros-controls/ros2_control`, [here is a guide that you can follow](https://guides.github.com/activities/forking/) (You will have to remove or empty the existing `ros2_control` folder before cloning your own fork)

Expand All @@ -53,7 +53,7 @@ Nothing. This issue is meant to welcome you to Open Source :) We are happy to wa

Don’t hesitate to ask questions or to get help if you feel like you are getting stuck. For example leave a comment below!
Furthermore, you find helpful resources here:
* [ROS2 Control Contribution Guide](https://ros-controls.github.io/control.ros.org/contributing.html)
* [ROS2 Control Contribution Guide](https://control.ros.org/master/doc/contributing/contributing.html)
* [ROS2 Tutorials](https://docs.ros.org/en/rolling/Tutorials.html)
* [ROS Answers](https://answers.ros.org/questions/)

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-coverage-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
env:
ROS_DISTRO: rolling
steps:
- uses: ros-tooling/setup-ros@0.6.2
- uses: ros-tooling/setup-ros@0.7.0
with:
required-ros-distributions: ${{ env.ROS_DISTRO }}
- uses: actions/checkout@v3
- uses: ros-tooling/[email protected].2
- uses: ros-tooling/[email protected].3
with:
target-ros2-distro: ${{ env.ROS_DISTRO }}
import-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4.6.1
- uses: actions/setup-python@v4.7.0
with:
python-version: '3.10'
- name: Install system hooks
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-ros-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
linter: [cppcheck, copyright, lint_cmake]
steps:
- uses: actions/checkout@v3
- uses: ros-tooling/setup-ros@0.6.2
- uses: ros-tooling/setup-ros@0.7.0
- uses: ros-tooling/[email protected]
with:
distribution: rolling
Expand All @@ -36,7 +36,7 @@ jobs:
linter: [cpplint]
steps:
- uses: actions/checkout@v3
- uses: ros-tooling/setup-ros@0.6.2
- uses: ros-tooling/setup-ros@0.7.0
- uses: ros-tooling/[email protected]
with:
distribution: rolling
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable-ros-tooling-source-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ jobs:
strategy:
fail-fast: false
steps:
- uses: ros-tooling/setup-ros@0.6.2
- uses: ros-tooling/setup-ros@0.7.0
with:
required-ros-distributions: ${{ inputs.ros_distro }}
- uses: actions/checkout@v3
with:
ref: ${{ inputs.ref }}
- uses: ros-tooling/[email protected].2
- uses: ros-tooling/[email protected].3
with:
target-ros2-distro: ${{ inputs.ros_distro }}
# build all packages listed in the meta package
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Please try to include as much information as you can. Details like these are inc


## Contributing via Pull Requests
The following guidance should be up-to-date, but the documentation as found [here](https://ros-controls.github.io/control.ros.org/contributing.html#pull-requests) should prove as the final say.
The following guidance should be up-to-date, but the documentation as found [here](https://control.ros.org/master/doc/contributing/contributing.html#pull-requests) should prove as the final say.

Contributions via pull requests are much appreciated.
Before sending us a pull request, please ensure that:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Licence](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

This package is a part of the ros2_control framework.
For more, please check the [documentation](https://ros-controls.github.io/control.ros.org/).
For more, please check the [documentation](https://control.ros.org/).


## Build status
Expand Down
3 changes: 3 additions & 0 deletions controller_interface/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package controller_interface
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

3.16.0 (2023-07-09)
-------------------

3.15.0 (2023-06-23)
-------------------

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>3.15.0</version>
<version>3.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
8 changes: 8 additions & 0 deletions controller_manager/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
Changelog for package controller_manager
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

3.16.0 (2023-07-09)
-------------------
* added controller manager runner to have update cycles (`#1075 <https://github.com/ros-controls/ros2_control/issues/1075>`_)
* [CM] Make error message after trying to active controller more informative. (`#1066 <https://github.com/ros-controls/ros2_control/issues/1066>`_)
* Fix equal and higher controller update rate (`#1070 <https://github.com/ros-controls/ros2_control/issues/1070>`_)
* Create doc file for chained controllers (`#985 <https://github.com/ros-controls/ros2_control/issues/985>`_)
* Contributors: Dr. Denis, Sai Kishor Kothakota

3.15.0 (2023-06-23)
-------------------
* Enable setting of initial state in HW compoments (`#1046 <https://github.com/ros-controls/ros2_control/issues/1046>`_)
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>3.15.0</version>
<version>3.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
1 change: 1 addition & 0 deletions controller_manager/test/test_spawner_unspawner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ TEST_F(TestLoadController, spawner_test_type_in_param)
{
cm_->set_parameter(rclcpp::Parameter("ctrl_1.type", test_controller::TEST_CONTROLLER_CLASS_NAME));

ControllerManagerRunner cm_runner(this);
EXPECT_EQ(call_spawner("ctrl_1 -c test_controller_manager"), 0);

ASSERT_EQ(cm_->get_loaded_controllers().size(), 1ul);
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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

3.16.0 (2023-07-09)
-------------------

3.15.0 (2023-06-23)
-------------------

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>3.15.0</version>
<version>3.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
3 changes: 3 additions & 0 deletions hardware_interface/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package hardware_interface
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

3.16.0 (2023-07-09)
-------------------

3.15.0 (2023-06-23)
-------------------
* Enable setting of initial state in HW compoments (`#1046 <https://github.com/ros-controls/ros2_control/issues/1046>`_)
Expand Down
2 changes: 1 addition & 1 deletion hardware_interface/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="2">
<name>hardware_interface</name>
<version>3.15.0</version>
<version>3.16.0</version>
<description>ros2_control hardware interface</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Denis Štogl</maintainer>
Expand Down
86 changes: 70 additions & 16 deletions hardware_interface/src/resource_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,18 @@ class ResourceStorage
{
check_for_duplicates(hardware_info);
load_hardware<Actuator, ActuatorInterface>(hardware_info, actuator_loader_, container);
initialize_hardware(hardware_info, container.back());
import_state_interfaces(container.back());
import_command_interfaces(container.back());
if (initialize_hardware(hardware_info, container.back()))
{
import_state_interfaces(container.back());
import_command_interfaces(container.back());
}
else
{
RCUTILS_LOG_WARN_NAMED(
"resource_manager",
"Actuator hardware component '%s' from plugin '%s' failed to initialize.",
hardware_info.name.c_str(), hardware_info.hardware_plugin_name.c_str());
}
};

if (hardware_info.is_async)
Expand All @@ -535,8 +544,17 @@ class ResourceStorage
{
check_for_duplicates(hardware_info);
load_hardware<Sensor, SensorInterface>(hardware_info, sensor_loader_, container);
initialize_hardware(hardware_info, container.back());
import_state_interfaces(container.back());
if (initialize_hardware(hardware_info, container.back()))
{
import_state_interfaces(container.back());
}
else
{
RCUTILS_LOG_WARN_NAMED(
"resource_manager",
"Sensor hardware component '%s' from plugin '%s' failed to initialize.",
hardware_info.name.c_str(), hardware_info.hardware_plugin_name.c_str());
}
};

if (hardware_info.is_async)
Expand All @@ -555,9 +573,18 @@ class ResourceStorage
{
check_for_duplicates(hardware_info);
load_hardware<System, SystemInterface>(hardware_info, system_loader_, container);
initialize_hardware(hardware_info, container.back());
import_state_interfaces(container.back());
import_command_interfaces(container.back());
if (initialize_hardware(hardware_info, container.back()))
{
import_state_interfaces(container.back());
import_command_interfaces(container.back());
}
else
{
RCUTILS_LOG_WARN_NAMED(
"resource_manager",
"System hardware component '%s' from plugin '%s' failed to initialize.",
hardware_info.name.c_str(), hardware_info.hardware_plugin_name.c_str());
}
};

if (hardware_info.is_async)
Expand All @@ -576,9 +603,18 @@ class ResourceStorage
auto init_actuators = [&](auto & container)
{
container.emplace_back(Actuator(std::move(actuator)));
initialize_hardware(hardware_info, container.back());
import_state_interfaces(container.back());
import_command_interfaces(container.back());
if (initialize_hardware(hardware_info, container.back()))
{
import_state_interfaces(container.back());
import_command_interfaces(container.back());
}
else
{
RCUTILS_LOG_WARN_NAMED(
"resource_manager",
"Actuator hardware component '%s' from plugin '%s' failed to initialize.",
hardware_info.name.c_str(), hardware_info.hardware_plugin_name.c_str());
}
};

if (hardware_info.is_async)
Expand All @@ -597,8 +633,17 @@ class ResourceStorage
auto init_sensors = [&](auto & container)
{
container.emplace_back(Sensor(std::move(sensor)));
initialize_hardware(hardware_info, container.back());
import_state_interfaces(container.back());
if (initialize_hardware(hardware_info, container.back()))
{
import_state_interfaces(container.back());
}
else
{
RCUTILS_LOG_WARN_NAMED(
"resource_manager",
"Sensor hardware component '%s' from plugin '%s' failed to initialize.",
hardware_info.name.c_str(), hardware_info.hardware_plugin_name.c_str());
}
};

if (hardware_info.is_async)
Expand All @@ -617,9 +662,18 @@ class ResourceStorage
auto init_systems = [&](auto & container)
{
container.emplace_back(System(std::move(system)));
initialize_hardware(hardware_info, container.back());
import_state_interfaces(container.back());
import_command_interfaces(container.back());
if (initialize_hardware(hardware_info, container.back()))
{
import_state_interfaces(container.back());
import_command_interfaces(container.back());
}
else
{
RCUTILS_LOG_WARN_NAMED(
"resource_manager",
"System hardware component '%s' from plugin '%s' failed to initialize.",
hardware_info.name.c_str(), hardware_info.hardware_plugin_name.c_str());
}
};

if (hardware_info.is_async)
Expand Down
3 changes: 3 additions & 0 deletions joint_limits/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package joint_limits
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

3.16.0 (2023-07-09)
-------------------

3.15.0 (2023-06-23)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion joint_limits/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<package format="3">
<name>joint_limits</name>
<version>3.15.0</version>
<version>3.16.0</version>
<description>Interfaces for handling of joint limits for controllers or hardware.</description>

<maintainer email="[email protected]">Bence Magyar</maintainer>
Expand Down
3 changes: 3 additions & 0 deletions ros2_control/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package ros2_control
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

3.16.0 (2023-07-09)
-------------------

3.15.0 (2023-06-23)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion ros2_control/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="3">
<name>ros2_control</name>
<version>3.15.0</version>
<version>3.16.0</version>
<description>Metapackage for ROS2 control related packages</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>
<maintainer email="[email protected]">Denis Štogl</maintainer>
Expand Down
3 changes: 3 additions & 0 deletions ros2_control_test_assets/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package ros2_control_test_assets
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

3.16.0 (2023-07-09)
-------------------

3.15.0 (2023-06-23)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion ros2_control_test_assets/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>ros2_control_test_assets</name>
<version>3.15.0</version>
<version>3.16.0</version>
<description>The package provides shared test resources for ros2_control stack
</description>
<maintainer email="[email protected]">Bence Magyar</maintainer>
Expand Down
3 changes: 3 additions & 0 deletions ros2controlcli/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
Changelog for package ros2controlcli
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

3.16.0 (2023-07-09)
-------------------

3.15.0 (2023-06-23)
-------------------
* Improve list hardware components output and code for better readability. (`#1060 <https://github.com/ros-controls/ros2_control/issues/1060>`_)
Expand Down
Loading

0 comments on commit 8aeb2a7

Please sign in to comment.