Main Content


Reset ros2rate object

Since R2022b


reset(rate) resets the state of the ros2rate object, including the elapsed time and all statistics about previous periods. reset is useful if you want to run multiple successive loops at the same rate, or if the object is created before the loop is executed.

Input Arguments

collapse all

ROS 2 loop execution object, specified as ros2rate object. This object contains the information for the DesiredRate and other info about the execution. See ros2rate for more information.

Version History

Introduced in R2022b

See Also