From 325fe2853ad3025b543f7d5e5c172716246bb7df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Wed, 3 Jan 2024 11:52:51 +0100 Subject: [PATCH 1/4] Rename cartpole with cart MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alejandro Hernández Cordero --- doc/index.rst | 4 ++-- ...e_controller_effort.yaml => cart_controller_effort.yaml} | 0 ...ntroller_position.yaml => cart_controller_position.yaml} | 0 ...ntroller_velocity.yaml => cart_controller_velocity.yaml} | 0 gz_ros2_control_demos/launch/cart_example_effort.launch.py | 2 +- .../launch/cart_example_position.launch.py | 2 +- .../launch/cart_example_velocity.launch.py | 2 +- gz_ros2_control_demos/launch/diff_drive_example.launch.py | 2 +- .../launch/tricycle_drive_example.launch.py | 2 +- gz_ros2_control_demos/urdf/test_cart_effort.xacro.urdf | 6 +----- gz_ros2_control_demos/urdf/test_cart_position.xacro.urdf | 6 +----- gz_ros2_control_demos/urdf/test_cart_velocity.xacro.urdf | 6 +----- gz_ros2_control_tests/tests/position_test.py | 2 +- gz_ros2_control_tests/urdf/test_cart_position.xacro.urdf | 6 +----- 14 files changed, 12 insertions(+), 28 deletions(-) rename gz_ros2_control_demos/config/{cartpole_controller_effort.yaml => cart_controller_effort.yaml} (100%) rename gz_ros2_control_demos/config/{cartpole_controller_position.yaml => cart_controller_position.yaml} (100%) rename gz_ros2_control_demos/config/{cartpole_controller_velocity.yaml => cart_controller_velocity.yaml} (100%) diff --git a/doc/index.rst b/doc/index.rst index d47d016e..c732e5bc 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -146,7 +146,7 @@ robot hardware interfaces between *ros2_control* and Gazebo. robot_description robot_state_publisher - $(find gz_ros2_control_demos)/config/cartpole_controller.yaml + $(find gz_ros2_control_demos)/config/cart_controller.yaml @@ -200,7 +200,7 @@ and use the tag ```` to set the controller - $(find gz_ros2_control_demos)/config/cartpole_controller.yaml + $(find gz_ros2_control_demos)/config/cart_controller.yaml controller_manager diff --git a/gz_ros2_control_demos/config/cartpole_controller_effort.yaml b/gz_ros2_control_demos/config/cart_controller_effort.yaml similarity index 100% rename from gz_ros2_control_demos/config/cartpole_controller_effort.yaml rename to gz_ros2_control_demos/config/cart_controller_effort.yaml diff --git a/gz_ros2_control_demos/config/cartpole_controller_position.yaml b/gz_ros2_control_demos/config/cart_controller_position.yaml similarity index 100% rename from gz_ros2_control_demos/config/cartpole_controller_position.yaml rename to gz_ros2_control_demos/config/cart_controller_position.yaml diff --git a/gz_ros2_control_demos/config/cartpole_controller_velocity.yaml b/gz_ros2_control_demos/config/cart_controller_velocity.yaml similarity index 100% rename from gz_ros2_control_demos/config/cartpole_controller_velocity.yaml rename to gz_ros2_control_demos/config/cart_controller_velocity.yaml diff --git a/gz_ros2_control_demos/launch/cart_example_effort.launch.py b/gz_ros2_control_demos/launch/cart_example_effort.launch.py index da7e1e10..2878452f 100644 --- a/gz_ros2_control_demos/launch/cart_example_effort.launch.py +++ b/gz_ros2_control_demos/launch/cart_example_effort.launch.py @@ -56,7 +56,7 @@ def generate_launch_description(): executable='create', output='screen', arguments=['-string', doc.toxml(), - '-name', 'cartpole', + '-name', 'cart', '-allow_renaming', 'true'], ) diff --git a/gz_ros2_control_demos/launch/cart_example_position.launch.py b/gz_ros2_control_demos/launch/cart_example_position.launch.py index 3886d1b9..1cfa34e8 100644 --- a/gz_ros2_control_demos/launch/cart_example_position.launch.py +++ b/gz_ros2_control_demos/launch/cart_example_position.launch.py @@ -56,7 +56,7 @@ def generate_launch_description(): executable='create', output='screen', arguments=['-string', doc.toxml(), - '-name', 'cartpole', + '-name', 'cart', '-allow_renaming', 'true'], ) diff --git a/gz_ros2_control_demos/launch/cart_example_velocity.launch.py b/gz_ros2_control_demos/launch/cart_example_velocity.launch.py index ce3d6269..4cc21c20 100644 --- a/gz_ros2_control_demos/launch/cart_example_velocity.launch.py +++ b/gz_ros2_control_demos/launch/cart_example_velocity.launch.py @@ -56,7 +56,7 @@ def generate_launch_description(): executable='create', output='screen', arguments=['-string', doc.toxml(), - '-name', 'cartpole', + '-name', 'cart', '-allow_renaming', 'true'], ) diff --git a/gz_ros2_control_demos/launch/diff_drive_example.launch.py b/gz_ros2_control_demos/launch/diff_drive_example.launch.py index 96543050..ebc943eb 100644 --- a/gz_ros2_control_demos/launch/diff_drive_example.launch.py +++ b/gz_ros2_control_demos/launch/diff_drive_example.launch.py @@ -57,7 +57,7 @@ def generate_launch_description(): executable='create', output='screen', arguments=['-string', doc.toxml(), - '-name', 'cartpole', + '-name', 'diff_drive', '-allow_renaming', 'true'], ) diff --git a/gz_ros2_control_demos/launch/tricycle_drive_example.launch.py b/gz_ros2_control_demos/launch/tricycle_drive_example.launch.py index cf8eb280..ba85330d 100644 --- a/gz_ros2_control_demos/launch/tricycle_drive_example.launch.py +++ b/gz_ros2_control_demos/launch/tricycle_drive_example.launch.py @@ -57,7 +57,7 @@ def generate_launch_description(): executable='create', output='screen', arguments=['-string', doc.toxml(), - '-name', 'cartpole', + '-name', 'cart', '-allow_renaming', 'true'], ) diff --git a/gz_ros2_control_demos/urdf/test_cart_effort.xacro.urdf b/gz_ros2_control_demos/urdf/test_cart_effort.xacro.urdf index cd70aa02..1ff5f42b 100644 --- a/gz_ros2_control_demos/urdf/test_cart_effort.xacro.urdf +++ b/gz_ros2_control_demos/urdf/test_cart_effort.xacro.urdf @@ -1,8 +1,4 @@ - - - - @@ -83,7 +79,7 @@ - $(find gz_ros2_control_demos)/config/cartpole_controller_effort.yaml + $(find gz_ros2_control_demos)/config/cart_controller_effort.yaml diff --git a/gz_ros2_control_demos/urdf/test_cart_position.xacro.urdf b/gz_ros2_control_demos/urdf/test_cart_position.xacro.urdf index a7faaac7..90abd587 100644 --- a/gz_ros2_control_demos/urdf/test_cart_position.xacro.urdf +++ b/gz_ros2_control_demos/urdf/test_cart_position.xacro.urdf @@ -1,8 +1,4 @@ - - - - @@ -95,7 +91,7 @@ - $(find gz_ros2_control_demos)/config/cartpole_controller_position.yaml + $(find gz_ros2_control_demos)/config/cart_controller_position.yaml diff --git a/gz_ros2_control_demos/urdf/test_cart_velocity.xacro.urdf b/gz_ros2_control_demos/urdf/test_cart_velocity.xacro.urdf index 71b0c93f..37b062af 100644 --- a/gz_ros2_control_demos/urdf/test_cart_velocity.xacro.urdf +++ b/gz_ros2_control_demos/urdf/test_cart_velocity.xacro.urdf @@ -1,8 +1,4 @@ - - - - @@ -166,7 +162,7 @@ - $(find gz_ros2_control_demos)/config/cartpole_controller_velocity.yaml + $(find gz_ros2_control_demos)/config/cart_controller_velocity.yaml - - - - @@ -95,7 +91,7 @@ - $(find gz_ros2_control_tests)/config/cartpole_controller_position.yaml + $(find gz_ros2_control_tests)/config/cart_controller_position.yaml From dba7bb8188b9cac9e408013631d7d105bb5d28bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Wed, 3 Jan 2024 12:22:07 +0100 Subject: [PATCH 2/4] Added feedback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alejandro Hernández Cordero --- doc/index.rst | 4 ++-- gz_ros2_control_demos/launch/tricycle_drive_example.launch.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/index.rst b/doc/index.rst index c732e5bc..7e721adb 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -215,11 +215,11 @@ The following is a basic configuration of the controller. ros__parameters: type: joint_state_controller/JointStateController -This controller creates an action called ``/cart_pole_controller/follow_joint_trajectory`` of type ``control_msgs::action::FollowJointTrajectory``. +This controller creates an action called ``/cart_controller/follow_joint_trajectory`` of type ``control_msgs::action::FollowJointTrajectory``. .. code-block:: yaml - cart_pole_controller: + cart_controller: ros__parameters: type: joint_trajectory_controller/JointTrajectoryController joints: diff --git a/gz_ros2_control_demos/launch/tricycle_drive_example.launch.py b/gz_ros2_control_demos/launch/tricycle_drive_example.launch.py index ba85330d..e5084a87 100644 --- a/gz_ros2_control_demos/launch/tricycle_drive_example.launch.py +++ b/gz_ros2_control_demos/launch/tricycle_drive_example.launch.py @@ -57,7 +57,7 @@ def generate_launch_description(): executable='create', output='screen', arguments=['-string', doc.toxml(), - '-name', 'cart', + '-name', 'tricyle', '-allow_renaming', 'true'], ) From 748f09296bb6602774ccc7f41be1c06863911ade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Wed, 3 Jan 2024 13:37:01 +0100 Subject: [PATCH 3/4] Added feedback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alejandro Hernández Cordero --- doc/index.rst | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/doc/index.rst b/doc/index.rst index 7e721adb..29c79ba4 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -209,23 +209,8 @@ This controller publishes the state of all resources registered to a ``hardware_interface::StateInterface`` to a topic of type ``sensor_msgs/msg/JointState``. The following is a basic configuration of the controller. -.. code-block:: yaml - - joint_state_controller: - ros__parameters: - type: joint_state_controller/JointStateController - -This controller creates an action called ``/cart_controller/follow_joint_trajectory`` of type ``control_msgs::action::FollowJointTrajectory``. - -.. code-block:: yaml - - cart_controller: - ros__parameters: - type: joint_trajectory_controller/JointTrajectoryController - joints: - - slider_to_cart - write_op_modes: - - slider_to_cart +.. literalinclude:: ../gz_ros2_control_demos/config/cart_controller_position.yaml + :language: yaml gz_ros2_control_demos From a35bc95fc8de35fcd96002ff64e19550792d1aa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Fr=C3=B6hlich?= Date: Wed, 3 Jan 2024 13:43:29 +0100 Subject: [PATCH 4/4] Fix controller list --- doc/index.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/index.rst b/doc/index.rst index a3374f0e..268ee24a 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -206,9 +206,10 @@ and use the tag ```` to set the controller -This controller publishes the state of all resources registered to a -``hardware_interface::StateInterface`` to a topic of type ``sensor_msgs/msg/JointState``. -The following is a basic configuration of the controller. +The following is a basic configuration of the controllers: + +- ``joint_state_broadcaster``: This controller publishes the state of all resources registered to a ``hardware_interface::StateInterface`` to a topic of type ``sensor_msgs/msg/JointState``. +- ``joint_trajectory_controller``: This controller creates an action called ``/joint_trajectory_controller/follow_joint_trajectory`` of type ``control_msgs::action::FollowJointTrajectory``. .. literalinclude:: ../gz_ros2_control_demos/config/cart_controller_position.yaml :language: yaml