Skip to content

Commit 61b3bc6

Browse files
Deprecate forward_command_controller specializations (#1913)
1 parent f59b5a0 commit 61b3bc6

File tree

14 files changed

+62
-18
lines changed

14 files changed

+62
-18
lines changed

doc/controllers_index.rst

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,6 @@ Controllers for Wheeled Mobile Robots
3636
Controllers for Manipulators and Other Robots
3737
*********************************************
3838

39-
The controllers are using `common hardware interface definitions`_, and may use namespaces depending on the following command interface types:
40-
41-
- ``position_controllers``: ``hardware_interface::HW_IF_POSITION``
42-
- ``velocity_controller``: ``hardware_interface::HW_IF_VELOCITY``
43-
- ``effort_controllers``: ``hardware_interface::HW_IF_ACCELERATION``
44-
- ``effort_controllers``: ``hardware_interface::HW_IF_EFFORT``
45-
46-
.. _common hardware interface definitions: https://github.com/ros-controls/ros2_control/blob/{REPOS_FILE_BRANCH}/hardware_interface/include/hardware_interface/types/hardware_interface_type_values.hpp
47-
48-
4939
.. toctree::
5040
:titlesonly:
5141

doc/migration.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,17 @@
22

33
Migration Guides: Kilted Kaiju to Lyrical Luth
44
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5-
65
This list summarizes important changes between Kilted Kaiju (previous) and Lyrical Luth (current) releases, where changes to user code might be necessary.
6+
7+
8+
effort_controllers
9+
*****************************
10+
* ``effort_controllers/JointGroupEffortController`` is deprecated. Use :ref:`forward_command_controller <forward_command_controller_userdoc>` instead by adding the ``interface_name`` parameter and set it to ``effort``. (`#1913 <https://github.com/ros-controls/ros2_controllers/pull/1913>`_).
11+
12+
position_controllers
13+
*****************************
14+
* ``position_controllers/JointGroupPositionController`` is deprecated. Use :ref:`forward_command_controller <forward_command_controller_userdoc>` instead by adding the ``interface_name`` parameter and set it to ``position``. (`#1913 <https://github.com/ros-controls/ros2_controllers/pull/1913>`_).
15+
16+
velocity_controllers
17+
*****************************
18+
* ``velocity_controllers/JointGroupVelocityController`` is deprecated. Use :ref:`forward_command_controller <forward_command_controller_userdoc>` instead by adding the ``interface_name`` parameter and set it to ``velocity``. (`#1913 <https://github.com/ros-controls/ros2_controllers/pull/1913>`_).

effort_controllers/doc/userdoc.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ The package contains the following controllers:
1212
effort_controllers/JointGroupEffortController
1313
-------------------------------------------------
1414

15+
.. warning::
16+
17+
``effort_controllers/JointGroupEffortController`` is deprecated. Use :ref:`forward_command_controller <forward_command_controller_userdoc>` instead by adding the ``interface_name`` parameter and set it to ``effort``.
18+
1519
This is specialization of the :ref:`forward_command_controller <forward_command_controller_userdoc>` that works using the "effort" joint interface.
1620

1721

effort_controllers/package.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,10 @@
3434

3535
<export>
3636
<build_type>ament_cmake</build_type>
37+
<deprecated>
38+
This package will be removed in ROS 2 Lyrical Luth. Instead, use
39+
forward_command_controller, see migration guides for details:
40+
https://control.ros.org/rolling/doc/ros2_controllers/doc/migration.html
41+
</deprecated>
3742
</export>
3843
</package>

effort_controllers/src/joint_group_effort_controller.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ JointGroupEffortController::JointGroupEffortController()
2929

3030
controller_interface::CallbackReturn JointGroupEffortController::on_init()
3131
{
32+
RCLCPP_WARN(
33+
get_node()->get_logger(),
34+
"'effort_controllers/JointGroupEffortController' is deprecated. "
35+
"Use 'forward_command_controller/ForwardCommandController' instead by adding the "
36+
"'interface_name' parameter and set it to 'effort'.");
3237
try
3338
{
3439
// Explicitly set the interface parameter declared by the forward_command_controller

forward_command_controller/doc/userdoc.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
forward_command_controller
66
==========================
77

8-
This is a base class implementing a feedforward controller. Specific implementations of this base class can be found in:
8+
A selection of controllers that forward commands of different types.
99

10-
* :ref:`position_controllers_userdoc`
11-
* :ref:`velocity_controllers_userdoc`
12-
* :ref:`effort_controllers_userdoc`
10+
forward_command_controller and multi_interface_forward_command_controller
11+
#########################################################################
12+
Both controllers forward ``std_msgs::msg::Float64MultiArray`` to a set of interfaces, which can be parameterized as follows: While ``forward_command_controller/ForwardCommandController`` only claims a single interface type per joint (``joint[i] + "/" + interface_name``), the ``forward_command_controller/MultiInterfaceForwardCommandController`` claims the combination of all interfaces specified in the ``interface_names`` parameter (``joint[i] + "/" + interface_names[j]``).
1313

1414
Hardware interface type
1515
-----------------------
1616

17-
This controller can be used for every type of command interface.
17+
This controller can be used for every type of command interface, not only limited to joints.
1818

1919

2020
ROS 2 interface of the controller

forward_command_controller/src/forward_command_controller_parameters.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ forward_command_controller:
99
}
1010
interface_name: {
1111
type: string,
12-
description: "Name of the interface to command",
12+
description: "Name of the interface of the joint",
1313
validation: {
1414
not_empty<>: []
1515
},

forward_command_controller/src/multi_interface_forward_command_controller_parameters.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ multi_interface_forward_command_controller:
99
}
1010
interface_names: {
1111
type: string_array,
12-
description: "Names of the interfaces to command",
12+
description: "Names of the interfaces per joint to claim",
1313
validation: {
1414
not_empty<>: []
1515
},

position_controllers/doc/userdoc.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ The package contains the following controllers:
1212
position_controllers/JointGroupPositionController
1313
-------------------------------------------------
1414

15+
.. warning::
16+
17+
``position_controllers/JointGroupPositionController`` is deprecated. Use :ref:`forward_command_controller <forward_command_controller_userdoc>` instead by adding the ``interface_name`` parameter and set it to ``position``.
18+
1519
This is specialization of the :ref:`forward_command_controller <forward_command_controller_userdoc>` that works using the "position" joint interface.
1620

1721

position_controllers/package.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,10 @@
3434

3535
<export>
3636
<build_type>ament_cmake</build_type>
37+
<deprecated>
38+
This package will be removed in ROS 2 Lyrical Luth. Instead, use
39+
forward_command_controller, see migration guides for details:
40+
https://control.ros.org/rolling/doc/ros2_controllers/doc/migration.html
41+
</deprecated>
3742
</export>
3843
</package>

0 commit comments

Comments
 (0)