Class Throttler

Class Documentation

class Throttler

Helper class used to throttle something to a given rate.

Public Functions

explicit Throttler(const double _hz)

Create a throttler with a frequency

Parameters:

_hz[in] Frequency at which IsReady will return true, in hertz

bool IsReady(const gazebo::common::Time &_time)

Check if the enough time has elapsed since the last time IsReady returned true

Parameters:

_time[in] The current time.

Returns:

false if not enough time has elapsed from the last time IsReady was true

Returns:

true if enough time has elapsed since the last success, or it is the first time.