Skip to content

Commit

Permalink
[Doc] Add documentation about initial_value regarding mock_hw (#1352) (
Browse files Browse the repository at this point in the history
…#1513)

(cherry picked from commit 26815e8)

Co-authored-by: Felix Exner (fexner) <exner@fzi.de>
  • Loading branch information
mergify[bot] and fmauch authored Apr 29, 2024
1 parent 614d97d commit 0d38c3a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hardware_interface/doc/hardware_interface_types_userdoc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ They can be combined together within the different hardware component types (sys
</gpio>
<gpio name="flange_analog_IOs">
<command_interface name="analog_output1"/>
<state_interface name="analog_output1"/> <!-- Needed to know current state of the output -->
<state_interface name="analog_output1"> <!-- Needed to know current state of the output -->
<param name="initial_value">3.1</param> <!-- Optional initial value for mock_hardware -->
</state_interface>
<state_interface name="analog_input1"/>
<state_interface name="analog_input2"/>
</gpio>
Expand Down
16 changes: 16 additions & 0 deletions hardware_interface/doc/mock_components_userdoc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,19 @@ mimic (optional; string)

multiplier (optional; double; default: 1; used if mimic joint is defined)
Multiplier of values for mimicking joint defined in ``mimic`` parameter. Example: ``<param name="multiplier">-2</param>``.

Per-interface Parameters
,,,,,,,,,,,,,,,,,,,,,,,,

initial_value (optional; double)
Initial value of certain state interface directly after startup. Example:

.. code-block:: xml
<state_interface name="position">
<param name="initial_value">3.45</param>
</state_interface>
Note: This parameter is shared with the gazebo and gazebo classic plugins for
joint interfaces. For Mock components it is also possible to set initial
values for gpio or sensor state interfaces.

0 comments on commit 0d38c3a

Please sign in to comment.