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

Add documentation about initial_value regarding mock_hw (backport #1352) #1513

Merged
merged 1 commit into from
Apr 29, 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
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.
Loading