Skip to content

Commit

Permalink
Let sphinx add parameter description to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich committed Jun 5, 2023
1 parent 9a6eec1 commit 9a3306c
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 30 deletions.
6 changes: 4 additions & 2 deletions admittance_controller/doc/userdoc.rst
Expand Up @@ -17,10 +17,12 @@ ROS2 interface of the controller
Parameters
^^^^^^^^^^^

The admittance controller's uses the `generate_parameter_library <https://github.com/PickNikRobotics/generate_parameter_library>`_ to handle its parameters.
The parameter `definition file located in the src folder <https://github.com/ros-controls/ros2_controllers/blob/{REPOS_FILE_BRANCH}/admittance_controller/src/admittance_controller_parameters.yaml>`_ contains descriptions for all the parameters used by the controller.
The admittance controller uses the `generate_parameter_library <https://github.com/PickNikRobotics/generate_parameter_library>`_ to handle its parameters.

An example parameter file can be found in the `test folder of the controller <https://github.com/ros-controls/ros2_controllers/blob/{REPOS_FILE_BRANCH}/admittance_controller/test/test_params.yaml>`_

.. generate_parameter_library_details:: ../src/admittance_controller_parameters.yaml


Topics
^^^^^^^
Expand Down
4 changes: 3 additions & 1 deletion diff_drive_controller/doc/userdoc.rst
Expand Up @@ -72,7 +72,9 @@ Services
Parameters
------------

Check `parameter definition file for details <https://github.com/ros-controls/ros2_controllers/blob/{REPOS_FILE_BRANCH}/diff_drive_controller/src/diff_drive_controller_parameter.yaml>`_.
This controller uses the `generate_parameter_library <https://github.com/PickNikRobotics/generate_parameter_library>`_ to handle its parameters.

.. generate_parameter_library_details:: ../src/diff_drive_controller_parameter.yaml

Note that the documentation on parameters for joint limits can be found in `their header file <https://github.com/ros-controls/ros2_control/blob/{REPOS_FILE_BRANCH}/joint_limits/include/joint_limits/joint_limits_rosparam.hpp#L56-L75>`_.
Those parameters are:
Expand Down
15 changes: 7 additions & 8 deletions force_torque_sensor_broadcaster/doc/userdoc.rst
Expand Up @@ -12,15 +12,10 @@ The controller is a wrapper around ``ForceTorqueSensor`` semantic component (see

Parameters
^^^^^^^^^^^
The interfaces can be defined in two ways, using ``sensor_name`` or ``interface_names`` parameter.
Those two parameters can not be defined at the same time
This controller uses the `generate_parameter_library <https://github.com/PickNikRobotics/generate_parameter_library>`_ to handle its parameters.

frame_id (mandatory)
Frame in which the output message will be published.

sensor_name (optional)
Defines sensor name used as prefix for its interfaces.
If used standard interface names for a 6D FTS will be used: <sensor_name>/force.x, ..., <sensor_name>/torque.z.
The interfaces can be defined in two ways, using ``sensor_name`` or ``interface_names`` parameter:
Those two parameters cannot be defined at the same time.

interface_names.[force|torque].[x|y|z] (optional)
Defines custom, per axis interface names.
Expand All @@ -34,3 +29,7 @@ interface_names.[force|torque].[x|y|z] (optional)
interface_names:
force:
x: example_name/example_interface
Full list of parameters:

.. generate_parameter_library_details:: ../src/force_torque_sensor_broadcaster_parameters.yaml
Expand Up @@ -7,7 +7,8 @@ force_torque_sensor_broadcaster:
sensor_name: {
type: string,
default_value: "",
description: "Name of the sensor used as prefix for interfaces if there are no individual interface names defined.",
description: "Name of the sensor used as prefix for interfaces if there are no individual interface names defined.
If used, standard interface names for a 6D FTS will be used: ``<sensor_name>/force.x, ..., <sensor_name>/torque.z``",
}
interface_names:
force:
Expand Down
24 changes: 6 additions & 18 deletions joint_state_broadcaster/doc/userdoc.rst
Expand Up @@ -22,25 +22,9 @@ If none of the requested interface are not defined, the controller returns error

Parameters
----------
This controller uses the `generate_parameter_library <https://github.com/PickNikRobotics/generate_parameter_library>`_ to handle its parameters.

use_local_topics
Optional parameter (boolean; default: ``False``) defining if ``joint_states`` and ``dynamic_joint_states`` messages should be published into local namespace, e.g., ``/my_state_broadcaster/joint_states``.


joints
Optional parameter (string array) to support broadcasting of only specific joints and interfaces.
It has to be used in combination with the ``interfaces`` parameter.
Joint state broadcaster asks for access to all defined interfaces on all defined joints.


interfaces
Optional parameter (string array) to support broadcasting of only specific joints and interfaces.
It has to be used in combination with the ``joints`` parameter.


extra_joints
Optional parameter (string array) with names of extra joints to be added to ``joint_states`` and ``dynamic_joint_states`` with state set to 0.

For an exemplary parameterization see the ``test`` folder of the controller's package.

map_interface_to_joint_state
Optional parameter (map) providing mapping between custom interface names to standard fields in ``joint_states`` message.
Expand Down Expand Up @@ -89,3 +73,7 @@ map_interface_to_joint_state
map_interface_to_joint_state:
effort: current_sensor
Full list of parameters:

.. generate_parameter_library_details:: ../src/joint_state_broadcaster_parameters.yaml
Expand Up @@ -2,18 +2,25 @@ joint_state_broadcaster:
use_local_topics: {
type: bool,
default_value: false,
description: "Defining if ``joint_states`` and ``dynamic_joint_states`` messages should be published into local namespace, e.g., ``/my_state_broadcaster/joint_states``."
}
joints: {
type: string_array,
default_value: [],
description: "Parameter to support broadcasting of only specific joints and interfaces.
It has to be used in combination with the ``interfaces`` parameter.
Joint state broadcaster asks for access to all defined interfaces on all defined joints."
}
extra_joints: {
type: string_array,
default_value: [],
description: "Names of extra joints to be added to ``joint_states`` and ``dynamic_joint_states`` with state set to 0."
}
interfaces: {
type: string_array,
default_value: [],
description: "Parameter to support broadcasting of only specific joints and interfaces.
It has to be used in combination with the ``joints`` parameter."
}
map_interface_to_joint_state:
position: {
Expand Down

0 comments on commit 9a3306c

Please sign in to comment.