pub fn low_pass_filter(
sample_time: f64,
y: f64,
y_last: f64,
cutoff_frequency: f64,
) -> FrankaResult<f64>Expand description
Applies a first-order low-pass filter.
Port of franka::lowpassFilter.
sample_time– sample time constanty– current value of the signal to be filteredy_last– value of the signal in the previous time stepcutoff_frequency– cutoff frequency of the low-pass filter
§Errors
FrankaError::InvalidArgument if sample_time is negative, infinite or NaN, if
cutoff_frequency is zero, negative, infinite or NaN, or if either signal value is infinite
or NaN.