Class DelayedThrottleFilter
Defined in File console.hpp
Class Documentation
-
class DelayedThrottleFilter
a log filter that provides a condition to RCLCPP_*_STREAM_EXPRESSION and allows to reset the last time the message was print, so the delayed and throttle conditions are computed from the initial state again.
Public Functions
-
inline explicit DelayedThrottleFilter(const double period)
Constructor.
- Parameters:
The – [in] throttle period in seconds
-
inline bool isEnabled()
Returns whether or not the log statement should be printed. Called before the log arguments are evaluated and the message is formatted.
This borrows logic from ROS 1’s delayed throttle logging, but the last time the filter condition was hit is handled by this filter, so it can be reset.
- Parameters:
now – [in] - The current ROS time at which to check if logging should fire
- Returns:
True if the filter condition is hit (signalling that the message should print), false otherwise
-
inline void reset()
Rests the last time the filter condition was hit.
-
inline explicit DelayedThrottleFilter(const double period)