Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename cartpole with cart #214

Merged
merged 5 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -201,32 +201,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>
Loading