Skip to content

Commit

Permalink
update the docs of the demos section
Browse files Browse the repository at this point in the history
  • Loading branch information
saikishor committed Sep 5, 2024
1 parent 779f1b0 commit 98e91d5
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -185,23 +185,14 @@ Where the parameters are as follows:

The same definitions apply to the ``vel_*`` parameters.

The PID parameters can be defined for ``position`` or ``position_pid`` and ``velocity`` or ``velocity_pid`` command interfaces as explained above, or definiting them in a yaml file and loading it in the ``gazebo_ros2_control`` plugin as below:
The PID parameters can be defined for ``position`` or ``position_pid`` and ``velocity`` or ``velocity_pid`` command interfaces as explained above, or defining them in a yaml file and loading it in the ``gazebo_ros2_control`` plugin as below:

.. code-block:: yaml
gazebo_ros2_control:
ros__parameters:
pid_gains:
position:
slider_to_cart: {kp: 100.0, kd: 10.0, ki: 1.0, max_integral_error: 10000.0}
.. code-block:: yaml
gazebo_ros2_control:
ros__parameters:
pid_gains:
position_pid:
position_pid: # (or) position
slider_to_cart: {kp: 100.0, kd: 10.0, ki: 1.0, max_integral_error: 10000.0}
.. code-block:: xml
Expand Down Expand Up @@ -419,10 +410,21 @@ The following examples shows a vertical cart control by a PID joint using positi

.. code-block:: shell
ros2 launch gazebo_ros2_control_demos vertical_cart_example_position_pids_in_yaml.launch.py
ros2 launch gazebo_ros2_control_demos vertical_cart_example_position_pid.launch.py
ros2 launch gazebo_ros2_control_demos vertical_cart_example_velocity_pid.launch.py
.. code-block:: shell
ros2 run gazebo_ros2_control_demos example_position_pid
ros2 run gazebo_ros2_control_demos example_velocity
The ``vertical_cart_example_position_pids_in_yaml.launch.py`` example uses a yaml file as following to set the PID gains:

.. code-block:: yaml
gazebo_ros2_control:
ros__parameters:
pid_gains:
position:
slider_to_cart: {kp: 100.0, kd: 10.0, ki: 1.0, max_integral_error: 10000.0}

0 comments on commit 98e91d5

Please sign in to comment.