Skip to content

Commit 318f138

Browse files
committed
adjusted code and docs to reflect status_publisher is int now
1 parent f252729 commit 318f138

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

hardware_interface/doc/writing_new_hardware_component.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,14 @@ The following is a step-by-step guide to create source files, basic tests, and c
212212
return hardware_interface::return_type::OK;
213213
}
214214
215-
* **Enable in URDF**: Finally, to activate the publisher, add the ``status_publish_rate`` parameter to your ``<hardware>`` tag in the URDF. Setting it to 0.0 disables the feature.
215+
* **Enable in URDF**: Finally, to activate the publisher, add the ``status_publish_rate`` parameter to your ``<hardware>`` tag in the URDF. Setting it to 0 disables the feature.
216216

217217
.. code-block:: xml
218218
219219
<ros2_control name="MyHardware" type="system">
220220
<hardware>
221221
<plugin>my_package/MyHardware</plugin>
222-
<param name="status_publish_rate">20.0</param>
222+
<param name="status_publish_rate">20</param>
223223
</hardware>
224224
...
225225
</ros2_control>

hardware_interface/include/hardware_interface/hardware_component_interface.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ class HardwareComponentInterface : public rclcpp_lifecycle::node_interfaces::Lif
201201
catch (const std::invalid_argument &)
202202
{
203203
RCLCPP_WARN(
204-
get_logger(), "Invalid 'status_publish_rate' parameter. Using default %.1f Hz.",
204+
get_logger(), "Invalid 'status_publish_rate' parameter. Using default %.d Hz.",
205205
publish_rate);
206206
}
207207
}

0 commit comments

Comments
 (0)