diff --git a/doc/controllers_index.rst b/doc/controllers_index.rst index 4bbe6eb673..7b286a61d5 100644 --- a/doc/controllers_index.rst +++ b/doc/controllers_index.rst @@ -36,16 +36,6 @@ Controllers for Wheeled Mobile Robots Controllers for Manipulators and Other Robots ********************************************* -The controllers are using `common hardware interface definitions`_, and may use namespaces depending on the following command interface types: - - - ``position_controllers``: ``hardware_interface::HW_IF_POSITION`` - - ``velocity_controller``: ``hardware_interface::HW_IF_VELOCITY`` - - ``effort_controllers``: ``hardware_interface::HW_IF_ACCELERATION`` - - ``effort_controllers``: ``hardware_interface::HW_IF_EFFORT`` - -.. _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 - - .. toctree:: :titlesonly: diff --git a/doc/migration.rst b/doc/migration.rst index 72de6cabb0..ff7b36d1a3 100644 --- a/doc/migration.rst +++ b/doc/migration.rst @@ -4,17 +4,30 @@ Migration Guides: Jazzy to Kilted ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This list summarizes important changes between Jazzy (previous) and Kilted (current) releases, where changes to user code might be necessary. -GripperActionController -***************************** -The ``effort_controllers/GripperActionController`` and ``position_controllers/GripperActionController`` have been removed. The ``parallel_gripper_action_controller/GripperActionController`` should be used instead. `(#1652 `__). diff_drive_controller ***************************** * Parameters ``has_velocity_limits``, ``has_acceleration_limits``, and ``has_jerk_limits`` are removed. Instead, set the respective limits to ``.NAN``. (`#1653 `_). +effort_controllers +***************************** + ``effort_controllers/JointGroupEffortController`` is deprecated. Use :ref:`forward_command_controller ` instead by adding the ``interface_name`` parameter and set it to ``effort``. (`#1913 `_). + +GripperActionController +***************************** +The ``effort_controllers/GripperActionController`` and ``position_controllers/GripperActionController`` have been removed. The ``parallel_gripper_action_controller/GripperActionController`` should be used instead. `(#1652 `__). + pid_controller ***************************** * Parameters ``enable_feedforward`` and service ``set_feedforward_control`` are removed. Instead, set the feedforward_gain to zero or a non-zero value. (`#1553 `_). * The legacy ``antiwindup`` boolean and integral clamp parameters ``i_clamp_max``/``i_clamp_min`` have been deprecated in favor of the new ``antiwindup_strategy`` parameter (`#1585 `__). Choose a suitable anti-windup strategy and set the parameters accordingly. * PID state publisher topic changed to ```` namespace and is initially turned off. It can be turned on by using ``activate_state_publisher`` parameter. (`#1823 `_). + +position_controllers +***************************** + ``position_controllers/JointGroupPositionController`` is deprecated. Use :ref:`forward_command_controller ` instead by adding the ``interface_name`` parameter and set it to ``position``. (`#1913 `_). + +velocity_controllers +***************************** + ``velocity_controllers/JointGroupVelocityController`` is deprecated. Use :ref:`forward_command_controller ` instead by adding the ``interface_name`` parameter and set it to ``velocity``. (`#1913 `_). diff --git a/effort_controllers/doc/userdoc.rst b/effort_controllers/doc/userdoc.rst index 62e98a75f9..d6189f0483 100644 --- a/effort_controllers/doc/userdoc.rst +++ b/effort_controllers/doc/userdoc.rst @@ -12,6 +12,10 @@ The package contains the following controllers: effort_controllers/JointGroupEffortController ------------------------------------------------- +.. warning:: + + ``effort_controllers/JointGroupEffortController`` is deprecated. Use :ref:`forward_command_controller ` instead by adding the ``interface_name`` parameter and set it to ``effort``. + This is specialization of the :ref:`forward_command_controller ` that works using the "effort" joint interface. diff --git a/effort_controllers/src/joint_group_effort_controller.cpp b/effort_controllers/src/joint_group_effort_controller.cpp index 6ae0d84ede..e1dc67b57e 100644 --- a/effort_controllers/src/joint_group_effort_controller.cpp +++ b/effort_controllers/src/joint_group_effort_controller.cpp @@ -29,6 +29,11 @@ JointGroupEffortController::JointGroupEffortController() controller_interface::CallbackReturn JointGroupEffortController::on_init() { + RCLCPP_WARN( + get_node()->get_logger(), + "'effort_controllers/JointGroupEffortController' is deprecated. " + "Use 'forward_command_controller/ForwardCommandController' instead by adding the " + "'interface_name' parameter and set it to 'effort'."); try { // Explicitly set the interface parameter declared by the forward_command_controller diff --git a/forward_command_controller/doc/userdoc.rst b/forward_command_controller/doc/userdoc.rst index cd623a5acb..ac16fe1664 100644 --- a/forward_command_controller/doc/userdoc.rst +++ b/forward_command_controller/doc/userdoc.rst @@ -5,16 +5,16 @@ forward_command_controller ========================== -This is a base class implementing a feedforward controller. Specific implementations of this base class can be found in: +A selection of controllers that forward commands of different types. -* :ref:`position_controllers_userdoc` -* :ref:`velocity_controllers_userdoc` -* :ref:`effort_controllers_userdoc` +forward_command_controller and multi_interface_forward_command_controller +######################################################################### +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]``). Hardware interface type ----------------------- -This controller can be used for every type of command interface. +This controller can be used for every type of command interface, not only limited to joints. ROS 2 interface of the controller diff --git a/forward_command_controller/src/forward_command_controller_parameters.yaml b/forward_command_controller/src/forward_command_controller_parameters.yaml index 5210b3e8c9..9c964a12cd 100644 --- a/forward_command_controller/src/forward_command_controller_parameters.yaml +++ b/forward_command_controller/src/forward_command_controller_parameters.yaml @@ -9,7 +9,7 @@ forward_command_controller: } interface_name: { type: string, - description: "Name of the interface to command", + description: "Name of the interface of the joint", validation: { not_empty<>: [] }, diff --git a/forward_command_controller/src/multi_interface_forward_command_controller_parameters.yaml b/forward_command_controller/src/multi_interface_forward_command_controller_parameters.yaml index 7bb99041c0..e8bfb53348 100644 --- a/forward_command_controller/src/multi_interface_forward_command_controller_parameters.yaml +++ b/forward_command_controller/src/multi_interface_forward_command_controller_parameters.yaml @@ -9,7 +9,7 @@ multi_interface_forward_command_controller: } interface_names: { type: string_array, - description: "Names of the interfaces to command", + description: "Names of the interfaces per joint to claim", validation: { not_empty<>: [] }, diff --git a/position_controllers/doc/userdoc.rst b/position_controllers/doc/userdoc.rst index 89766df9d4..7e54747ae0 100644 --- a/position_controllers/doc/userdoc.rst +++ b/position_controllers/doc/userdoc.rst @@ -12,6 +12,10 @@ The package contains the following controllers: position_controllers/JointGroupPositionController ------------------------------------------------- +.. warning:: + + ``position_controllers/JointGroupPositionController`` is deprecated. Use :ref:`forward_command_controller ` instead by adding the ``interface_name`` parameter and set it to ``position``. + This is specialization of the :ref:`forward_command_controller ` that works using the "position" joint interface. diff --git a/position_controllers/src/joint_group_position_controller.cpp b/position_controllers/src/joint_group_position_controller.cpp index a5bf512fe2..510d8e337d 100644 --- a/position_controllers/src/joint_group_position_controller.cpp +++ b/position_controllers/src/joint_group_position_controller.cpp @@ -29,6 +29,11 @@ JointGroupPositionController::JointGroupPositionController() controller_interface::CallbackReturn JointGroupPositionController::on_init() { + RCLCPP_WARN( + get_node()->get_logger(), + "'position_controllers/JointGroupPositionController' is deprecated. " + "Use 'forward_command_controller/ForwardCommandController' instead by adding the " + "'interface_name' parameter and set it to 'position'."); try { // Explicitly set the interface parameter declared by the forward_command_controller diff --git a/velocity_controllers/doc/userdoc.rst b/velocity_controllers/doc/userdoc.rst index 469b975a97..ce98a7fc45 100644 --- a/velocity_controllers/doc/userdoc.rst +++ b/velocity_controllers/doc/userdoc.rst @@ -12,6 +12,10 @@ The package contains the following controllers: velocity_controllers/JointGroupVelocityController ------------------------------------------------- +.. warning:: + + ``velocity_controllers/JointGroupVelocityController`` is deprecated. Use :ref:`forward_command_controller ` instead by adding the ``interface_name`` parameter and set it to ``velocity``. + This is specialization of the :ref:`forward_command_controller ` that works using the "velocity" joint interface. diff --git a/velocity_controllers/src/joint_group_velocity_controller.cpp b/velocity_controllers/src/joint_group_velocity_controller.cpp index 1dbb93f72d..fc67ead82b 100644 --- a/velocity_controllers/src/joint_group_velocity_controller.cpp +++ b/velocity_controllers/src/joint_group_velocity_controller.cpp @@ -29,6 +29,11 @@ JointGroupVelocityController::JointGroupVelocityController() controller_interface::CallbackReturn JointGroupVelocityController::on_init() { + RCLCPP_WARN( + get_node()->get_logger(), + "'velocity_controllers/JointGroupVelocityController' is deprecated. " + "Use 'forward_command_controller/ForwardCommandController' instead by adding the " + "'interface_name' parameter and set it to 'velocity'."); try { // Explicitly set the interface parameter declared by the forward_command_controller