ros2_control - humble
|
A Low-pass filter class. More...
#include <low_pass_filter.hpp>
Public Member Functions | |
bool | configure () override |
Configure the LowPassFilter (access and process params). | |
bool | update (const T &data_in, T &data_out) override |
Applies one iteration of the IIR filter. | |
bool | update (const geometry_msgs::msg::WrenchStamped &data_in, geometry_msgs::msg::WrenchStamped &data_out) |
A Low-pass filter class.
This class implements a low-pass filter for various data types based on an Infinite Impulse Response Filter.
In particular, this class implements a simplified version of an IIR filter equation :
\(y(n) = b x(n-1) + a y(n-1)\)
where:
and the Low-Pass coefficient equation:
where:
The LowPassFilter class is meant to be instantiated as a filter in a controller but can also be used elsewhere. For manual instantiation, you should first call configure() (in non-realtime) and then call update() at every update step.
|
override |
Applies one iteration of the IIR filter.
data_in | input to the filter |
data_out | filtered output |