From 7beb2b0f415801ae1d30f05615f9cf7338d91be5 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 4 Jan 2024 11:09:40 +0100 Subject: [PATCH] Rename cartpole with cart (#214) (#218) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alejandro Hernández Cordero Co-authored-by: Christoph Fröhlich (cherry picked from commit 7e388fa5b7e7b099ac5c8a6a1b3e35d9c6a37d2a) Co-authored-by: Alejandro Hernández Cordero --- doc/index.rst | 28 +++++-------------- ...ffort.yaml => cart_controller_effort.yaml} | 0 ...ion.yaml => cart_controller_position.yaml} | 0 ...ity.yaml => cart_controller_velocity.yaml} | 0 .../launch/cart_example_effort.launch.py | 2 +- .../launch/cart_example_position.launch.py | 2 +- .../launch/cart_example_velocity.launch.py | 2 +- .../launch/diff_drive_example.launch.py | 2 +- .../launch/tricycle_drive_example.launch.py | 2 +- .../urdf/test_cart_effort.xacro.urdf | 6 +--- .../urdf/test_cart_position.xacro.urdf | 6 +--- .../urdf/test_cart_velocity.xacro.urdf | 6 +--- gz_ros2_control_tests/tests/position_test.py | 2 +- .../urdf/test_cart_position.xacro.urdf | 6 +--- 14 files changed, 17 insertions(+), 47 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..00a7ebb3 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,32 +200,18 @@ 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 -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: -.. code-block:: yaml +- ``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``. - joint_state_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``. - -.. code-block:: yaml - - cart_pole_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 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..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', 'cartpole', + '-name', 'tricyle', '-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