|
EasyFleet
A simple-by-default framework for multi-robot, multi-capability fleets built on ROS 2
|
Value-semantics rate limiter: copies (e.g. More...
#include <throttle.hpp>
Public Member Functions | |
| Throttle (std::chrono::milliseconds interval) | |
| Constructs a throttle with the given minimum interval. | |
| bool | ready () const |
| Whether at least interval has elapsed since the last call that returned true. | |
Value-semantics rate limiter: copies (e.g.
captured by value into a std::function) share the same underlying clock, so a feedback callback that fires at, say, 20 Hz can be throttled down to a readable printing rate without flooding the terminal.
|
inlineexplicit |
Constructs a throttle with the given minimum interval.
| interval | Minimum time between two calls returning true. |
|
inline |
Whether at least interval has elapsed since the last call that returned true.