Skip to content

Commit

Permalink
Rename cartpole with cart (#214)
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
Co-authored-by: Christoph Fröhlich <[email protected]>
(cherry picked from commit 7e388fa)
  • Loading branch information
ahcorde authored and mergify[bot] committed Jan 4, 2024
1 parent 36c42b3 commit c4c94cd
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 47 deletions.
28 changes: 7 additions & 21 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ robot hardware interfaces between *ros2_control* and Gazebo.
<plugin filename="libgz_ros2_control-system.so" name="gz_ros2_control::GazeboSimROS2ControlPlugin">
<robot_param>robot_description</robot_param>
<robot_param_node>robot_state_publisher</robot_param_node>
<parameters>$(find gz_ros2_control_demos)/config/cartpole_controller.yaml</parameters>
<parameters>$(find gz_ros2_control_demos)/config/cart_controller.yaml</parameters>
</plugin>
</gazebo>
Expand Down Expand Up @@ -200,32 +200,18 @@ and use the tag ``<controller_manager_prefix_node_name>`` to set the controller
<gazebo>
<plugin name="gz_ros2_control::GazeboSimROS2ControlPlugin" filename="libgz_ros2_control-system">
<parameters>$(find gz_ros2_control_demos)/config/cartpole_controller.yaml</parameters>
<parameters>$(find gz_ros2_control_demos)/config/cart_controller.yaml</parameters>
<controller_manager_prefix_node_name>controller_manager</controller_manager_prefix_node_name>
</plugin>
<gazebo>
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
Expand Down
2 changes: 1 addition & 1 deletion gz_ros2_control_demos/launch/cart_example_effort.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def generate_launch_description():
executable='create',
output='screen',
arguments=['-string', doc.toxml(),
'-name', 'cartpole',
'-name', 'cart',
'-allow_renaming', 'true'],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def generate_launch_description():
executable='create',
output='screen',
arguments=['-string', doc.toxml(),
'-name', 'cartpole',
'-name', 'cart',
'-allow_renaming', 'true'],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def generate_launch_description():
executable='create',
output='screen',
arguments=['-string', doc.toxml(),
'-name', 'cartpole',
'-name', 'cart',
'-allow_renaming', 'true'],
)

Expand Down
2 changes: 1 addition & 1 deletion gz_ros2_control_demos/launch/diff_drive_example.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def generate_launch_description():
executable='create',
output='screen',
arguments=['-string', doc.toxml(),
'-name', 'cartpole',
'-name', 'diff_drive',
'-allow_renaming', 'true'],
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def generate_launch_description():
executable='create',
output='screen',
arguments=['-string', doc.toxml(),
'-name', 'cartpole',
'-name', 'tricyle',
'-allow_renaming', 'true'],
)

Expand Down
6 changes: 1 addition & 5 deletions gz_ros2_control_demos/urdf/test_cart_effort.xacro.urdf
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- | This document was autogenerated by xacro from cartpole.xacro.urdf | -->
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
<!-- =================================================================================== -->
<robot name="cartopole">
<link name="world"/>
<link name="slideBar">
Expand Down Expand Up @@ -83,7 +79,7 @@
<gazebo>
<!-- Joint state publisher -->
<plugin filename="gz_ros2_control-system" name="gz_ros2_control::GazeboSimROS2ControlPlugin">
<parameters>$(find gz_ros2_control_demos)/config/cartpole_controller_effort.yaml</parameters>
<parameters>$(find gz_ros2_control_demos)/config/cart_controller_effort.yaml</parameters>
</plugin>
</gazebo>
</robot>
6 changes: 1 addition & 5 deletions gz_ros2_control_demos/urdf/test_cart_position.xacro.urdf
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- | This document was autogenerated by xacro from cartpole.xacro.urdf | -->
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
<!-- =================================================================================== -->
<robot name="cartopole">
<link name="world"/>
<link name="slideBar">
Expand Down Expand Up @@ -95,7 +91,7 @@
<gazebo>
<!-- Joint state publisher -->
<plugin filename="gz_ros2_control-system" name="gz_ros2_control::GazeboSimROS2ControlPlugin">
<parameters>$(find gz_ros2_control_demos)/config/cartpole_controller_position.yaml</parameters>
<parameters>$(find gz_ros2_control_demos)/config/cart_controller_position.yaml</parameters>
</plugin>
</gazebo>
</robot>
6 changes: 1 addition & 5 deletions gz_ros2_control_demos/urdf/test_cart_velocity.xacro.urdf
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- | This document was autogenerated by xacro from cartpole.xacro.urdf | -->
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
<!-- =================================================================================== -->
<robot name="cartopole">
<link name="world"/>
<link name="slideBar">
Expand Down Expand Up @@ -166,7 +162,7 @@
<gazebo>
<!-- Joint state publisher -->
<plugin filename="gz_ros2_control-system" name="gz_ros2_control::GazeboSimROS2ControlPlugin">
<parameters>$(find gz_ros2_control_demos)/config/cartpole_controller_velocity.yaml</parameters>
<parameters>$(find gz_ros2_control_demos)/config/cart_controller_velocity.yaml</parameters>
</plugin>
<plugin
filename="ignition-sim-imu-system"
Expand Down
2 changes: 1 addition & 1 deletion gz_ros2_control_tests/tests/position_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def generate_test_description():
executable='create',
output='screen',
arguments=['-string', doc.toxml(),
'-name', 'cartpole',
'-name', 'cart',
'-allow_renaming', 'true'],
)

Expand Down
6 changes: 1 addition & 5 deletions gz_ros2_control_tests/urdf/test_cart_position.xacro.urdf
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- | This document was autogenerated by xacro from cartpole.xacro.urdf | -->
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
<!-- =================================================================================== -->
<robot name="cartopole">
<link name="world"/>
<link name="slideBar">
Expand Down Expand Up @@ -95,7 +91,7 @@
<gazebo>
<!-- Joint state publisher -->
<plugin filename="gz_ros2_control-system" name="gz_ros2_control::GazeboSimROS2ControlPlugin">
<parameters>$(find gz_ros2_control_tests)/config/cartpole_controller_position.yaml</parameters>
<parameters>$(find gz_ros2_control_tests)/config/cart_controller_position.yaml</parameters>
</plugin>
</gazebo>
</robot>

0 comments on commit c4c94cd

Please sign in to comment.