Go to the documentation of this file.
43 const double controlError =
50 "Cannot run at the expected rate: actual_rate=%.03f Hz "
51 "desired_rate=%.03f Hz",
62 if (validRateEstimate)
87 const double measuredPeriod = t_now -
m_lastTic;
#define ASSERT_ABOVE_(__A, __B)
double rate() const
Gets current rate (Hz)
double m_currentEstimatedRate
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
T saturate_val(const T &value, const T sat_min, const T sat_max)
Like saturate() but it returns the value instead of modifying the variable.
double Tac() noexcept
Stops the stopwatch.
mrpt::system::CTicTac m_tic
double m_lastControlError
bool sleep()
Sleeps for some time, such as the return of this method is 1/rate (seconds) after the return of the p...
#define MRPT_LOG_THROTTLE_WARN_FMT(_PERIOD_SECONDS, _FMT_STRING,...)
mrpt::system::CRateTimer m_ratetimer
the one control acts on
void setRate(const double rate_hz)
Changes the object loop rate (Hz)
void Tic() noexcept
Starts the stopwatch.
void setRate(const double rate_hz)
Changes the object loop rate (Hz)
bool internalUpdateRateEstimate()
Versatile class for consistent logging and management of output messages.
bool sleep()
Sleeps for some time, such as the return of this method is 1/rate (seconds) after the return of the p...
CControlledRateTimer(const double rate_hz=1.0)
Ctor: specifies the desired rate (Hz)
double m_followErrorRatioForWarning
Page generated by Doxygen 1.8.18 for MRPT 2.0.4 at Thu Sep 24 07:14:18 UTC 2020 | |